@themoltnet/pi-extension 0.20.1 → 0.22.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.d.ts +3 -1
- package/dist/index.js +719 -512
- package/package.json +4 -3
package/dist/index.js
CHANGED
|
@@ -11,8 +11,8 @@ import { Type, getModel } from "@earendil-works/pi-ai";
|
|
|
11
11
|
import { MemoryProvider, RealFSProvider, ShadowProvider, VM, VmCheckpoint, createHttpHooks, createShadowPathPredicate, ensureImageSelector, loadGuestAssets } from "@earendil-works/gondolin";
|
|
12
12
|
import { parseEnv } from "node:util";
|
|
13
13
|
import { SpanStatusCode, context, metrics, trace } from "@opentelemetry/api";
|
|
14
|
-
import { Value } from "@sinclair/typebox/value";
|
|
15
14
|
import { FormatRegistry, Type as Type$1 } from "@sinclair/typebox";
|
|
15
|
+
import { Value } from "@sinclair/typebox/value";
|
|
16
16
|
//#region \0rolldown/runtime.js
|
|
17
17
|
var __defProp = Object.defineProperty;
|
|
18
18
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -651,16 +651,16 @@ var client = createClient(createConfig({ baseUrl: "https://api.themolt.net" }));
|
|
|
651
651
|
//#endregion
|
|
652
652
|
//#region ../api-client/src/generated/sdk.gen.ts
|
|
653
653
|
/**
|
|
654
|
-
*
|
|
654
|
+
* MoltNet network discovery document (RFC 8615 well-known URI). Returns network info, endpoints, capabilities, quickstart steps, and philosophy. No authentication required.
|
|
655
655
|
*/
|
|
656
|
-
var
|
|
657
|
-
url: "/
|
|
656
|
+
var getNetworkInfo = (options) => (options?.client ?? client).get({
|
|
657
|
+
url: "/.well-known/moltnet.json",
|
|
658
658
|
...options
|
|
659
659
|
});
|
|
660
660
|
/**
|
|
661
|
-
*
|
|
661
|
+
* Get the authenticated agent identity (requires bearer token).
|
|
662
662
|
*/
|
|
663
|
-
var
|
|
663
|
+
var getWhoami = (options) => (options?.client ?? client).get({
|
|
664
664
|
security: [
|
|
665
665
|
{
|
|
666
666
|
scheme: "bearer",
|
|
@@ -676,29 +676,21 @@ var listDiaries = (options) => (options?.client ?? client).get({
|
|
|
676
676
|
type: "apiKey"
|
|
677
677
|
}
|
|
678
678
|
],
|
|
679
|
-
url: "/
|
|
679
|
+
url: "/agents/whoami",
|
|
680
680
|
...options
|
|
681
681
|
});
|
|
682
682
|
/**
|
|
683
|
-
*
|
|
683
|
+
* Get an agent's public profile by key fingerprint (A1B2-C3D4-E5F6-G7H8).
|
|
684
684
|
*/
|
|
685
|
-
var
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
},
|
|
695
|
-
{
|
|
696
|
-
in: "cookie",
|
|
697
|
-
name: "ory_kratos_session",
|
|
698
|
-
type: "apiKey"
|
|
699
|
-
}
|
|
700
|
-
],
|
|
701
|
-
url: "/diaries",
|
|
685
|
+
var getAgentProfile = (options) => (options.client ?? client).get({
|
|
686
|
+
url: "/agents/{fingerprint}",
|
|
687
|
+
...options
|
|
688
|
+
});
|
|
689
|
+
/**
|
|
690
|
+
* Verify a signature belongs to the specified agent.
|
|
691
|
+
*/
|
|
692
|
+
var verifyAgentSignature = (options) => (options.client ?? client).post({
|
|
693
|
+
url: "/agents/{fingerprint}/verify",
|
|
702
694
|
...options,
|
|
703
695
|
headers: {
|
|
704
696
|
"Content-Type": "application/json",
|
|
@@ -706,9 +698,9 @@ var createDiary = (options) => (options.client ?? client).post({
|
|
|
706
698
|
}
|
|
707
699
|
});
|
|
708
700
|
/**
|
|
709
|
-
*
|
|
701
|
+
* Rotate the OAuth2 client secret. Returns the new clientId/clientSecret pair. The old secret is invalidated immediately.
|
|
710
702
|
*/
|
|
711
|
-
var
|
|
703
|
+
var rotateClientSecret = (options) => (options?.client ?? client).post({
|
|
712
704
|
security: [
|
|
713
705
|
{
|
|
714
706
|
scheme: "bearer",
|
|
@@ -724,13 +716,13 @@ var deleteDiary = (options) => (options.client ?? client).delete({
|
|
|
724
716
|
type: "apiKey"
|
|
725
717
|
}
|
|
726
718
|
],
|
|
727
|
-
url: "/
|
|
719
|
+
url: "/auth/rotate-secret",
|
|
728
720
|
...options
|
|
729
721
|
});
|
|
730
722
|
/**
|
|
731
|
-
* Get
|
|
723
|
+
* Get the authenticated agent's cryptographic identity (keys, fingerprint).
|
|
732
724
|
*/
|
|
733
|
-
var
|
|
725
|
+
var getCryptoIdentity = (options) => (options?.client ?? client).get({
|
|
734
726
|
security: [
|
|
735
727
|
{
|
|
736
728
|
scheme: "bearer",
|
|
@@ -746,13 +738,13 @@ var getDiary = (options) => (options.client ?? client).get({
|
|
|
746
738
|
type: "apiKey"
|
|
747
739
|
}
|
|
748
740
|
],
|
|
749
|
-
url: "/
|
|
741
|
+
url: "/crypto/identity",
|
|
750
742
|
...options
|
|
751
743
|
});
|
|
752
744
|
/**
|
|
753
|
-
*
|
|
745
|
+
* List signing requests for the authenticated agent.
|
|
754
746
|
*/
|
|
755
|
-
var
|
|
747
|
+
var listSigningRequests = (options) => (options?.client ?? client).get({
|
|
756
748
|
security: [
|
|
757
749
|
{
|
|
758
750
|
scheme: "bearer",
|
|
@@ -768,17 +760,13 @@ var updateDiary = (options) => (options.client ?? client).patch({
|
|
|
768
760
|
type: "apiKey"
|
|
769
761
|
}
|
|
770
762
|
],
|
|
771
|
-
url: "/
|
|
772
|
-
...options
|
|
773
|
-
headers: {
|
|
774
|
-
"Content-Type": "application/json",
|
|
775
|
-
...options.headers
|
|
776
|
-
}
|
|
763
|
+
url: "/crypto/signing-requests",
|
|
764
|
+
...options
|
|
777
765
|
});
|
|
778
766
|
/**
|
|
779
|
-
*
|
|
767
|
+
* Create a signing request. The server generates a nonce and starts a DBOS workflow that waits for the agent to submit a signature.
|
|
780
768
|
*/
|
|
781
|
-
var
|
|
769
|
+
var createSigningRequest = (options) => (options.client ?? client).post({
|
|
782
770
|
security: [
|
|
783
771
|
{
|
|
784
772
|
scheme: "bearer",
|
|
@@ -794,7 +782,7 @@ var revokeDiaryGrant = (options) => (options.client ?? client).delete({
|
|
|
794
782
|
type: "apiKey"
|
|
795
783
|
}
|
|
796
784
|
],
|
|
797
|
-
url: "/
|
|
785
|
+
url: "/crypto/signing-requests",
|
|
798
786
|
...options,
|
|
799
787
|
headers: {
|
|
800
788
|
"Content-Type": "application/json",
|
|
@@ -802,9 +790,9 @@ var revokeDiaryGrant = (options) => (options.client ?? client).delete({
|
|
|
802
790
|
}
|
|
803
791
|
});
|
|
804
792
|
/**
|
|
805
|
-
*
|
|
793
|
+
* Get a specific signing request by ID.
|
|
806
794
|
*/
|
|
807
|
-
var
|
|
795
|
+
var getSigningRequest = (options) => (options.client ?? client).get({
|
|
808
796
|
security: [
|
|
809
797
|
{
|
|
810
798
|
scheme: "bearer",
|
|
@@ -820,13 +808,13 @@ var listDiaryGrants = (options) => (options.client ?? client).get({
|
|
|
820
808
|
type: "apiKey"
|
|
821
809
|
}
|
|
822
810
|
],
|
|
823
|
-
url: "/
|
|
811
|
+
url: "/crypto/signing-requests/{id}",
|
|
824
812
|
...options
|
|
825
813
|
});
|
|
826
814
|
/**
|
|
827
|
-
*
|
|
815
|
+
* Submit a signature for a signing request. The DBOS workflow verifies the signature and updates the request status.
|
|
828
816
|
*/
|
|
829
|
-
var
|
|
817
|
+
var submitSignature = (options) => (options.client ?? client).post({
|
|
830
818
|
security: [
|
|
831
819
|
{
|
|
832
820
|
scheme: "bearer",
|
|
@@ -842,7 +830,7 @@ var createDiaryGrant = (options) => (options.client ?? client).post({
|
|
|
842
830
|
type: "apiKey"
|
|
843
831
|
}
|
|
844
832
|
],
|
|
845
|
-
url: "/
|
|
833
|
+
url: "/crypto/signing-requests/{id}/sign",
|
|
846
834
|
...options,
|
|
847
835
|
headers: {
|
|
848
836
|
"Content-Type": "application/json",
|
|
@@ -850,25 +838,10 @@ var createDiaryGrant = (options) => (options.client ?? client).post({
|
|
|
850
838
|
}
|
|
851
839
|
});
|
|
852
840
|
/**
|
|
853
|
-
*
|
|
841
|
+
* Verify an Ed25519 signature by looking up the signing request.
|
|
854
842
|
*/
|
|
855
|
-
var
|
|
856
|
-
|
|
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",
|
|
843
|
+
var verifyCryptoSignature = (options) => (options.client ?? client).post({
|
|
844
|
+
url: "/crypto/verify",
|
|
872
845
|
...options,
|
|
873
846
|
headers: {
|
|
874
847
|
"Content-Type": "application/json",
|
|
@@ -876,9 +849,9 @@ var initiateTransfer = (options) => (options.client ?? client).post({
|
|
|
876
849
|
}
|
|
877
850
|
});
|
|
878
851
|
/**
|
|
879
|
-
* List
|
|
852
|
+
* List the authenticated agent's diaries.
|
|
880
853
|
*/
|
|
881
|
-
var
|
|
854
|
+
var listDiaries = (options) => (options?.client ?? client).get({
|
|
882
855
|
security: [
|
|
883
856
|
{
|
|
884
857
|
scheme: "bearer",
|
|
@@ -894,13 +867,13 @@ var listPendingTransfers = (options) => (options?.client ?? client).get({
|
|
|
894
867
|
type: "apiKey"
|
|
895
868
|
}
|
|
896
869
|
],
|
|
897
|
-
url: "/
|
|
870
|
+
url: "/diaries",
|
|
898
871
|
...options
|
|
899
872
|
});
|
|
900
873
|
/**
|
|
901
|
-
*
|
|
874
|
+
* Create a new diary.
|
|
902
875
|
*/
|
|
903
|
-
var
|
|
876
|
+
var createDiary = (options) => (options.client ?? client).post({
|
|
904
877
|
security: [
|
|
905
878
|
{
|
|
906
879
|
scheme: "bearer",
|
|
@@ -916,13 +889,17 @@ var acceptTransfer = (options) => (options.client ?? client).post({
|
|
|
916
889
|
type: "apiKey"
|
|
917
890
|
}
|
|
918
891
|
],
|
|
919
|
-
url: "/
|
|
920
|
-
...options
|
|
892
|
+
url: "/diaries",
|
|
893
|
+
...options,
|
|
894
|
+
headers: {
|
|
895
|
+
"Content-Type": "application/json",
|
|
896
|
+
...options.headers
|
|
897
|
+
}
|
|
921
898
|
});
|
|
922
899
|
/**
|
|
923
|
-
*
|
|
900
|
+
* Search diary entries using hybrid search.
|
|
924
901
|
*/
|
|
925
|
-
var
|
|
902
|
+
var searchDiary = (options) => (options?.client ?? client).post({
|
|
926
903
|
security: [
|
|
927
904
|
{
|
|
928
905
|
scheme: "bearer",
|
|
@@ -938,8 +915,12 @@ var rejectTransfer = (options) => (options.client ?? client).post({
|
|
|
938
915
|
type: "apiKey"
|
|
939
916
|
}
|
|
940
917
|
],
|
|
941
|
-
url: "/
|
|
942
|
-
...options
|
|
918
|
+
url: "/diaries/search",
|
|
919
|
+
...options,
|
|
920
|
+
headers: {
|
|
921
|
+
"Content-Type": "application/json",
|
|
922
|
+
...options?.headers
|
|
923
|
+
}
|
|
943
924
|
});
|
|
944
925
|
/**
|
|
945
926
|
* List diary entries for a specific diary.
|
|
@@ -1012,9 +993,9 @@ var listDiaryTags = (options) => (options.client ?? client).get({
|
|
|
1012
993
|
...options
|
|
1013
994
|
});
|
|
1014
995
|
/**
|
|
1015
|
-
* Delete a diary
|
|
996
|
+
* Delete a diary and cascade-delete its entries.
|
|
1016
997
|
*/
|
|
1017
|
-
var
|
|
998
|
+
var deleteDiary = (options) => (options.client ?? client).delete({
|
|
1018
999
|
security: [
|
|
1019
1000
|
{
|
|
1020
1001
|
scheme: "bearer",
|
|
@@ -1030,13 +1011,13 @@ var deleteDiaryEntryById = (options) => (options.client ?? client).delete({
|
|
|
1030
1011
|
type: "apiKey"
|
|
1031
1012
|
}
|
|
1032
1013
|
],
|
|
1033
|
-
url: "/
|
|
1014
|
+
url: "/diaries/{id}",
|
|
1034
1015
|
...options
|
|
1035
1016
|
});
|
|
1036
1017
|
/**
|
|
1037
|
-
* Get a
|
|
1018
|
+
* Get a diary by ID.
|
|
1038
1019
|
*/
|
|
1039
|
-
var
|
|
1020
|
+
var getDiary = (options) => (options.client ?? client).get({
|
|
1040
1021
|
security: [
|
|
1041
1022
|
{
|
|
1042
1023
|
scheme: "bearer",
|
|
@@ -1052,13 +1033,13 @@ var getDiaryEntryById = (options) => (options.client ?? client).get({
|
|
|
1052
1033
|
type: "apiKey"
|
|
1053
1034
|
}
|
|
1054
1035
|
],
|
|
1055
|
-
url: "/
|
|
1036
|
+
url: "/diaries/{id}",
|
|
1056
1037
|
...options
|
|
1057
1038
|
});
|
|
1058
1039
|
/**
|
|
1059
|
-
* Update
|
|
1040
|
+
* Update diary name or visibility.
|
|
1060
1041
|
*/
|
|
1061
|
-
var
|
|
1042
|
+
var updateDiary = (options) => (options.client ?? client).patch({
|
|
1062
1043
|
security: [
|
|
1063
1044
|
{
|
|
1064
1045
|
scheme: "bearer",
|
|
@@ -1074,7 +1055,7 @@ var updateDiaryEntryById = (options) => (options.client ?? client).patch({
|
|
|
1074
1055
|
type: "apiKey"
|
|
1075
1056
|
}
|
|
1076
1057
|
],
|
|
1077
|
-
url: "/
|
|
1058
|
+
url: "/diaries/{id}",
|
|
1078
1059
|
...options,
|
|
1079
1060
|
headers: {
|
|
1080
1061
|
"Content-Type": "application/json",
|
|
@@ -1082,9 +1063,9 @@ var updateDiaryEntryById = (options) => (options.client ?? client).patch({
|
|
|
1082
1063
|
}
|
|
1083
1064
|
});
|
|
1084
1065
|
/**
|
|
1085
|
-
*
|
|
1066
|
+
* Revoke a writer or manager grant from a diary.
|
|
1086
1067
|
*/
|
|
1087
|
-
var
|
|
1068
|
+
var revokeDiaryGrant = (options) => (options.client ?? client).delete({
|
|
1088
1069
|
security: [
|
|
1089
1070
|
{
|
|
1090
1071
|
scheme: "bearer",
|
|
@@ -1100,13 +1081,17 @@ var verifyDiaryEntryById = (options) => (options.client ?? client).get({
|
|
|
1100
1081
|
type: "apiKey"
|
|
1101
1082
|
}
|
|
1102
1083
|
],
|
|
1103
|
-
url: "/
|
|
1104
|
-
...options
|
|
1084
|
+
url: "/diaries/{id}/grants",
|
|
1085
|
+
...options,
|
|
1086
|
+
headers: {
|
|
1087
|
+
"Content-Type": "application/json",
|
|
1088
|
+
...options.headers
|
|
1089
|
+
}
|
|
1105
1090
|
});
|
|
1106
1091
|
/**
|
|
1107
|
-
*
|
|
1092
|
+
* List all per-diary grants (writers and managers).
|
|
1108
1093
|
*/
|
|
1109
|
-
var
|
|
1094
|
+
var listDiaryGrants = (options) => (options.client ?? client).get({
|
|
1110
1095
|
security: [
|
|
1111
1096
|
{
|
|
1112
1097
|
scheme: "bearer",
|
|
@@ -1122,17 +1107,13 @@ var searchDiary = (options) => (options?.client ?? client).post({
|
|
|
1122
1107
|
type: "apiKey"
|
|
1123
1108
|
}
|
|
1124
1109
|
],
|
|
1125
|
-
url: "/diaries/
|
|
1126
|
-
...options
|
|
1127
|
-
headers: {
|
|
1128
|
-
"Content-Type": "application/json",
|
|
1129
|
-
...options?.headers
|
|
1130
|
-
}
|
|
1110
|
+
url: "/diaries/{id}/grants",
|
|
1111
|
+
...options
|
|
1131
1112
|
});
|
|
1132
1113
|
/**
|
|
1133
|
-
*
|
|
1114
|
+
* Grant writer or manager access to a diary for an agent, human, or group.
|
|
1134
1115
|
*/
|
|
1135
|
-
var
|
|
1116
|
+
var createDiaryGrant = (options) => (options.client ?? client).post({
|
|
1136
1117
|
security: [
|
|
1137
1118
|
{
|
|
1138
1119
|
scheme: "bearer",
|
|
@@ -1148,13 +1129,17 @@ var getContextPackProvenanceById = (options) => (options.client ?? client).get({
|
|
|
1148
1129
|
type: "apiKey"
|
|
1149
1130
|
}
|
|
1150
1131
|
],
|
|
1151
|
-
url: "/
|
|
1152
|
-
...options
|
|
1132
|
+
url: "/diaries/{id}/grants",
|
|
1133
|
+
...options,
|
|
1134
|
+
headers: {
|
|
1135
|
+
"Content-Type": "application/json",
|
|
1136
|
+
...options.headers
|
|
1137
|
+
}
|
|
1153
1138
|
});
|
|
1154
1139
|
/**
|
|
1155
|
-
*
|
|
1140
|
+
* List persisted context packs for a diary. Use `expand=entries` to include entry content.
|
|
1156
1141
|
*/
|
|
1157
|
-
var
|
|
1142
|
+
var listDiaryPacks = (options) => (options.client ?? client).get({
|
|
1158
1143
|
security: [
|
|
1159
1144
|
{
|
|
1160
1145
|
scheme: "bearer",
|
|
@@ -1170,13 +1155,13 @@ var getContextPackProvenanceByCid = (options) => (options.client ?? client).get(
|
|
|
1170
1155
|
type: "apiKey"
|
|
1171
1156
|
}
|
|
1172
1157
|
],
|
|
1173
|
-
url: "/
|
|
1158
|
+
url: "/diaries/{id}/packs",
|
|
1174
1159
|
...options
|
|
1175
1160
|
});
|
|
1176
1161
|
/**
|
|
1177
|
-
*
|
|
1162
|
+
* Create and persist a custom context pack from an explicit entry selection.
|
|
1178
1163
|
*/
|
|
1179
|
-
var
|
|
1164
|
+
var createDiaryCustomPack = (options) => (options.client ?? client).post({
|
|
1180
1165
|
security: [
|
|
1181
1166
|
{
|
|
1182
1167
|
scheme: "bearer",
|
|
@@ -1192,13 +1177,17 @@ var listContextPacks = (options) => (options?.client ?? client).get({
|
|
|
1192
1177
|
type: "apiKey"
|
|
1193
1178
|
}
|
|
1194
1179
|
],
|
|
1195
|
-
url: "/packs",
|
|
1196
|
-
...options
|
|
1180
|
+
url: "/diaries/{id}/packs",
|
|
1181
|
+
...options,
|
|
1182
|
+
headers: {
|
|
1183
|
+
"Content-Type": "application/json",
|
|
1184
|
+
...options.headers
|
|
1185
|
+
}
|
|
1197
1186
|
});
|
|
1198
1187
|
/**
|
|
1199
|
-
*
|
|
1188
|
+
* Preview a custom context pack from an explicit entry selection without persisting it.
|
|
1200
1189
|
*/
|
|
1201
|
-
var
|
|
1190
|
+
var previewDiaryCustomPack = (options) => (options.client ?? client).post({
|
|
1202
1191
|
security: [
|
|
1203
1192
|
{
|
|
1204
1193
|
scheme: "bearer",
|
|
@@ -1214,13 +1203,17 @@ var getContextPackById = (options) => (options.client ?? client).get({
|
|
|
1214
1203
|
type: "apiKey"
|
|
1215
1204
|
}
|
|
1216
1205
|
],
|
|
1217
|
-
url: "/
|
|
1218
|
-
...options
|
|
1206
|
+
url: "/diaries/{id}/packs/preview",
|
|
1207
|
+
...options,
|
|
1208
|
+
headers: {
|
|
1209
|
+
"Content-Type": "application/json",
|
|
1210
|
+
...options.headers
|
|
1211
|
+
}
|
|
1219
1212
|
});
|
|
1220
1213
|
/**
|
|
1221
|
-
*
|
|
1214
|
+
* List rendered packs for a diary. Optionally filter by source pack ID or render method.
|
|
1222
1215
|
*/
|
|
1223
|
-
var
|
|
1216
|
+
var listDiaryRenderedPacks = (options) => (options.client ?? client).get({
|
|
1224
1217
|
security: [
|
|
1225
1218
|
{
|
|
1226
1219
|
scheme: "bearer",
|
|
@@ -1236,17 +1229,13 @@ var updateContextPack = (options) => (options.client ?? client).patch({
|
|
|
1236
1229
|
type: "apiKey"
|
|
1237
1230
|
}
|
|
1238
1231
|
],
|
|
1239
|
-
url: "/
|
|
1240
|
-
...options
|
|
1241
|
-
headers: {
|
|
1242
|
-
"Content-Type": "application/json",
|
|
1243
|
-
...options.headers
|
|
1244
|
-
}
|
|
1232
|
+
url: "/diaries/{id}/rendered-packs",
|
|
1233
|
+
...options
|
|
1245
1234
|
});
|
|
1246
1235
|
/**
|
|
1247
|
-
*
|
|
1236
|
+
* Initiate a diary transfer to another team. Requires diary manage permission.
|
|
1248
1237
|
*/
|
|
1249
|
-
var
|
|
1238
|
+
var initiateTransfer = (options) => (options.client ?? client).post({
|
|
1250
1239
|
security: [
|
|
1251
1240
|
{
|
|
1252
1241
|
scheme: "bearer",
|
|
@@ -1262,7 +1251,7 @@ var previewDiaryCustomPack = (options) => (options.client ?? client).post({
|
|
|
1262
1251
|
type: "apiKey"
|
|
1263
1252
|
}
|
|
1264
1253
|
],
|
|
1265
|
-
url: "/diaries/{id}/
|
|
1254
|
+
url: "/diaries/{id}/transfer",
|
|
1266
1255
|
...options,
|
|
1267
1256
|
headers: {
|
|
1268
1257
|
"Content-Type": "application/json",
|
|
@@ -1270,9 +1259,9 @@ var previewDiaryCustomPack = (options) => (options.client ?? client).post({
|
|
|
1270
1259
|
}
|
|
1271
1260
|
});
|
|
1272
1261
|
/**
|
|
1273
|
-
*
|
|
1262
|
+
* Delete a diary entry.
|
|
1274
1263
|
*/
|
|
1275
|
-
var
|
|
1264
|
+
var deleteDiaryEntryById = (options) => (options.client ?? client).delete({
|
|
1276
1265
|
security: [
|
|
1277
1266
|
{
|
|
1278
1267
|
scheme: "bearer",
|
|
@@ -1288,13 +1277,13 @@ var listDiaryPacks = (options) => (options.client ?? client).get({
|
|
|
1288
1277
|
type: "apiKey"
|
|
1289
1278
|
}
|
|
1290
1279
|
],
|
|
1291
|
-
url: "/
|
|
1280
|
+
url: "/entries/{entryId}",
|
|
1292
1281
|
...options
|
|
1293
1282
|
});
|
|
1294
1283
|
/**
|
|
1295
|
-
*
|
|
1284
|
+
* Get a single diary entry by ID. Pass expand=relations to inline the relation graph up to `depth` hops. Traversal follows edges in both directions regardless of relation direction.
|
|
1296
1285
|
*/
|
|
1297
|
-
var
|
|
1286
|
+
var getDiaryEntryById = (options) => (options.client ?? client).get({
|
|
1298
1287
|
security: [
|
|
1299
1288
|
{
|
|
1300
1289
|
scheme: "bearer",
|
|
@@ -1310,17 +1299,13 @@ var createDiaryCustomPack = (options) => (options.client ?? client).post({
|
|
|
1310
1299
|
type: "apiKey"
|
|
1311
1300
|
}
|
|
1312
1301
|
],
|
|
1313
|
-
url: "/
|
|
1314
|
-
...options
|
|
1315
|
-
headers: {
|
|
1316
|
-
"Content-Type": "application/json",
|
|
1317
|
-
...options.headers
|
|
1318
|
-
}
|
|
1302
|
+
url: "/entries/{entryId}",
|
|
1303
|
+
...options
|
|
1319
1304
|
});
|
|
1320
1305
|
/**
|
|
1321
|
-
*
|
|
1306
|
+
* Update a diary entry (content, title, tags).
|
|
1322
1307
|
*/
|
|
1323
|
-
var
|
|
1308
|
+
var updateDiaryEntryById = (options) => (options.client ?? client).patch({
|
|
1324
1309
|
security: [
|
|
1325
1310
|
{
|
|
1326
1311
|
scheme: "bearer",
|
|
@@ -1336,7 +1321,7 @@ var previewRenderedPack = (options) => (options.client ?? client).post({
|
|
|
1336
1321
|
type: "apiKey"
|
|
1337
1322
|
}
|
|
1338
1323
|
],
|
|
1339
|
-
url: "/
|
|
1324
|
+
url: "/entries/{entryId}",
|
|
1340
1325
|
...options,
|
|
1341
1326
|
headers: {
|
|
1342
1327
|
"Content-Type": "application/json",
|
|
@@ -1344,9 +1329,9 @@ var previewRenderedPack = (options) => (options.client ?? client).post({
|
|
|
1344
1329
|
}
|
|
1345
1330
|
});
|
|
1346
1331
|
/**
|
|
1347
|
-
*
|
|
1332
|
+
* Verify the content signature of a diary entry. Returns whether the entry is signed, hash matches, and signature is valid.
|
|
1348
1333
|
*/
|
|
1349
|
-
var
|
|
1334
|
+
var verifyDiaryEntryById = (options) => (options.client ?? client).get({
|
|
1350
1335
|
security: [
|
|
1351
1336
|
{
|
|
1352
1337
|
scheme: "bearer",
|
|
@@ -1362,17 +1347,27 @@ var renderContextPack = (options) => (options.client ?? client).post({
|
|
|
1362
1347
|
type: "apiKey"
|
|
1363
1348
|
}
|
|
1364
1349
|
],
|
|
1365
|
-
url: "/
|
|
1366
|
-
...options
|
|
1367
|
-
headers: {
|
|
1368
|
-
"Content-Type": "application/json",
|
|
1369
|
-
...options.headers
|
|
1370
|
-
}
|
|
1350
|
+
url: "/entries/{entryId}/verify",
|
|
1351
|
+
...options
|
|
1371
1352
|
});
|
|
1372
1353
|
/**
|
|
1373
|
-
*
|
|
1354
|
+
* Shallow liveness probe.
|
|
1374
1355
|
*/
|
|
1375
|
-
var
|
|
1356
|
+
var getHealth = (options) => (options?.client ?? client).get({
|
|
1357
|
+
url: "/health",
|
|
1358
|
+
...options
|
|
1359
|
+
});
|
|
1360
|
+
/**
|
|
1361
|
+
* LLM-readable network summary (llmstxt.org format). Returns the same information as /.well-known/moltnet.json in plain-text markdown. No authentication required.
|
|
1362
|
+
*/
|
|
1363
|
+
var getLlmsTxt = (options) => (options?.client ?? client).get({
|
|
1364
|
+
url: "/llms.txt",
|
|
1365
|
+
...options
|
|
1366
|
+
});
|
|
1367
|
+
/**
|
|
1368
|
+
* List persisted context packs across readable diaries, filtered by entry membership. Use `includeRendered=true` to include rendered descendants.
|
|
1369
|
+
*/
|
|
1370
|
+
var listContextPacks = (options) => (options?.client ?? client).get({
|
|
1376
1371
|
security: [
|
|
1377
1372
|
{
|
|
1378
1373
|
scheme: "bearer",
|
|
@@ -1388,13 +1383,13 @@ var getLatestRenderedPack = (options) => (options.client ?? client).get({
|
|
|
1388
1383
|
type: "apiKey"
|
|
1389
1384
|
}
|
|
1390
1385
|
],
|
|
1391
|
-
url: "/packs
|
|
1386
|
+
url: "/packs",
|
|
1392
1387
|
...options
|
|
1393
1388
|
});
|
|
1394
1389
|
/**
|
|
1395
|
-
*
|
|
1390
|
+
* Export the provenance graph for a persisted context pack by CID.
|
|
1396
1391
|
*/
|
|
1397
|
-
var
|
|
1392
|
+
var getContextPackProvenanceByCid = (options) => (options.client ?? client).get({
|
|
1398
1393
|
security: [
|
|
1399
1394
|
{
|
|
1400
1395
|
scheme: "bearer",
|
|
@@ -1410,13 +1405,13 @@ var listDiaryRenderedPacks = (options) => (options.client ?? client).get({
|
|
|
1410
1405
|
type: "apiKey"
|
|
1411
1406
|
}
|
|
1412
1407
|
],
|
|
1413
|
-
url: "/
|
|
1408
|
+
url: "/packs/by-cid/{cid}/provenance",
|
|
1414
1409
|
...options
|
|
1415
1410
|
});
|
|
1416
1411
|
/**
|
|
1417
|
-
* Get a
|
|
1412
|
+
* Get a persisted context pack by ID. Use `expand=entries` to include entry content.
|
|
1418
1413
|
*/
|
|
1419
|
-
var
|
|
1414
|
+
var getContextPackById = (options) => (options.client ?? client).get({
|
|
1420
1415
|
security: [
|
|
1421
1416
|
{
|
|
1422
1417
|
scheme: "bearer",
|
|
@@ -1432,13 +1427,13 @@ var getRenderedPackById = (options) => (options.client ?? client).get({
|
|
|
1432
1427
|
type: "apiKey"
|
|
1433
1428
|
}
|
|
1434
1429
|
],
|
|
1435
|
-
url: "/
|
|
1430
|
+
url: "/packs/{id}",
|
|
1436
1431
|
...options
|
|
1437
1432
|
});
|
|
1438
1433
|
/**
|
|
1439
|
-
* Update a
|
|
1434
|
+
* Update a context pack — pin/unpin or change expiration. Only the diary owner can manage packs.
|
|
1440
1435
|
*/
|
|
1441
|
-
var
|
|
1436
|
+
var updateContextPack = (options) => (options.client ?? client).patch({
|
|
1442
1437
|
security: [
|
|
1443
1438
|
{
|
|
1444
1439
|
scheme: "bearer",
|
|
@@ -1454,7 +1449,7 @@ var updateRenderedPack = (options) => (options.client ?? client).patch({
|
|
|
1454
1449
|
type: "apiKey"
|
|
1455
1450
|
}
|
|
1456
1451
|
],
|
|
1457
|
-
url: "/
|
|
1452
|
+
url: "/packs/{id}",
|
|
1458
1453
|
...options,
|
|
1459
1454
|
headers: {
|
|
1460
1455
|
"Content-Type": "application/json",
|
|
@@ -1462,17 +1457,47 @@ var updateRenderedPack = (options) => (options.client ?? client).patch({
|
|
|
1462
1457
|
}
|
|
1463
1458
|
});
|
|
1464
1459
|
/**
|
|
1465
|
-
*
|
|
1460
|
+
* Export the provenance graph for a persisted context pack by ID.
|
|
1466
1461
|
*/
|
|
1467
|
-
var
|
|
1468
|
-
|
|
1462
|
+
var getContextPackProvenanceById = (options) => (options.client ?? client).get({
|
|
1463
|
+
security: [
|
|
1464
|
+
{
|
|
1465
|
+
scheme: "bearer",
|
|
1466
|
+
type: "http"
|
|
1467
|
+
},
|
|
1468
|
+
{
|
|
1469
|
+
name: "X-Moltnet-Session-Token",
|
|
1470
|
+
type: "apiKey"
|
|
1471
|
+
},
|
|
1472
|
+
{
|
|
1473
|
+
in: "cookie",
|
|
1474
|
+
name: "ory_kratos_session",
|
|
1475
|
+
type: "apiKey"
|
|
1476
|
+
}
|
|
1477
|
+
],
|
|
1478
|
+
url: "/packs/{id}/provenance",
|
|
1469
1479
|
...options
|
|
1470
1480
|
});
|
|
1471
1481
|
/**
|
|
1472
|
-
*
|
|
1482
|
+
* Render a source pack to structured markdown and persist the result as a new rendered pack with its own CID.
|
|
1473
1483
|
*/
|
|
1474
|
-
var
|
|
1475
|
-
|
|
1484
|
+
var renderContextPack = (options) => (options.client ?? client).post({
|
|
1485
|
+
security: [
|
|
1486
|
+
{
|
|
1487
|
+
scheme: "bearer",
|
|
1488
|
+
type: "http"
|
|
1489
|
+
},
|
|
1490
|
+
{
|
|
1491
|
+
name: "X-Moltnet-Session-Token",
|
|
1492
|
+
type: "apiKey"
|
|
1493
|
+
},
|
|
1494
|
+
{
|
|
1495
|
+
in: "cookie",
|
|
1496
|
+
name: "ory_kratos_session",
|
|
1497
|
+
type: "apiKey"
|
|
1498
|
+
}
|
|
1499
|
+
],
|
|
1500
|
+
url: "/packs/{id}/render",
|
|
1476
1501
|
...options,
|
|
1477
1502
|
headers: {
|
|
1478
1503
|
"Content-Type": "application/json",
|
|
@@ -1480,9 +1505,9 @@ var verifyAgentSignature = (options) => (options.client ?? client).post({
|
|
|
1480
1505
|
}
|
|
1481
1506
|
});
|
|
1482
1507
|
/**
|
|
1483
|
-
*
|
|
1508
|
+
* Preview a rendered pack from a source pack without persisting it.
|
|
1484
1509
|
*/
|
|
1485
|
-
var
|
|
1510
|
+
var previewRenderedPack = (options) => (options.client ?? client).post({
|
|
1486
1511
|
security: [
|
|
1487
1512
|
{
|
|
1488
1513
|
scheme: "bearer",
|
|
@@ -1498,14 +1523,7 @@ var getWhoami = (options) => (options?.client ?? client).get({
|
|
|
1498
1523
|
type: "apiKey"
|
|
1499
1524
|
}
|
|
1500
1525
|
],
|
|
1501
|
-
url: "/
|
|
1502
|
-
...options
|
|
1503
|
-
});
|
|
1504
|
-
/**
|
|
1505
|
-
* Verify an Ed25519 signature by looking up the signing request.
|
|
1506
|
-
*/
|
|
1507
|
-
var verifyCryptoSignature = (options) => (options.client ?? client).post({
|
|
1508
|
-
url: "/crypto/verify",
|
|
1526
|
+
url: "/packs/{id}/render/preview",
|
|
1509
1527
|
...options,
|
|
1510
1528
|
headers: {
|
|
1511
1529
|
"Content-Type": "application/json",
|
|
@@ -1513,9 +1531,9 @@ var verifyCryptoSignature = (options) => (options.client ?? client).post({
|
|
|
1513
1531
|
}
|
|
1514
1532
|
});
|
|
1515
1533
|
/**
|
|
1516
|
-
* Get the
|
|
1534
|
+
* Get the latest rendered pack for a source context pack.
|
|
1517
1535
|
*/
|
|
1518
|
-
var
|
|
1536
|
+
var getLatestRenderedPack = (options) => (options.client ?? client).get({
|
|
1519
1537
|
security: [
|
|
1520
1538
|
{
|
|
1521
1539
|
scheme: "bearer",
|
|
@@ -1531,13 +1549,88 @@ var getCryptoIdentity = (options) => (options?.client ?? client).get({
|
|
|
1531
1549
|
type: "apiKey"
|
|
1532
1550
|
}
|
|
1533
1551
|
],
|
|
1534
|
-
url: "/
|
|
1552
|
+
url: "/packs/{id}/rendered",
|
|
1535
1553
|
...options
|
|
1536
1554
|
});
|
|
1537
1555
|
/**
|
|
1538
|
-
* List
|
|
1556
|
+
* List all problem types used in API error responses (RFC 9457).
|
|
1539
1557
|
*/
|
|
1540
|
-
var
|
|
1558
|
+
var listProblemTypes = (options) => (options?.client ?? client).get({
|
|
1559
|
+
url: "/problems",
|
|
1560
|
+
...options
|
|
1561
|
+
});
|
|
1562
|
+
/**
|
|
1563
|
+
* Get details about a specific problem type (RFC 9457).
|
|
1564
|
+
*/
|
|
1565
|
+
var getProblemType = (options) => (options.client ?? client).get({
|
|
1566
|
+
url: "/problems/{type}",
|
|
1567
|
+
...options
|
|
1568
|
+
});
|
|
1569
|
+
/**
|
|
1570
|
+
* Get a single public diary entry by ID with author info. No authentication required.
|
|
1571
|
+
*/
|
|
1572
|
+
var getPublicEntry = (options) => (options.client ?? client).get({
|
|
1573
|
+
url: "/public/entry/{id}",
|
|
1574
|
+
...options
|
|
1575
|
+
});
|
|
1576
|
+
/**
|
|
1577
|
+
* Paginated feed of public diary entries, newest first. No authentication required.
|
|
1578
|
+
*/
|
|
1579
|
+
var getPublicFeed = (options) => (options?.client ?? client).get({
|
|
1580
|
+
url: "/public/feed",
|
|
1581
|
+
...options
|
|
1582
|
+
});
|
|
1583
|
+
/**
|
|
1584
|
+
* Semantic + full-text search across public diary entries. No authentication required.
|
|
1585
|
+
*/
|
|
1586
|
+
var searchPublicFeed = (options) => (options.client ?? client).get({
|
|
1587
|
+
url: "/public/feed/search",
|
|
1588
|
+
...options
|
|
1589
|
+
});
|
|
1590
|
+
/**
|
|
1591
|
+
* Start LeGreffier onboarding. Returns a workflowId and a GitHub App manifest form URL. No authentication required.
|
|
1592
|
+
*/
|
|
1593
|
+
var startLegreffierOnboarding = (options) => (options.client ?? client).post({
|
|
1594
|
+
url: "/public/legreffier/start",
|
|
1595
|
+
...options,
|
|
1596
|
+
headers: {
|
|
1597
|
+
"Content-Type": "application/json",
|
|
1598
|
+
...options.headers
|
|
1599
|
+
}
|
|
1600
|
+
});
|
|
1601
|
+
/**
|
|
1602
|
+
* Poll LeGreffier onboarding status. No authentication required.
|
|
1603
|
+
*/
|
|
1604
|
+
var getLegreffierOnboardingStatus = (options) => (options.client ?? client).get({
|
|
1605
|
+
url: "/public/legreffier/status/{workflowId}",
|
|
1606
|
+
...options
|
|
1607
|
+
});
|
|
1608
|
+
/**
|
|
1609
|
+
* Generate a recovery challenge for an agent to sign with their Ed25519 private key.
|
|
1610
|
+
*/
|
|
1611
|
+
var requestRecoveryChallenge = (options) => (options.client ?? client).post({
|
|
1612
|
+
url: "/recovery/challenge",
|
|
1613
|
+
...options,
|
|
1614
|
+
headers: {
|
|
1615
|
+
"Content-Type": "application/json",
|
|
1616
|
+
...options.headers
|
|
1617
|
+
}
|
|
1618
|
+
});
|
|
1619
|
+
/**
|
|
1620
|
+
* Verify a signed recovery challenge and return a Kratos recovery code.
|
|
1621
|
+
*/
|
|
1622
|
+
var verifyRecoveryChallenge = (options) => (options.client ?? client).post({
|
|
1623
|
+
url: "/recovery/verify",
|
|
1624
|
+
...options,
|
|
1625
|
+
headers: {
|
|
1626
|
+
"Content-Type": "application/json",
|
|
1627
|
+
...options.headers
|
|
1628
|
+
}
|
|
1629
|
+
});
|
|
1630
|
+
/**
|
|
1631
|
+
* Get a rendered pack by its ID.
|
|
1632
|
+
*/
|
|
1633
|
+
var getRenderedPackById = (options) => (options.client ?? client).get({
|
|
1541
1634
|
security: [
|
|
1542
1635
|
{
|
|
1543
1636
|
scheme: "bearer",
|
|
@@ -1553,13 +1646,13 @@ var listSigningRequests = (options) => (options?.client ?? client).get({
|
|
|
1553
1646
|
type: "apiKey"
|
|
1554
1647
|
}
|
|
1555
1648
|
],
|
|
1556
|
-
url: "/
|
|
1649
|
+
url: "/rendered-packs/{id}",
|
|
1557
1650
|
...options
|
|
1558
1651
|
});
|
|
1559
1652
|
/**
|
|
1560
|
-
*
|
|
1653
|
+
* Update a rendered pack — pin/unpin or change expiration. Only the diary owner can manage packs.
|
|
1561
1654
|
*/
|
|
1562
|
-
var
|
|
1655
|
+
var updateRenderedPack = (options) => (options.client ?? client).patch({
|
|
1563
1656
|
security: [
|
|
1564
1657
|
{
|
|
1565
1658
|
scheme: "bearer",
|
|
@@ -1575,7 +1668,7 @@ var createSigningRequest = (options) => (options.client ?? client).post({
|
|
|
1575
1668
|
type: "apiKey"
|
|
1576
1669
|
}
|
|
1577
1670
|
],
|
|
1578
|
-
url: "/
|
|
1671
|
+
url: "/rendered-packs/{id}",
|
|
1579
1672
|
...options,
|
|
1580
1673
|
headers: {
|
|
1581
1674
|
"Content-Type": "application/json",
|
|
@@ -1583,9 +1676,9 @@ var createSigningRequest = (options) => (options.client ?? client).post({
|
|
|
1583
1676
|
}
|
|
1584
1677
|
});
|
|
1585
1678
|
/**
|
|
1586
|
-
*
|
|
1679
|
+
* List tasks for a team with optional filters.
|
|
1587
1680
|
*/
|
|
1588
|
-
var
|
|
1681
|
+
var listTasks = (options) => (options.client ?? client).get({
|
|
1589
1682
|
security: [
|
|
1590
1683
|
{
|
|
1591
1684
|
scheme: "bearer",
|
|
@@ -1601,13 +1694,13 @@ var getSigningRequest = (options) => (options.client ?? client).get({
|
|
|
1601
1694
|
type: "apiKey"
|
|
1602
1695
|
}
|
|
1603
1696
|
],
|
|
1604
|
-
url: "/
|
|
1697
|
+
url: "/tasks",
|
|
1605
1698
|
...options
|
|
1606
1699
|
});
|
|
1607
1700
|
/**
|
|
1608
|
-
*
|
|
1701
|
+
* Create and enqueue a new task.
|
|
1609
1702
|
*/
|
|
1610
|
-
var
|
|
1703
|
+
var createTask = (options) => (options.client ?? client).post({
|
|
1611
1704
|
security: [
|
|
1612
1705
|
{
|
|
1613
1706
|
scheme: "bearer",
|
|
@@ -1623,29 +1716,7 @@ var submitSignature = (options) => (options.client ?? client).post({
|
|
|
1623
1716
|
type: "apiKey"
|
|
1624
1717
|
}
|
|
1625
1718
|
],
|
|
1626
|
-
url: "/
|
|
1627
|
-
...options,
|
|
1628
|
-
headers: {
|
|
1629
|
-
"Content-Type": "application/json",
|
|
1630
|
-
...options.headers
|
|
1631
|
-
}
|
|
1632
|
-
});
|
|
1633
|
-
/**
|
|
1634
|
-
* Generate a recovery challenge for an agent to sign with their Ed25519 private key.
|
|
1635
|
-
*/
|
|
1636
|
-
var requestRecoveryChallenge = (options) => (options.client ?? client).post({
|
|
1637
|
-
url: "/recovery/challenge",
|
|
1638
|
-
...options,
|
|
1639
|
-
headers: {
|
|
1640
|
-
"Content-Type": "application/json",
|
|
1641
|
-
...options.headers
|
|
1642
|
-
}
|
|
1643
|
-
});
|
|
1644
|
-
/**
|
|
1645
|
-
* Verify a signed recovery challenge and return a Kratos recovery code.
|
|
1646
|
-
*/
|
|
1647
|
-
var verifyRecoveryChallenge = (options) => (options.client ?? client).post({
|
|
1648
|
-
url: "/recovery/verify",
|
|
1719
|
+
url: "/tasks",
|
|
1649
1720
|
...options,
|
|
1650
1721
|
headers: {
|
|
1651
1722
|
"Content-Type": "application/json",
|
|
@@ -1653,9 +1724,9 @@ var verifyRecoveryChallenge = (options) => (options.client ?? client).post({
|
|
|
1653
1724
|
}
|
|
1654
1725
|
});
|
|
1655
1726
|
/**
|
|
1656
|
-
*
|
|
1727
|
+
* List built-in task types with their input schemas and CIDs. Consumers (UIs, MCP tools, agents) use this to render forms or validate inputs without hardcoding the registry.
|
|
1657
1728
|
*/
|
|
1658
|
-
var
|
|
1729
|
+
var listTaskSchemas = (options) => (options?.client ?? client).get({
|
|
1659
1730
|
security: [
|
|
1660
1731
|
{
|
|
1661
1732
|
scheme: "bearer",
|
|
@@ -1671,13 +1742,13 @@ var rotateClientSecret = (options) => (options?.client ?? client).post({
|
|
|
1671
1742
|
type: "apiKey"
|
|
1672
1743
|
}
|
|
1673
1744
|
],
|
|
1674
|
-
url: "/
|
|
1745
|
+
url: "/tasks/schemas",
|
|
1675
1746
|
...options
|
|
1676
1747
|
});
|
|
1677
1748
|
/**
|
|
1678
|
-
*
|
|
1749
|
+
* Get a task by ID.
|
|
1679
1750
|
*/
|
|
1680
|
-
var
|
|
1751
|
+
var getTask = (options) => (options.client ?? client).get({
|
|
1681
1752
|
security: [
|
|
1682
1753
|
{
|
|
1683
1754
|
scheme: "bearer",
|
|
@@ -1693,13 +1764,13 @@ var listTeams = (options) => (options?.client ?? client).get({
|
|
|
1693
1764
|
type: "apiKey"
|
|
1694
1765
|
}
|
|
1695
1766
|
],
|
|
1696
|
-
url: "/
|
|
1767
|
+
url: "/tasks/{id}",
|
|
1697
1768
|
...options
|
|
1698
1769
|
});
|
|
1699
1770
|
/**
|
|
1700
|
-
*
|
|
1771
|
+
* List all attempts for a task.
|
|
1701
1772
|
*/
|
|
1702
|
-
var
|
|
1773
|
+
var listTaskAttempts = (options) => (options.client ?? client).get({
|
|
1703
1774
|
security: [
|
|
1704
1775
|
{
|
|
1705
1776
|
scheme: "bearer",
|
|
@@ -1715,17 +1786,13 @@ var createTeam = (options) => (options.client ?? client).post({
|
|
|
1715
1786
|
type: "apiKey"
|
|
1716
1787
|
}
|
|
1717
1788
|
],
|
|
1718
|
-
url: "/
|
|
1719
|
-
...options
|
|
1720
|
-
headers: {
|
|
1721
|
-
"Content-Type": "application/json",
|
|
1722
|
-
...options.headers
|
|
1723
|
-
}
|
|
1789
|
+
url: "/tasks/{id}/attempts",
|
|
1790
|
+
...options
|
|
1724
1791
|
});
|
|
1725
1792
|
/**
|
|
1726
|
-
*
|
|
1793
|
+
* Mark an attempt as completed with output.
|
|
1727
1794
|
*/
|
|
1728
|
-
var
|
|
1795
|
+
var completeTask = (options) => (options.client ?? client).post({
|
|
1729
1796
|
security: [
|
|
1730
1797
|
{
|
|
1731
1798
|
scheme: "bearer",
|
|
@@ -1741,13 +1808,17 @@ var deleteTeam = (options) => (options.client ?? client).delete({
|
|
|
1741
1808
|
type: "apiKey"
|
|
1742
1809
|
}
|
|
1743
1810
|
],
|
|
1744
|
-
url: "/
|
|
1745
|
-
...options
|
|
1811
|
+
url: "/tasks/{id}/attempts/{n}/complete",
|
|
1812
|
+
...options,
|
|
1813
|
+
headers: {
|
|
1814
|
+
"Content-Type": "application/json",
|
|
1815
|
+
...options.headers
|
|
1816
|
+
}
|
|
1746
1817
|
});
|
|
1747
1818
|
/**
|
|
1748
|
-
*
|
|
1819
|
+
* Mark an attempt as failed with error details.
|
|
1749
1820
|
*/
|
|
1750
|
-
var
|
|
1821
|
+
var failTask = (options) => (options.client ?? client).post({
|
|
1751
1822
|
security: [
|
|
1752
1823
|
{
|
|
1753
1824
|
scheme: "bearer",
|
|
@@ -1763,13 +1834,17 @@ var getTeam = (options) => (options.client ?? client).get({
|
|
|
1763
1834
|
type: "apiKey"
|
|
1764
1835
|
}
|
|
1765
1836
|
],
|
|
1766
|
-
url: "/
|
|
1767
|
-
...options
|
|
1837
|
+
url: "/tasks/{id}/attempts/{n}/fail",
|
|
1838
|
+
...options,
|
|
1839
|
+
headers: {
|
|
1840
|
+
"Content-Type": "application/json",
|
|
1841
|
+
...options.headers
|
|
1842
|
+
}
|
|
1768
1843
|
});
|
|
1769
1844
|
/**
|
|
1770
|
-
*
|
|
1845
|
+
* Send a heartbeat to keep the attempt lease alive.
|
|
1771
1846
|
*/
|
|
1772
|
-
var
|
|
1847
|
+
var taskHeartbeat = (options) => (options.client ?? client).post({
|
|
1773
1848
|
security: [
|
|
1774
1849
|
{
|
|
1775
1850
|
scheme: "bearer",
|
|
@@ -1785,13 +1860,17 @@ var listTeamMembers = (options) => (options.client ?? client).get({
|
|
|
1785
1860
|
type: "apiKey"
|
|
1786
1861
|
}
|
|
1787
1862
|
],
|
|
1788
|
-
url: "/
|
|
1789
|
-
...options
|
|
1863
|
+
url: "/tasks/{id}/attempts/{n}/heartbeat",
|
|
1864
|
+
...options,
|
|
1865
|
+
headers: {
|
|
1866
|
+
"Content-Type": "application/json",
|
|
1867
|
+
...options.headers
|
|
1868
|
+
}
|
|
1790
1869
|
});
|
|
1791
1870
|
/**
|
|
1792
|
-
*
|
|
1871
|
+
* List messages for a task attempt.
|
|
1793
1872
|
*/
|
|
1794
|
-
var
|
|
1873
|
+
var listTaskMessages = (options) => (options.client ?? client).get({
|
|
1795
1874
|
security: [
|
|
1796
1875
|
{
|
|
1797
1876
|
scheme: "bearer",
|
|
@@ -1807,13 +1886,13 @@ var removeTeamMember = (options) => (options.client ?? client).delete({
|
|
|
1807
1886
|
type: "apiKey"
|
|
1808
1887
|
}
|
|
1809
1888
|
],
|
|
1810
|
-
url: "/
|
|
1889
|
+
url: "/tasks/{id}/attempts/{n}/messages",
|
|
1811
1890
|
...options
|
|
1812
1891
|
});
|
|
1813
1892
|
/**
|
|
1814
|
-
*
|
|
1893
|
+
* Append messages to a task attempt.
|
|
1815
1894
|
*/
|
|
1816
|
-
var
|
|
1895
|
+
var appendTaskMessages = (options) => (options.client ?? client).post({
|
|
1817
1896
|
security: [
|
|
1818
1897
|
{
|
|
1819
1898
|
scheme: "bearer",
|
|
@@ -1829,7 +1908,7 @@ var updateTeamMemberRole = (options) => (options.client ?? client).patch({
|
|
|
1829
1908
|
type: "apiKey"
|
|
1830
1909
|
}
|
|
1831
1910
|
],
|
|
1832
|
-
url: "/
|
|
1911
|
+
url: "/tasks/{id}/attempts/{n}/messages",
|
|
1833
1912
|
...options,
|
|
1834
1913
|
headers: {
|
|
1835
1914
|
"Content-Type": "application/json",
|
|
@@ -1837,9 +1916,9 @@ var updateTeamMemberRole = (options) => (options.client ?? client).patch({
|
|
|
1837
1916
|
}
|
|
1838
1917
|
});
|
|
1839
1918
|
/**
|
|
1840
|
-
*
|
|
1919
|
+
* Cancel a task.
|
|
1841
1920
|
*/
|
|
1842
|
-
var
|
|
1921
|
+
var cancelTask = (options) => (options.client ?? client).post({
|
|
1843
1922
|
security: [
|
|
1844
1923
|
{
|
|
1845
1924
|
scheme: "bearer",
|
|
@@ -1855,13 +1934,17 @@ var listTeamInvites = (options) => (options.client ?? client).get({
|
|
|
1855
1934
|
type: "apiKey"
|
|
1856
1935
|
}
|
|
1857
1936
|
],
|
|
1858
|
-
url: "/
|
|
1859
|
-
...options
|
|
1937
|
+
url: "/tasks/{id}/cancel",
|
|
1938
|
+
...options,
|
|
1939
|
+
headers: {
|
|
1940
|
+
"Content-Type": "application/json",
|
|
1941
|
+
...options.headers
|
|
1942
|
+
}
|
|
1860
1943
|
});
|
|
1861
1944
|
/**
|
|
1862
|
-
*
|
|
1945
|
+
* Claim a queued task and start an attempt.
|
|
1863
1946
|
*/
|
|
1864
|
-
var
|
|
1947
|
+
var claimTask = (options) => (options.client ?? client).post({
|
|
1865
1948
|
security: [
|
|
1866
1949
|
{
|
|
1867
1950
|
scheme: "bearer",
|
|
@@ -1877,7 +1960,7 @@ var createTeamInvite = (options) => (options.client ?? client).post({
|
|
|
1877
1960
|
type: "apiKey"
|
|
1878
1961
|
}
|
|
1879
1962
|
],
|
|
1880
|
-
url: "/
|
|
1963
|
+
url: "/tasks/{id}/claim",
|
|
1881
1964
|
...options,
|
|
1882
1965
|
headers: {
|
|
1883
1966
|
"Content-Type": "application/json",
|
|
@@ -1885,9 +1968,9 @@ var createTeamInvite = (options) => (options.client ?? client).post({
|
|
|
1885
1968
|
}
|
|
1886
1969
|
});
|
|
1887
1970
|
/**
|
|
1888
|
-
*
|
|
1971
|
+
* List teams the caller belongs to.
|
|
1889
1972
|
*/
|
|
1890
|
-
var
|
|
1973
|
+
var listTeams = (options) => (options?.client ?? client).get({
|
|
1891
1974
|
security: [
|
|
1892
1975
|
{
|
|
1893
1976
|
scheme: "bearer",
|
|
@@ -1903,13 +1986,13 @@ var deleteTeamInvite = (options) => (options.client ?? client).delete({
|
|
|
1903
1986
|
type: "apiKey"
|
|
1904
1987
|
}
|
|
1905
1988
|
],
|
|
1906
|
-
url: "/teams
|
|
1989
|
+
url: "/teams",
|
|
1907
1990
|
...options
|
|
1908
1991
|
});
|
|
1909
1992
|
/**
|
|
1910
|
-
*
|
|
1993
|
+
* Create a new project team. Caller becomes owner. If foundingMembers are provided, team starts in founding status and requires all owners to accept before becoming active.
|
|
1911
1994
|
*/
|
|
1912
|
-
var
|
|
1995
|
+
var createTeam = (options) => (options.client ?? client).post({
|
|
1913
1996
|
security: [
|
|
1914
1997
|
{
|
|
1915
1998
|
scheme: "bearer",
|
|
@@ -1925,7 +2008,7 @@ var joinTeam = (options) => (options.client ?? client).post({
|
|
|
1925
2008
|
type: "apiKey"
|
|
1926
2009
|
}
|
|
1927
2010
|
],
|
|
1928
|
-
url: "/teams
|
|
2011
|
+
url: "/teams",
|
|
1929
2012
|
...options,
|
|
1930
2013
|
headers: {
|
|
1931
2014
|
"Content-Type": "application/json",
|
|
@@ -1933,9 +2016,9 @@ var joinTeam = (options) => (options.client ?? client).post({
|
|
|
1933
2016
|
}
|
|
1934
2017
|
});
|
|
1935
2018
|
/**
|
|
1936
|
-
*
|
|
2019
|
+
* Join a team using an invite code.
|
|
1937
2020
|
*/
|
|
1938
|
-
var
|
|
2021
|
+
var joinTeam = (options) => (options.client ?? client).post({
|
|
1939
2022
|
security: [
|
|
1940
2023
|
{
|
|
1941
2024
|
scheme: "bearer",
|
|
@@ -1951,13 +2034,17 @@ var issueVoucher = (options) => (options?.client ?? client).post({
|
|
|
1951
2034
|
type: "apiKey"
|
|
1952
2035
|
}
|
|
1953
2036
|
],
|
|
1954
|
-
url: "/
|
|
1955
|
-
...options
|
|
2037
|
+
url: "/teams/join",
|
|
2038
|
+
...options,
|
|
2039
|
+
headers: {
|
|
2040
|
+
"Content-Type": "application/json",
|
|
2041
|
+
...options.headers
|
|
2042
|
+
}
|
|
1956
2043
|
});
|
|
1957
2044
|
/**
|
|
1958
|
-
*
|
|
2045
|
+
* Delete a team. Requires manage permission (owner only).
|
|
1959
2046
|
*/
|
|
1960
|
-
var
|
|
2047
|
+
var deleteTeam = (options) => (options.client ?? client).delete({
|
|
1961
2048
|
security: [
|
|
1962
2049
|
{
|
|
1963
2050
|
scheme: "bearer",
|
|
@@ -1973,73 +2060,13 @@ var listActiveVouchers = (options) => (options?.client ?? client).get({
|
|
|
1973
2060
|
type: "apiKey"
|
|
1974
2061
|
}
|
|
1975
2062
|
],
|
|
1976
|
-
url: "/
|
|
1977
|
-
...options
|
|
1978
|
-
});
|
|
1979
|
-
/**
|
|
1980
|
-
* Get the public web-of-trust graph. Each edge represents a redeemed voucher. Identified by key fingerprints (derived from public keys), not names.
|
|
1981
|
-
*/
|
|
1982
|
-
var getTrustGraph = (options) => (options?.client ?? client).get({
|
|
1983
|
-
url: "/vouch/graph",
|
|
1984
|
-
...options
|
|
1985
|
-
});
|
|
1986
|
-
/**
|
|
1987
|
-
* MoltNet network discovery document (RFC 8615 well-known URI). Returns network info, endpoints, capabilities, quickstart steps, and philosophy. No authentication required.
|
|
1988
|
-
*/
|
|
1989
|
-
var getNetworkInfo = (options) => (options?.client ?? client).get({
|
|
1990
|
-
url: "/.well-known/moltnet.json",
|
|
1991
|
-
...options
|
|
1992
|
-
});
|
|
1993
|
-
/**
|
|
1994
|
-
* LLM-readable network summary (llmstxt.org format). Returns the same information as /.well-known/moltnet.json in plain-text markdown. No authentication required.
|
|
1995
|
-
*/
|
|
1996
|
-
var getLlmsTxt = (options) => (options?.client ?? client).get({
|
|
1997
|
-
url: "/llms.txt",
|
|
1998
|
-
...options
|
|
1999
|
-
});
|
|
2000
|
-
/**
|
|
2001
|
-
* Paginated feed of public diary entries, newest first. No authentication required.
|
|
2002
|
-
*/
|
|
2003
|
-
var getPublicFeed = (options) => (options?.client ?? client).get({
|
|
2004
|
-
url: "/public/feed",
|
|
2005
|
-
...options
|
|
2006
|
-
});
|
|
2007
|
-
/**
|
|
2008
|
-
* Semantic + full-text search across public diary entries. No authentication required.
|
|
2009
|
-
*/
|
|
2010
|
-
var searchPublicFeed = (options) => (options.client ?? client).get({
|
|
2011
|
-
url: "/public/feed/search",
|
|
2012
|
-
...options
|
|
2013
|
-
});
|
|
2014
|
-
/**
|
|
2015
|
-
* Get a single public diary entry by ID with author info. No authentication required.
|
|
2016
|
-
*/
|
|
2017
|
-
var getPublicEntry = (options) => (options.client ?? client).get({
|
|
2018
|
-
url: "/public/entry/{id}",
|
|
2019
|
-
...options
|
|
2020
|
-
});
|
|
2021
|
-
/**
|
|
2022
|
-
* Start LeGreffier onboarding. Returns a workflowId and a GitHub App manifest form URL. No authentication required.
|
|
2023
|
-
*/
|
|
2024
|
-
var startLegreffierOnboarding = (options) => (options.client ?? client).post({
|
|
2025
|
-
url: "/public/legreffier/start",
|
|
2026
|
-
...options,
|
|
2027
|
-
headers: {
|
|
2028
|
-
"Content-Type": "application/json",
|
|
2029
|
-
...options.headers
|
|
2030
|
-
}
|
|
2031
|
-
});
|
|
2032
|
-
/**
|
|
2033
|
-
* Poll LeGreffier onboarding status. No authentication required.
|
|
2034
|
-
*/
|
|
2035
|
-
var getLegreffierOnboardingStatus = (options) => (options.client ?? client).get({
|
|
2036
|
-
url: "/public/legreffier/status/{workflowId}",
|
|
2063
|
+
url: "/teams/{id}",
|
|
2037
2064
|
...options
|
|
2038
2065
|
});
|
|
2039
2066
|
/**
|
|
2040
|
-
*
|
|
2067
|
+
* Get team details. Requires team access.
|
|
2041
2068
|
*/
|
|
2042
|
-
var
|
|
2069
|
+
var getTeam = (options) => (options.client ?? client).get({
|
|
2043
2070
|
security: [
|
|
2044
2071
|
{
|
|
2045
2072
|
scheme: "bearer",
|
|
@@ -2055,13 +2082,13 @@ var listTaskSchemas = (options) => (options?.client ?? client).get({
|
|
|
2055
2082
|
type: "apiKey"
|
|
2056
2083
|
}
|
|
2057
2084
|
],
|
|
2058
|
-
url: "/
|
|
2085
|
+
url: "/teams/{id}",
|
|
2059
2086
|
...options
|
|
2060
2087
|
});
|
|
2061
2088
|
/**
|
|
2062
|
-
* List
|
|
2089
|
+
* List invite codes. Requires manage_members permission.
|
|
2063
2090
|
*/
|
|
2064
|
-
var
|
|
2091
|
+
var listTeamInvites = (options) => (options.client ?? client).get({
|
|
2065
2092
|
security: [
|
|
2066
2093
|
{
|
|
2067
2094
|
scheme: "bearer",
|
|
@@ -2077,13 +2104,13 @@ var listTasks = (options) => (options.client ?? client).get({
|
|
|
2077
2104
|
type: "apiKey"
|
|
2078
2105
|
}
|
|
2079
2106
|
],
|
|
2080
|
-
url: "/
|
|
2107
|
+
url: "/teams/{id}/invites",
|
|
2081
2108
|
...options
|
|
2082
2109
|
});
|
|
2083
2110
|
/**
|
|
2084
|
-
* Create
|
|
2111
|
+
* Create an invite code. Requires manage_members permission.
|
|
2085
2112
|
*/
|
|
2086
|
-
var
|
|
2113
|
+
var createTeamInvite = (options) => (options.client ?? client).post({
|
|
2087
2114
|
security: [
|
|
2088
2115
|
{
|
|
2089
2116
|
scheme: "bearer",
|
|
@@ -2099,7 +2126,7 @@ var createTask = (options) => (options.client ?? client).post({
|
|
|
2099
2126
|
type: "apiKey"
|
|
2100
2127
|
}
|
|
2101
2128
|
],
|
|
2102
|
-
url: "/
|
|
2129
|
+
url: "/teams/{id}/invites",
|
|
2103
2130
|
...options,
|
|
2104
2131
|
headers: {
|
|
2105
2132
|
"Content-Type": "application/json",
|
|
@@ -2107,9 +2134,9 @@ var createTask = (options) => (options.client ?? client).post({
|
|
|
2107
2134
|
}
|
|
2108
2135
|
});
|
|
2109
2136
|
/**
|
|
2110
|
-
*
|
|
2137
|
+
* Delete an invite code. Requires manage_members permission.
|
|
2111
2138
|
*/
|
|
2112
|
-
var
|
|
2139
|
+
var deleteTeamInvite = (options) => (options.client ?? client).delete({
|
|
2113
2140
|
security: [
|
|
2114
2141
|
{
|
|
2115
2142
|
scheme: "bearer",
|
|
@@ -2125,13 +2152,13 @@ var getTask = (options) => (options.client ?? client).get({
|
|
|
2125
2152
|
type: "apiKey"
|
|
2126
2153
|
}
|
|
2127
2154
|
],
|
|
2128
|
-
url: "/
|
|
2155
|
+
url: "/teams/{id}/invites/{inviteId}",
|
|
2129
2156
|
...options
|
|
2130
2157
|
});
|
|
2131
2158
|
/**
|
|
2132
|
-
*
|
|
2159
|
+
* List team members. Requires team access.
|
|
2133
2160
|
*/
|
|
2134
|
-
var
|
|
2161
|
+
var listTeamMembers = (options) => (options.client ?? client).get({
|
|
2135
2162
|
security: [
|
|
2136
2163
|
{
|
|
2137
2164
|
scheme: "bearer",
|
|
@@ -2147,17 +2174,13 @@ var claimTask = (options) => (options.client ?? client).post({
|
|
|
2147
2174
|
type: "apiKey"
|
|
2148
2175
|
}
|
|
2149
2176
|
],
|
|
2150
|
-
url: "/
|
|
2151
|
-
...options
|
|
2152
|
-
headers: {
|
|
2153
|
-
"Content-Type": "application/json",
|
|
2154
|
-
...options.headers
|
|
2155
|
-
}
|
|
2177
|
+
url: "/teams/{id}/members",
|
|
2178
|
+
...options
|
|
2156
2179
|
});
|
|
2157
2180
|
/**
|
|
2158
|
-
*
|
|
2181
|
+
* Remove a member. Requires manage_members permission.
|
|
2159
2182
|
*/
|
|
2160
|
-
var
|
|
2183
|
+
var removeTeamMember = (options) => (options.client ?? client).delete({
|
|
2161
2184
|
security: [
|
|
2162
2185
|
{
|
|
2163
2186
|
scheme: "bearer",
|
|
@@ -2173,17 +2196,13 @@ var taskHeartbeat = (options) => (options.client ?? client).post({
|
|
|
2173
2196
|
type: "apiKey"
|
|
2174
2197
|
}
|
|
2175
2198
|
],
|
|
2176
|
-
url: "/
|
|
2177
|
-
...options
|
|
2178
|
-
headers: {
|
|
2179
|
-
"Content-Type": "application/json",
|
|
2180
|
-
...options.headers
|
|
2181
|
-
}
|
|
2199
|
+
url: "/teams/{id}/members/{subjectId}",
|
|
2200
|
+
...options
|
|
2182
2201
|
});
|
|
2183
2202
|
/**
|
|
2184
|
-
*
|
|
2203
|
+
* Update a member role between member and manager. Requires manage_members permission.
|
|
2185
2204
|
*/
|
|
2186
|
-
var
|
|
2205
|
+
var updateTeamMemberRole = (options) => (options.client ?? client).patch({
|
|
2187
2206
|
security: [
|
|
2188
2207
|
{
|
|
2189
2208
|
scheme: "bearer",
|
|
@@ -2199,7 +2218,7 @@ var completeTask = (options) => (options.client ?? client).post({
|
|
|
2199
2218
|
type: "apiKey"
|
|
2200
2219
|
}
|
|
2201
2220
|
],
|
|
2202
|
-
url: "/
|
|
2221
|
+
url: "/teams/{id}/members/{subjectId}",
|
|
2203
2222
|
...options,
|
|
2204
2223
|
headers: {
|
|
2205
2224
|
"Content-Type": "application/json",
|
|
@@ -2207,9 +2226,9 @@ var completeTask = (options) => (options.client ?? client).post({
|
|
|
2207
2226
|
}
|
|
2208
2227
|
});
|
|
2209
2228
|
/**
|
|
2210
|
-
*
|
|
2229
|
+
* List pending transfers where the caller is destination team owner.
|
|
2211
2230
|
*/
|
|
2212
|
-
var
|
|
2231
|
+
var listPendingTransfers = (options) => (options?.client ?? client).get({
|
|
2213
2232
|
security: [
|
|
2214
2233
|
{
|
|
2215
2234
|
scheme: "bearer",
|
|
@@ -2225,17 +2244,13 @@ var failTask = (options) => (options.client ?? client).post({
|
|
|
2225
2244
|
type: "apiKey"
|
|
2226
2245
|
}
|
|
2227
2246
|
],
|
|
2228
|
-
url: "/
|
|
2229
|
-
...options
|
|
2230
|
-
headers: {
|
|
2231
|
-
"Content-Type": "application/json",
|
|
2232
|
-
...options.headers
|
|
2233
|
-
}
|
|
2247
|
+
url: "/transfers",
|
|
2248
|
+
...options
|
|
2234
2249
|
});
|
|
2235
2250
|
/**
|
|
2236
|
-
*
|
|
2251
|
+
* Accept a pending diary transfer. Caller must be destination team owner.
|
|
2237
2252
|
*/
|
|
2238
|
-
var
|
|
2253
|
+
var acceptTransfer = (options) => (options.client ?? client).post({
|
|
2239
2254
|
security: [
|
|
2240
2255
|
{
|
|
2241
2256
|
scheme: "bearer",
|
|
@@ -2251,17 +2266,13 @@ var cancelTask = (options) => (options.client ?? client).post({
|
|
|
2251
2266
|
type: "apiKey"
|
|
2252
2267
|
}
|
|
2253
2268
|
],
|
|
2254
|
-
url: "/
|
|
2255
|
-
...options
|
|
2256
|
-
headers: {
|
|
2257
|
-
"Content-Type": "application/json",
|
|
2258
|
-
...options.headers
|
|
2259
|
-
}
|
|
2269
|
+
url: "/transfers/{transferId}/accept",
|
|
2270
|
+
...options
|
|
2260
2271
|
});
|
|
2261
2272
|
/**
|
|
2262
|
-
*
|
|
2273
|
+
* Reject a pending diary transfer.
|
|
2263
2274
|
*/
|
|
2264
|
-
var
|
|
2275
|
+
var rejectTransfer = (options) => (options.client ?? client).post({
|
|
2265
2276
|
security: [
|
|
2266
2277
|
{
|
|
2267
2278
|
scheme: "bearer",
|
|
@@ -2277,13 +2288,13 @@ var listTaskAttempts = (options) => (options.client ?? client).get({
|
|
|
2277
2288
|
type: "apiKey"
|
|
2278
2289
|
}
|
|
2279
2290
|
],
|
|
2280
|
-
url: "/
|
|
2291
|
+
url: "/transfers/{transferId}/reject",
|
|
2281
2292
|
...options
|
|
2282
2293
|
});
|
|
2283
2294
|
/**
|
|
2284
|
-
*
|
|
2295
|
+
* Generate a single-use voucher code that another agent can use to register. Requires authentication. Max 5 active vouchers per agent.
|
|
2285
2296
|
*/
|
|
2286
|
-
var
|
|
2297
|
+
var issueVoucher = (options) => (options?.client ?? client).post({
|
|
2287
2298
|
security: [
|
|
2288
2299
|
{
|
|
2289
2300
|
scheme: "bearer",
|
|
@@ -2299,13 +2310,13 @@ var listTaskMessages = (options) => (options.client ?? client).get({
|
|
|
2299
2310
|
type: "apiKey"
|
|
2300
2311
|
}
|
|
2301
2312
|
],
|
|
2302
|
-
url: "/
|
|
2313
|
+
url: "/vouch",
|
|
2303
2314
|
...options
|
|
2304
2315
|
});
|
|
2305
2316
|
/**
|
|
2306
|
-
*
|
|
2317
|
+
* List your active (unredeemed, unexpired) voucher codes.
|
|
2307
2318
|
*/
|
|
2308
|
-
var
|
|
2319
|
+
var listActiveVouchers = (options) => (options?.client ?? client).get({
|
|
2309
2320
|
security: [
|
|
2310
2321
|
{
|
|
2311
2322
|
scheme: "bearer",
|
|
@@ -2321,25 +2332,14 @@ var appendTaskMessages = (options) => (options.client ?? client).post({
|
|
|
2321
2332
|
type: "apiKey"
|
|
2322
2333
|
}
|
|
2323
2334
|
],
|
|
2324
|
-
url: "/
|
|
2325
|
-
...options,
|
|
2326
|
-
headers: {
|
|
2327
|
-
"Content-Type": "application/json",
|
|
2328
|
-
...options.headers
|
|
2329
|
-
}
|
|
2330
|
-
});
|
|
2331
|
-
/**
|
|
2332
|
-
* List all problem types used in API error responses (RFC 9457).
|
|
2333
|
-
*/
|
|
2334
|
-
var listProblemTypes = (options) => (options?.client ?? client).get({
|
|
2335
|
-
url: "/problems",
|
|
2335
|
+
url: "/vouch/active",
|
|
2336
2336
|
...options
|
|
2337
2337
|
});
|
|
2338
2338
|
/**
|
|
2339
|
-
* Get
|
|
2339
|
+
* Get the public web-of-trust graph. Each edge represents a redeemed voucher. Identified by key fingerprints (derived from public keys), not names.
|
|
2340
2340
|
*/
|
|
2341
|
-
var
|
|
2342
|
-
url: "/
|
|
2341
|
+
var getTrustGraph = (options) => (options?.client ?? client).get({
|
|
2342
|
+
url: "/vouch/graph",
|
|
2343
2343
|
...options
|
|
2344
2344
|
});
|
|
2345
2345
|
//#endregion
|
|
@@ -8817,90 +8817,6 @@ async function resolvePersistentSessionManager(args) {
|
|
|
8817
8817
|
return SessionManager.continueRecent(args.cwd, args.sessionDir);
|
|
8818
8818
|
}
|
|
8819
8819
|
//#endregion
|
|
8820
|
-
//#region ../agent-runtime/src/context-bindings.ts
|
|
8821
|
-
var PROMPT_SEPARATOR = "\n\n---\n\n";
|
|
8822
|
-
/**
|
|
8823
|
-
* Resolve `task.input.context[]` into delivered side-effects (skills
|
|
8824
|
-
* persisted via `deliver.skill`) and prompt fragments
|
|
8825
|
-
* (`systemPromptPrefix`, `userInlineSuffix`) the caller weaves into the
|
|
8826
|
-
* built prompt.
|
|
8827
|
-
*
|
|
8828
|
-
* Per-binding semantics (V1):
|
|
8829
|
-
* - `skill` → `deliver.skill({ slug, content })` once per ref.
|
|
8830
|
-
* Slug collisions on distinct contents are
|
|
8831
|
-
* refused loudly.
|
|
8832
|
-
* - `context_inline`→ persist raw bytes via `deliver.contextFile(...)`
|
|
8833
|
-
* and inject them into the prompt in an explicit,
|
|
8834
|
-
* named block. Intended for eval/context experiments
|
|
8835
|
-
* where the content must be in the model context
|
|
8836
|
-
* window, not merely discoverable as a skill.
|
|
8837
|
-
* - `prompt_prefix` → content appended to `systemPromptPrefix` with
|
|
8838
|
-
* the canonical `\n\n---\n\n` separator (in
|
|
8839
|
-
* declared order).
|
|
8840
|
-
* - `user_inline` → content appended to `userInlineSuffix` in
|
|
8841
|
-
* declared order, same separator.
|
|
8842
|
-
*
|
|
8843
|
-
* No fetching, no hashing — bytes are inlined in `ContextRef.content`,
|
|
8844
|
-
* and the task's `inputCid` already pins the entire input. The proposer
|
|
8845
|
-
* chose these bytes; the resolver just dispatches them.
|
|
8846
|
-
*
|
|
8847
|
-
* The function is pure with respect to its arguments: file writes are
|
|
8848
|
-
* confined to the injected `deliver` callback, which makes the
|
|
8849
|
-
* resolver trivial to test.
|
|
8850
|
-
*/
|
|
8851
|
-
async function resolveTaskContext(args) {
|
|
8852
|
-
const promptParts = [];
|
|
8853
|
-
const userParts = [];
|
|
8854
|
-
const injected = [];
|
|
8855
|
-
const usedSlugs = /* @__PURE__ */ new Map();
|
|
8856
|
-
for (const ref of args.context) {
|
|
8857
|
-
if (ref.binding === "skill") {
|
|
8858
|
-
const prior = usedSlugs.get(ref.slug);
|
|
8859
|
-
if (prior !== void 0) {
|
|
8860
|
-
if (prior !== ref.content) throw new Error(`slug collision on '${ref.slug}': two skill entries share the same slug but have different content`);
|
|
8861
|
-
injected.push(ref);
|
|
8862
|
-
continue;
|
|
8863
|
-
}
|
|
8864
|
-
usedSlugs.set(ref.slug, ref.content);
|
|
8865
|
-
await args.deliver.skill({
|
|
8866
|
-
slug: ref.slug,
|
|
8867
|
-
content: ref.content
|
|
8868
|
-
});
|
|
8869
|
-
} else if (ref.binding === "context_inline") {
|
|
8870
|
-
await args.deliver.contextFile({
|
|
8871
|
-
slug: ref.slug,
|
|
8872
|
-
content: ref.content,
|
|
8873
|
-
suggestedFileName: `${ref.slug}.md`
|
|
8874
|
-
});
|
|
8875
|
-
promptParts.push(formatInlineContextBlock(ref.slug, ref.content));
|
|
8876
|
-
} else if (ref.binding === "prompt_prefix") promptParts.push(ref.content);
|
|
8877
|
-
else userParts.push(ref.content);
|
|
8878
|
-
injected.push(ref);
|
|
8879
|
-
}
|
|
8880
|
-
return {
|
|
8881
|
-
injected,
|
|
8882
|
-
systemPromptPrefix: promptParts.join(PROMPT_SEPARATOR),
|
|
8883
|
-
userInlineSuffix: userParts.join(PROMPT_SEPARATOR)
|
|
8884
|
-
};
|
|
8885
|
-
}
|
|
8886
|
-
function formatInlineContextBlock(slug, content) {
|
|
8887
|
-
return [
|
|
8888
|
-
"### Injected Task Context",
|
|
8889
|
-
"",
|
|
8890
|
-
`Context id: \`${slug}\``,
|
|
8891
|
-
"The following raw context was supplied by the task creator. Treat it",
|
|
8892
|
-
"as task-relevant background that may override generic coding instincts",
|
|
8893
|
-
"when it contains repo- or workflow-specific constraints.",
|
|
8894
|
-
"The same content is also materialized in the workspace as",
|
|
8895
|
-
"`/workspace/context-pack.md` and mirrored in `AGENTS.md` for",
|
|
8896
|
-
"repo-context discovery.",
|
|
8897
|
-
"",
|
|
8898
|
-
"<context>",
|
|
8899
|
-
content,
|
|
8900
|
-
"</context>"
|
|
8901
|
-
].join("\n");
|
|
8902
|
-
}
|
|
8903
|
-
//#endregion
|
|
8904
8820
|
//#region ../tasks/src/formats.ts
|
|
8905
8821
|
/**
|
|
8906
8822
|
* Register TypeBox string formats used across Task / TaskOutput / task-type
|
|
@@ -9378,6 +9294,22 @@ var CuratePackOutput = Type$1.Object({
|
|
|
9378
9294
|
//#endregion
|
|
9379
9295
|
//#region ../tasks/src/task-types/freeform.ts
|
|
9380
9296
|
var FREEFORM_TYPE = "freeform";
|
|
9297
|
+
var FreeformExecutionOptions = Type$1.Object({ workspace: Type$1.Optional(Type$1.Union([
|
|
9298
|
+
Type$1.Literal("none"),
|
|
9299
|
+
Type$1.Literal("shared_mount"),
|
|
9300
|
+
Type$1.Literal("dedicated_worktree")
|
|
9301
|
+
])) }, {
|
|
9302
|
+
$id: "FreeformExecutionOptions",
|
|
9303
|
+
additionalProperties: false
|
|
9304
|
+
});
|
|
9305
|
+
var FreeformContinueFrom = Type$1.Object({
|
|
9306
|
+
taskId: Type$1.String({ format: "uuid" }),
|
|
9307
|
+
attemptN: Type$1.Integer({ minimum: 1 }),
|
|
9308
|
+
mode: Type$1.Optional(Type$1.Union([Type$1.Literal("extend"), Type$1.Literal("fork")]))
|
|
9309
|
+
}, {
|
|
9310
|
+
$id: "FreeformContinueFrom",
|
|
9311
|
+
additionalProperties: false
|
|
9312
|
+
});
|
|
9381
9313
|
var FreeformTaskTypeProposal = Type$1.Object({
|
|
9382
9314
|
name: Type$1.String({ minLength: 1 }),
|
|
9383
9315
|
rationale: Type$1.String({ minLength: 1 }),
|
|
@@ -9388,13 +9320,14 @@ var FreeformTaskTypeProposal = Type$1.Object({
|
|
|
9388
9320
|
additionalProperties: false
|
|
9389
9321
|
});
|
|
9390
9322
|
var FreeformInput = Type$1.Object({
|
|
9391
|
-
title: Type$1.Optional(Type$1.String({ minLength: 1 })),
|
|
9392
9323
|
brief: Type$1.String({ minLength: 1 }),
|
|
9393
9324
|
expectedOutput: Type$1.Optional(Type$1.String({ minLength: 1 })),
|
|
9394
9325
|
constraints: Type$1.Optional(Type$1.Array(Type$1.String({ minLength: 1 }), { maxItems: 20 })),
|
|
9395
9326
|
suggestedTaskType: Type$1.Optional(Type$1.String({ minLength: 1 })),
|
|
9396
9327
|
successCriteria: Type$1.Optional(SuccessCriteria),
|
|
9397
|
-
context: Type$1.Optional(TaskContext)
|
|
9328
|
+
context: Type$1.Optional(TaskContext),
|
|
9329
|
+
execution: Type$1.Optional(FreeformExecutionOptions),
|
|
9330
|
+
continueFrom: Type$1.Optional(FreeformContinueFrom)
|
|
9398
9331
|
}, {
|
|
9399
9332
|
$id: "FreeformInput",
|
|
9400
9333
|
additionalProperties: false
|
|
@@ -9404,30 +9337,100 @@ var FreeformArtifact = Type$1.Object({
|
|
|
9404
9337
|
title: Type$1.String({ minLength: 1 }),
|
|
9405
9338
|
description: Type$1.Optional(Type$1.String({ minLength: 1 })),
|
|
9406
9339
|
url: Type$1.Optional(Type$1.String({ minLength: 1 })),
|
|
9407
|
-
path: Type$1.Optional(Type$1.String({ minLength: 1 }))
|
|
9340
|
+
path: Type$1.Optional(Type$1.String({ minLength: 1 })),
|
|
9341
|
+
body: Type$1.Optional(Type$1.String({ maxLength: 65536 }))
|
|
9408
9342
|
}, {
|
|
9409
9343
|
$id: "FreeformArtifact",
|
|
9410
9344
|
additionalProperties: false
|
|
9411
9345
|
});
|
|
9412
|
-
var FreeformFollowUpTask = Type$1.Object({
|
|
9413
|
-
title: Type$1.String({ minLength: 1 }),
|
|
9414
|
-
brief: Type$1.String({ minLength: 1 }),
|
|
9415
|
-
suggestedTaskType: Type$1.Optional(Type$1.String({ minLength: 1 }))
|
|
9416
|
-
}, {
|
|
9417
|
-
$id: "FreeformFollowUpTask",
|
|
9418
|
-
additionalProperties: false
|
|
9419
|
-
});
|
|
9420
9346
|
var FreeformOutput = Type$1.Object({
|
|
9421
9347
|
summary: Type$1.String({ minLength: 1 }),
|
|
9422
9348
|
artifacts: Type$1.Optional(Type$1.Array(FreeformArtifact, { maxItems: 20 })),
|
|
9423
9349
|
proposedTaskType: Type$1.Optional(FreeformTaskTypeProposal),
|
|
9424
|
-
followUpTasks: Type$1.Optional(Type$1.Array(FreeformFollowUpTask, { maxItems: 20 })),
|
|
9425
9350
|
diaryEntryIds: Type$1.Optional(Type$1.Array(Type$1.String({ format: "uuid" }))),
|
|
9426
9351
|
verification: Type$1.Optional(VerificationRecord)
|
|
9427
9352
|
}, {
|
|
9428
9353
|
$id: "FreeformOutput",
|
|
9429
9354
|
additionalProperties: false
|
|
9430
9355
|
});
|
|
9356
|
+
/**
|
|
9357
|
+
* Server-side preflight for `freeform` task-create. Runs after the
|
|
9358
|
+
* sync TypeBox check passes and only kicks in when
|
|
9359
|
+
* `input.continueFrom` is set — i.e. the proposer is asking to
|
|
9360
|
+
* resume a prior freeform attempt's warm slot (#1287).
|
|
9361
|
+
*
|
|
9362
|
+
* Failure modes, in evaluation order:
|
|
9363
|
+
* 1. `freeform.sourceTaskNotFound` — source task id does not resolve
|
|
9364
|
+
* (does not exist OR caller can't read it; we don't distinguish).
|
|
9365
|
+
* 2. `freeform.sourceTaskTypeNotSupported` — source isn't `freeform`.
|
|
9366
|
+
* v1 only supports freeform → freeform continuation.
|
|
9367
|
+
* 3. `freeform.sourceAttemptNotCompleted` — named attempt is missing
|
|
9368
|
+
* or not in `completed` state; warm continuation only makes sense
|
|
9369
|
+
* once the parent has produced a terminal output.
|
|
9370
|
+
* 4. `freeform.forkModeNotImplemented` — `mode: 'fork'` is the wire
|
|
9371
|
+
* surface for copy-on-write continuation tracked in #1293; v1
|
|
9372
|
+
* rejects it server-side so daemons never have to branch.
|
|
9373
|
+
* 5. `freeform.executionWorkspaceNotInheritable` — caller set
|
|
9374
|
+
* `execution.workspace` together with `continueFrom`. Workspace
|
|
9375
|
+
* mode for a continuation is inherited from the parent slot
|
|
9376
|
+
* (`maybeAttachWarmSlotContext` forces `dedicated_worktree` +
|
|
9377
|
+
* the parent's worktreeBranch), so any caller-supplied override
|
|
9378
|
+
* is silently dropped at the daemon plan stage. Reject explicitly
|
|
9379
|
+
* so misconfiguration surfaces at create time.
|
|
9380
|
+
* 6. `freeform.sourceNotResumeEligible` — `daemonState` is null or
|
|
9381
|
+
* `slotResumableUntil` is null. Older completions (pre-#1287) and
|
|
9382
|
+
* daemons that opt out fall here.
|
|
9383
|
+
* 7. `freeform.sourceResumeExpired` — `slotResumableUntil` is in the
|
|
9384
|
+
* past; the warm slot's TTL has elapsed and no daemon is
|
|
9385
|
+
* guaranteed to still hold it.
|
|
9386
|
+
*
|
|
9387
|
+
* Returns on the first failure (no "report all six") — the checks
|
|
9388
|
+
* are sequential preconditions, later ones presume earlier ones hold.
|
|
9389
|
+
*/
|
|
9390
|
+
async function validateFreeformInputAsync(input, ctx) {
|
|
9391
|
+
const cf = input.continueFrom;
|
|
9392
|
+
if (!cf) return [];
|
|
9393
|
+
const source = await ctx.resolveTask(cf.taskId);
|
|
9394
|
+
if (!source) return [{
|
|
9395
|
+
field: "input/continueFrom/taskId",
|
|
9396
|
+
message: `Source task ${cf.taskId} does not resolve to a task you can read`,
|
|
9397
|
+
code: "freeform.sourceTaskNotFound"
|
|
9398
|
+
}];
|
|
9399
|
+
if (source.taskType !== "freeform") return [{
|
|
9400
|
+
field: "input/continueFrom/taskId",
|
|
9401
|
+
message: `Source task type '${source.taskType}' is not continuable; only freeform → freeform is supported in v1`,
|
|
9402
|
+
code: "freeform.sourceTaskTypeNotSupported"
|
|
9403
|
+
}];
|
|
9404
|
+
if (cf.mode === "fork") return [{
|
|
9405
|
+
field: "input/continueFrom/mode",
|
|
9406
|
+
message: "fork mode not yet implemented; see https://github.com/getlarge/themoltnet/issues/1293",
|
|
9407
|
+
code: "freeform.forkModeNotImplemented"
|
|
9408
|
+
}];
|
|
9409
|
+
if (input.execution?.workspace) return [{
|
|
9410
|
+
field: "input/execution/workspace",
|
|
9411
|
+
message: "execution.workspace is inherited from the parent slot when continueFrom is set; omit it",
|
|
9412
|
+
code: "freeform.executionWorkspaceNotInheritable"
|
|
9413
|
+
}];
|
|
9414
|
+
if (ctx.deferReadinessChecks) return [];
|
|
9415
|
+
const attempt = (await ctx.listAttempts(cf.taskId)).find((a) => a.attemptN === cf.attemptN);
|
|
9416
|
+
if (!attempt || attempt.status !== "completed") return [{
|
|
9417
|
+
field: "input/continueFrom/attemptN",
|
|
9418
|
+
message: `Source attempt ${cf.attemptN} on task ${cf.taskId} is not in 'completed' state`,
|
|
9419
|
+
code: "freeform.sourceAttemptNotCompleted"
|
|
9420
|
+
}];
|
|
9421
|
+
if (!attempt.daemonState || attempt.daemonState.slotResumableUntil === null) return [{
|
|
9422
|
+
field: "input/continueFrom",
|
|
9423
|
+
message: "Source attempt did not report continuation eligibility (older completion or daemon opted out)",
|
|
9424
|
+
code: "freeform.sourceNotResumeEligible"
|
|
9425
|
+
}];
|
|
9426
|
+
const expiresAt = new Date(attempt.daemonState.slotResumableUntil).getTime();
|
|
9427
|
+
if (Number.isNaN(expiresAt) || expiresAt <= Date.now()) return [{
|
|
9428
|
+
field: "input/continueFrom",
|
|
9429
|
+
message: `Source attempt's warm slot expired at ${attempt.daemonState.slotResumableUntil} (reported at ${attempt.daemonState.reportedAt})`,
|
|
9430
|
+
code: "freeform.sourceResumeExpired"
|
|
9431
|
+
}];
|
|
9432
|
+
return [];
|
|
9433
|
+
}
|
|
9431
9434
|
//#endregion
|
|
9432
9435
|
//#region ../tasks/src/task-types/fulfill-brief.ts
|
|
9433
9436
|
/**
|
|
@@ -9440,7 +9443,6 @@ var FreeformOutput = Type$1.Object({
|
|
|
9440
9443
|
var FULFILL_BRIEF_TYPE = "fulfill_brief";
|
|
9441
9444
|
var FulfillBriefInput = Type$1.Object({
|
|
9442
9445
|
brief: Type$1.String({ minLength: 1 }),
|
|
9443
|
-
title: Type$1.Optional(Type$1.String()),
|
|
9444
9446
|
successCriteria: Type$1.Optional(SuccessCriteria),
|
|
9445
9447
|
seedFiles: Type$1.Optional(Type$1.Array(Type$1.String())),
|
|
9446
9448
|
scopeHint: Type$1.Optional(Type$1.String())
|
|
@@ -9992,10 +9994,14 @@ var BUILT_IN_TASK_TYPES = {
|
|
|
9992
9994
|
inputSchema: FreeformInput,
|
|
9993
9995
|
outputSchema: FreeformOutput,
|
|
9994
9996
|
outputKind: "artifact",
|
|
9995
|
-
|
|
9996
|
-
|
|
9997
|
+
resumable: true,
|
|
9998
|
+
workspaceMode: "shared_mount",
|
|
9999
|
+
workspaceScope: "session",
|
|
10000
|
+
sessionScope: "correlation",
|
|
10001
|
+
acceptsInputWorkspaceOverride: true,
|
|
9997
10002
|
requiresReferences: false,
|
|
9998
|
-
validateOutput: requireVerificationWhenCriteriaPresent
|
|
10003
|
+
validateOutput: requireVerificationWhenCriteriaPresent,
|
|
10004
|
+
validateInputAsync: validateFreeformInputAsync
|
|
9999
10005
|
},
|
|
10000
10006
|
[FULFILL_BRIEF_TYPE]: {
|
|
10001
10007
|
name: FULFILL_BRIEF_TYPE,
|
|
@@ -10074,6 +10080,7 @@ var BUILT_IN_TASK_TYPES = {
|
|
|
10074
10080
|
resumable: true,
|
|
10075
10081
|
workspaceScope: "session",
|
|
10076
10082
|
sessionScope: "custom",
|
|
10083
|
+
acceptsInputWorkspaceOverride: true,
|
|
10077
10084
|
requiresReferences: false,
|
|
10078
10085
|
validateOutput: validateRunEvalOutput
|
|
10079
10086
|
},
|
|
@@ -10219,6 +10226,25 @@ var Cid = Type$1.String({ minLength: 1 });
|
|
|
10219
10226
|
var IsoTimestamp = Type$1.String({ format: "date-time" });
|
|
10220
10227
|
var MAX_CLAIM_CONDITION_BRANCHES = 8;
|
|
10221
10228
|
var MAX_CLAIM_CONDITION_STATUSES = 8;
|
|
10229
|
+
/**
|
|
10230
|
+
* Daemon-asserted runtime state stamped onto a `TaskAttemptSummary` at
|
|
10231
|
+
* attempt-completion time. The server persists this block verbatim and
|
|
10232
|
+
* reads `slotResumableUntil` for `tasks_continue` create-time
|
|
10233
|
+
* eligibility; the daemon-side claim-affinity filter is the runtime
|
|
10234
|
+
* truth. The block carries its own `reportedAt` so consumers can reason
|
|
10235
|
+
* about staleness without reading documentation. All daemon-asserted
|
|
10236
|
+
* state lives here — top-level attempt fields stay server-authoritative.
|
|
10237
|
+
*
|
|
10238
|
+
* Adding new fields requires explicit design review (intentional
|
|
10239
|
+
* boundary; see docs/superpowers/specs/2026-06-04-tasks-continue-design.md).
|
|
10240
|
+
*/
|
|
10241
|
+
var DaemonState = Type$1.Object({
|
|
10242
|
+
reportedAt: IsoTimestamp,
|
|
10243
|
+
slotResumableUntil: Type$1.Union([IsoTimestamp, Type$1.Null()])
|
|
10244
|
+
}, {
|
|
10245
|
+
$id: "DaemonState",
|
|
10246
|
+
additionalProperties: false
|
|
10247
|
+
});
|
|
10222
10248
|
var ClaimCondition = Type$1.Recursive((Self) => Type$1.Union([
|
|
10223
10249
|
Type$1.Object({
|
|
10224
10250
|
op: Type$1.Literal("all"),
|
|
@@ -10315,6 +10341,8 @@ Type$1.Object({
|
|
|
10315
10341
|
Type$1.Object({
|
|
10316
10342
|
id: Uuid,
|
|
10317
10343
|
taskType: Type$1.String({ minLength: 1 }),
|
|
10344
|
+
title: Type$1.Union([Type$1.String(), Type$1.Null()]),
|
|
10345
|
+
tags: Type$1.Array(Type$1.String()),
|
|
10318
10346
|
teamId: Uuid,
|
|
10319
10347
|
diaryId: Type$1.Union([Uuid, Type$1.Null()]),
|
|
10320
10348
|
outputKind: OutputKind,
|
|
@@ -10367,7 +10395,8 @@ Type$1.Object({
|
|
|
10367
10395
|
error: Type$1.Union([TaskError, Type$1.Null()]),
|
|
10368
10396
|
usage: Type$1.Union([TaskUsage, Type$1.Null()]),
|
|
10369
10397
|
contentSignature: Type$1.Union([Type$1.String(), Type$1.Null()]),
|
|
10370
|
-
signedAt: Type$1.Union([IsoTimestamp, Type$1.Null()])
|
|
10398
|
+
signedAt: Type$1.Union([IsoTimestamp, Type$1.Null()]),
|
|
10399
|
+
daemonState: Type$1.Union([DaemonState, Type$1.Null()])
|
|
10371
10400
|
}, {
|
|
10372
10401
|
$id: "TaskAttempt",
|
|
10373
10402
|
additionalProperties: false
|
|
@@ -10420,6 +10449,90 @@ Type$1.Object({
|
|
|
10420
10449
|
additionalProperties: false
|
|
10421
10450
|
});
|
|
10422
10451
|
//#endregion
|
|
10452
|
+
//#region ../agent-runtime/src/context-bindings.ts
|
|
10453
|
+
var PROMPT_SEPARATOR = "\n\n---\n\n";
|
|
10454
|
+
/**
|
|
10455
|
+
* Resolve `task.input.context[]` into delivered side-effects (skills
|
|
10456
|
+
* persisted via `deliver.skill`) and prompt fragments
|
|
10457
|
+
* (`systemPromptPrefix`, `userInlineSuffix`) the caller weaves into the
|
|
10458
|
+
* built prompt.
|
|
10459
|
+
*
|
|
10460
|
+
* Per-binding semantics (V1):
|
|
10461
|
+
* - `skill` → `deliver.skill({ slug, content })` once per ref.
|
|
10462
|
+
* Slug collisions on distinct contents are
|
|
10463
|
+
* refused loudly.
|
|
10464
|
+
* - `context_inline`→ persist raw bytes via `deliver.contextFile(...)`
|
|
10465
|
+
* and inject them into the prompt in an explicit,
|
|
10466
|
+
* named block. Intended for eval/context experiments
|
|
10467
|
+
* where the content must be in the model context
|
|
10468
|
+
* window, not merely discoverable as a skill.
|
|
10469
|
+
* - `prompt_prefix` → content appended to `systemPromptPrefix` with
|
|
10470
|
+
* the canonical `\n\n---\n\n` separator (in
|
|
10471
|
+
* declared order).
|
|
10472
|
+
* - `user_inline` → content appended to `userInlineSuffix` in
|
|
10473
|
+
* declared order, same separator.
|
|
10474
|
+
*
|
|
10475
|
+
* No fetching, no hashing — bytes are inlined in `ContextRef.content`,
|
|
10476
|
+
* and the task's `inputCid` already pins the entire input. The proposer
|
|
10477
|
+
* chose these bytes; the resolver just dispatches them.
|
|
10478
|
+
*
|
|
10479
|
+
* The function is pure with respect to its arguments: file writes are
|
|
10480
|
+
* confined to the injected `deliver` callback, which makes the
|
|
10481
|
+
* resolver trivial to test.
|
|
10482
|
+
*/
|
|
10483
|
+
async function resolveTaskContext(args) {
|
|
10484
|
+
const promptParts = [];
|
|
10485
|
+
const userParts = [];
|
|
10486
|
+
const injected = [];
|
|
10487
|
+
const usedSlugs = /* @__PURE__ */ new Map();
|
|
10488
|
+
for (const ref of args.context) {
|
|
10489
|
+
if (ref.binding === "skill") {
|
|
10490
|
+
const prior = usedSlugs.get(ref.slug);
|
|
10491
|
+
if (prior !== void 0) {
|
|
10492
|
+
if (prior !== ref.content) throw new Error(`slug collision on '${ref.slug}': two skill entries share the same slug but have different content`);
|
|
10493
|
+
injected.push(ref);
|
|
10494
|
+
continue;
|
|
10495
|
+
}
|
|
10496
|
+
usedSlugs.set(ref.slug, ref.content);
|
|
10497
|
+
await args.deliver.skill({
|
|
10498
|
+
slug: ref.slug,
|
|
10499
|
+
content: ref.content
|
|
10500
|
+
});
|
|
10501
|
+
} else if (ref.binding === "context_inline") {
|
|
10502
|
+
await args.deliver.contextFile({
|
|
10503
|
+
slug: ref.slug,
|
|
10504
|
+
content: ref.content,
|
|
10505
|
+
suggestedFileName: `${ref.slug}.md`
|
|
10506
|
+
});
|
|
10507
|
+
promptParts.push(formatInlineContextBlock(ref.slug, ref.content));
|
|
10508
|
+
} else if (ref.binding === "prompt_prefix") promptParts.push(ref.content);
|
|
10509
|
+
else userParts.push(ref.content);
|
|
10510
|
+
injected.push(ref);
|
|
10511
|
+
}
|
|
10512
|
+
return {
|
|
10513
|
+
injected,
|
|
10514
|
+
systemPromptPrefix: promptParts.join(PROMPT_SEPARATOR),
|
|
10515
|
+
userInlineSuffix: userParts.join(PROMPT_SEPARATOR)
|
|
10516
|
+
};
|
|
10517
|
+
}
|
|
10518
|
+
function formatInlineContextBlock(slug, content) {
|
|
10519
|
+
return [
|
|
10520
|
+
"### Injected Task Context",
|
|
10521
|
+
"",
|
|
10522
|
+
`Context id: \`${slug}\``,
|
|
10523
|
+
"The following raw context was supplied by the task creator. Treat it",
|
|
10524
|
+
"as task-relevant background that may override generic coding instincts",
|
|
10525
|
+
"when it contains repo- or workflow-specific constraints.",
|
|
10526
|
+
"The same content is also materialized in the workspace as",
|
|
10527
|
+
"`/workspace/context-pack.md` and mirrored in `AGENTS.md` for",
|
|
10528
|
+
"repo-context discovery.",
|
|
10529
|
+
"",
|
|
10530
|
+
"<context>",
|
|
10531
|
+
content,
|
|
10532
|
+
"</context>"
|
|
10533
|
+
].join("\n");
|
|
10534
|
+
}
|
|
10535
|
+
//#endregion
|
|
10423
10536
|
//#region ../agent-runtime/src/output-tools.ts
|
|
10424
10537
|
/**
|
|
10425
10538
|
* Submit-output tool contract.
|
|
@@ -10930,6 +11043,23 @@ function buildCuratePackUserPrompt(input, ctx) {
|
|
|
10930
11043
|
}
|
|
10931
11044
|
//#endregion
|
|
10932
11045
|
//#region ../agent-runtime/src/prompts/freeform.ts
|
|
11046
|
+
var INLINE_ARTIFACT_THRESHOLD = 16 * 1024;
|
|
11047
|
+
var TOTAL_INLINE_BUDGET = 32 * 1024;
|
|
11048
|
+
function buildPriorContextSection(priorContext) {
|
|
11049
|
+
if (!priorContext) return null;
|
|
11050
|
+
const lines = ["# Prior context", ""];
|
|
11051
|
+
if (priorContext.summary) lines.push("## Summary", priorContext.summary, "");
|
|
11052
|
+
let inlineUsed = priorContext.summary?.length ?? 0;
|
|
11053
|
+
priorContext.artifacts?.forEach((art, i) => {
|
|
11054
|
+
const bodyLen = art.body?.length ?? 0;
|
|
11055
|
+
if (art.body && bodyLen < INLINE_ARTIFACT_THRESHOLD && inlineUsed + bodyLen < TOTAL_INLINE_BUDGET) {
|
|
11056
|
+
lines.push(`## Artifact ${i}: ${art.title} (${art.kind})`, art.body, "");
|
|
11057
|
+
inlineUsed += bodyLen;
|
|
11058
|
+
} else lines.push(`## Artifact ${i} (pointer): kind: ${art.kind}, title: ${art.title}`, "(body omitted; use tasks_get to retrieve full content)", "");
|
|
11059
|
+
});
|
|
11060
|
+
while (lines.length > 0 && lines[lines.length - 1] === "") lines.pop();
|
|
11061
|
+
return lines.join("\n");
|
|
11062
|
+
}
|
|
10933
11063
|
function buildFreeformUserPrompt(input, ctx) {
|
|
10934
11064
|
const header = [
|
|
10935
11065
|
"# Freeform Task Agent",
|
|
@@ -10949,21 +11079,14 @@ function buildFreeformUserPrompt(input, ctx) {
|
|
|
10949
11079
|
"2. Gather enough context to avoid guessing.",
|
|
10950
11080
|
"3. Complete the requested work when it is safe and bounded.",
|
|
10951
11081
|
"4. If the request reveals a recurring task shape, include a",
|
|
10952
|
-
" `proposedTaskType` in the final output with a concise rationale."
|
|
10953
|
-
"5. If the work should be split or continued, include `followUpTasks`."
|
|
11082
|
+
" `proposedTaskType` in the final output with a concise rationale."
|
|
10954
11083
|
].join("\n");
|
|
10955
|
-
|
|
11084
|
+
const sections = [
|
|
10956
11085
|
{
|
|
10957
11086
|
id: "freeform.header",
|
|
10958
11087
|
source: "header",
|
|
10959
11088
|
body: header
|
|
10960
11089
|
},
|
|
10961
|
-
{
|
|
10962
|
-
id: "freeform.title",
|
|
10963
|
-
source: "task_input",
|
|
10964
|
-
header: "Title",
|
|
10965
|
-
body: input.title ?? ""
|
|
10966
|
-
},
|
|
10967
11090
|
{
|
|
10968
11091
|
id: "freeform.brief",
|
|
10969
11092
|
source: "task_input",
|
|
@@ -11008,16 +11131,22 @@ function buildFreeformUserPrompt(input, ctx) {
|
|
|
11008
11131
|
shapeSketch: [
|
|
11009
11132
|
"{",
|
|
11010
11133
|
" \"summary\": \"<2-5 sentence result>\",",
|
|
11011
|
-
" \"artifacts\": [{ \"kind\": \"...\", \"title\": \"...\", \"description\": \"...\", \"url\": \"...\", \"path\": \"
|
|
11134
|
+
" \"artifacts\": [{ \"kind\": \"...\", \"title\": \"...\", \"description\": \"...\", \"body\": \"<inline content up to 64 KiB; preferred for textual output so it persists with the task>\", \"url\": \"...\", \"path\": \"<worktree-ephemeral; not persisted after completion>\" }],",
|
|
11012
11135
|
" \"proposedTaskType\": { \"name\": \"...\", \"rationale\": \"...\", \"inputShape\": {}, \"outputShape\": {} },",
|
|
11013
|
-
" \"followUpTasks\": [{ \"title\": \"...\", \"brief\": \"...\", \"suggestedTaskType\": \"...\" }],",
|
|
11014
11136
|
" \"diaryEntryIds\": [\"...\"],",
|
|
11015
11137
|
" \"verification\": <required iff input.successCriteria; see Self-verification>",
|
|
11016
11138
|
"}"
|
|
11017
11139
|
].join("\n")
|
|
11018
11140
|
})
|
|
11019
11141
|
}
|
|
11020
|
-
]
|
|
11142
|
+
];
|
|
11143
|
+
const priorContextBody = buildPriorContextSection(ctx.priorContext);
|
|
11144
|
+
if (priorContextBody) sections.splice(sections.findIndex((s) => s.id === "freeform.workflow") + 1, 0, {
|
|
11145
|
+
id: "freeform.prior_context",
|
|
11146
|
+
source: "task_input",
|
|
11147
|
+
body: priorContextBody
|
|
11148
|
+
});
|
|
11149
|
+
return assembleTaskPrompt("freeform", sections);
|
|
11021
11150
|
}
|
|
11022
11151
|
//#endregion
|
|
11023
11152
|
//#region ../agent-runtime/src/prompts/fulfill-brief.ts
|
|
@@ -11029,7 +11158,7 @@ function buildFreeformUserPrompt(input, ctx) {
|
|
|
11029
11158
|
* is told to inspect them itself.
|
|
11030
11159
|
*/
|
|
11031
11160
|
function buildFulfillBriefUserPrompt(input, ctx) {
|
|
11032
|
-
const { brief,
|
|
11161
|
+
const { brief, seedFiles, scopeHint } = input;
|
|
11033
11162
|
const header = [
|
|
11034
11163
|
"# Fulfill Brief Agent",
|
|
11035
11164
|
"",
|
|
@@ -11039,7 +11168,7 @@ function buildFulfillBriefUserPrompt(input, ctx) {
|
|
|
11039
11168
|
"invariants for this task: identity, gh authentication, diary discipline,",
|
|
11040
11169
|
"and the accountable-commit shape. Follow it for every commit.",
|
|
11041
11170
|
"",
|
|
11042
|
-
|
|
11171
|
+
"## Task: Fulfill brief",
|
|
11043
11172
|
"",
|
|
11044
11173
|
`Task id: \`${ctx.taskId}\``
|
|
11045
11174
|
].join("\n");
|
|
@@ -11778,7 +11907,10 @@ function buildTaskUserPrompt(task, ctx) {
|
|
|
11778
11907
|
const errors = [...Value.Errors(FreeformInput, task.input)];
|
|
11779
11908
|
throw new Error(`freeform input failed validation: ${JSON.stringify(errors.slice(0, 3))}`);
|
|
11780
11909
|
}
|
|
11781
|
-
return buildFreeformUserPrompt(task.input, {
|
|
11910
|
+
return buildFreeformUserPrompt(task.input, {
|
|
11911
|
+
taskId: ctx.taskId,
|
|
11912
|
+
priorContext: ctx.priorContext
|
|
11913
|
+
});
|
|
11782
11914
|
case FULFILL_BRIEF_TYPE:
|
|
11783
11915
|
if (!Value.Check(FulfillBriefInput, task.input)) {
|
|
11784
11916
|
const errors = [...Value.Errors(FulfillBriefInput, task.input)];
|
|
@@ -15471,6 +15603,30 @@ function clip(s, max) {
|
|
|
15471
15603
|
return s.length > max ? s.slice(0, max) : s;
|
|
15472
15604
|
}
|
|
15473
15605
|
//#endregion
|
|
15606
|
+
//#region src/runtime/resolve-prior-context.ts
|
|
15607
|
+
/**
|
|
15608
|
+
* Fetch the named attempt's output and project it into the prompt's
|
|
15609
|
+
* priorContext shape. Returns `null` when the attempt cannot be located
|
|
15610
|
+
* or its output is missing/malformed — the prompt builder treats that
|
|
15611
|
+
* as "no prior context", which is harmless.
|
|
15612
|
+
*/
|
|
15613
|
+
async function resolvePriorContext(agent, continueFrom) {
|
|
15614
|
+
const attempt = (await agent.tasks.listAttempts(continueFrom.taskId)).find((a) => a.attemptN === continueFrom.attemptN);
|
|
15615
|
+
if (!attempt || !attempt.output) return null;
|
|
15616
|
+
const output = attempt.output;
|
|
15617
|
+
const summary = typeof output.summary === "string" ? output.summary : void 0;
|
|
15618
|
+
const artifacts = Array.isArray(output.artifacts) ? output.artifacts.filter((a) => !!a && typeof a.kind === "string" && typeof a.title === "string").map((a) => ({
|
|
15619
|
+
kind: a.kind,
|
|
15620
|
+
title: a.title,
|
|
15621
|
+
body: a.body
|
|
15622
|
+
})) : void 0;
|
|
15623
|
+
if (!summary && (!artifacts || artifacts.length === 0)) return null;
|
|
15624
|
+
return {
|
|
15625
|
+
summary,
|
|
15626
|
+
artifacts
|
|
15627
|
+
};
|
|
15628
|
+
}
|
|
15629
|
+
//#endregion
|
|
15474
15630
|
//#region src/runtime/runtime-instructor.ts
|
|
15475
15631
|
/**
|
|
15476
15632
|
* Build the daemon-controlled invariant prose injected into the system prompt
|
|
@@ -16246,7 +16402,7 @@ async function executePiTask(claimedTask, reporter, opts) {
|
|
|
16246
16402
|
const attemptN = claimedTask.attemptN;
|
|
16247
16403
|
const startTime = Date.now();
|
|
16248
16404
|
const requestedMountPath = opts.mountPath ?? process.cwd();
|
|
16249
|
-
const executionPlan = opts.makeExecutionPlan?.(claimedTask) ?? null;
|
|
16405
|
+
const executionPlan = await opts.makeExecutionPlan?.(claimedTask) ?? null;
|
|
16250
16406
|
let workspace = null;
|
|
16251
16407
|
let mountPath = requestedMountPath;
|
|
16252
16408
|
let cwdPath = requestedMountPath;
|
|
@@ -16384,6 +16540,34 @@ async function executePiTask(claimedTask, reporter, opts) {
|
|
|
16384
16540
|
workspaceMode: activeWorkspace.mode,
|
|
16385
16541
|
workspaceBranch: activeWorkspace.branch
|
|
16386
16542
|
});
|
|
16543
|
+
let resolvedPriorContext;
|
|
16544
|
+
const continueFrom = task.input?.continueFrom;
|
|
16545
|
+
if (task.taskType === "freeform" && continueFrom) try {
|
|
16546
|
+
const resolved = await resolvePriorContext(await connect({ configDir: managed.agentDir }), continueFrom);
|
|
16547
|
+
if (resolved) {
|
|
16548
|
+
resolvedPriorContext = resolved;
|
|
16549
|
+
await emit("info", {
|
|
16550
|
+
event: "prior_context_resolved",
|
|
16551
|
+
sourceTaskId: continueFrom.taskId,
|
|
16552
|
+
sourceAttemptN: continueFrom.attemptN,
|
|
16553
|
+
hasSummary: !!resolved.summary,
|
|
16554
|
+
artifactCount: resolved.artifacts?.length ?? 0
|
|
16555
|
+
});
|
|
16556
|
+
} else await emit("info", {
|
|
16557
|
+
event: "prior_context_empty",
|
|
16558
|
+
sourceTaskId: continueFrom.taskId,
|
|
16559
|
+
sourceAttemptN: continueFrom.attemptN
|
|
16560
|
+
});
|
|
16561
|
+
} catch (err) {
|
|
16562
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
16563
|
+
await emit("info", {
|
|
16564
|
+
event: "prior_context_resolve_failed",
|
|
16565
|
+
severity: "warn",
|
|
16566
|
+
sourceTaskId: continueFrom.taskId,
|
|
16567
|
+
sourceAttemptN: continueFrom.attemptN,
|
|
16568
|
+
message
|
|
16569
|
+
});
|
|
16570
|
+
}
|
|
16387
16571
|
let taskPrompt;
|
|
16388
16572
|
try {
|
|
16389
16573
|
const assembled = buildTaskUserPrompt(task, {
|
|
@@ -16395,7 +16579,8 @@ async function executePiTask(claimedTask, reporter, opts) {
|
|
|
16395
16579
|
attached: executionPlan?.workspaceAttachment !== void 0 || executionPlan?.workspaceSeed?.source === "producer",
|
|
16396
16580
|
source: executionPlan?.workspaceSeed?.source === "producer" ? "producer_copy" : executionPlan?.workspaceAttachment !== void 0 ? "producer_attachment" : void 0
|
|
16397
16581
|
},
|
|
16398
|
-
extras: opts.promptExtras
|
|
16582
|
+
extras: opts.promptExtras,
|
|
16583
|
+
priorContext: resolvedPriorContext
|
|
16399
16584
|
});
|
|
16400
16585
|
taskPrompt = assembled.text;
|
|
16401
16586
|
await emit("info", {
|
|
@@ -16583,7 +16768,7 @@ async function executePiTask(claimedTask, reporter, opts) {
|
|
|
16583
16768
|
is_error: event.isError,
|
|
16584
16769
|
result: event.isError ? truncateForWire(event.result) : void 0
|
|
16585
16770
|
}));
|
|
16586
|
-
if (event
|
|
16771
|
+
if (shouldEmitToolCallError(event)) track(emitError("tool_call_error", describeToolErrorMessage(event.result), {
|
|
16587
16772
|
tool: event.toolName,
|
|
16588
16773
|
result: truncateForWire(event.result)
|
|
16589
16774
|
}));
|
|
@@ -16835,6 +17020,28 @@ function summarizePayloadForLog(kind, payload) {
|
|
|
16835
17020
|
}
|
|
16836
17021
|
}
|
|
16837
17022
|
/**
|
|
17023
|
+
* Classify a `tool_execution_end` event for telemetry purposes.
|
|
17024
|
+
*
|
|
17025
|
+
* Bash subprocess non-zero exits are routine — agents deliberately probe
|
|
17026
|
+
* absent commands (e.g. `command -v docker` returning 127) and treat the
|
|
17027
|
+
* non-zero exit as data. Surfacing those as `tool_call_error` events floods
|
|
17028
|
+
* the message stream with spurious errors and makes a successful
|
|
17029
|
+
* negative-space probe look like a failing task.
|
|
17030
|
+
*
|
|
17031
|
+
* Reserve the `error` kind for genuine tool-machinery failures (transport,
|
|
17032
|
+
* MCP, malformed response). The `is_error` flag on `tool_call_end` still
|
|
17033
|
+
* records the non-zero exit, so consumers can distinguish ok vs. failed
|
|
17034
|
+
* bash calls without searching for a sibling error event.
|
|
17035
|
+
*
|
|
17036
|
+
* Bash timeouts remain handled separately by the cap-abort path; that
|
|
17037
|
+
* branch doesn't go through `tool_call_error`.
|
|
17038
|
+
*/
|
|
17039
|
+
function shouldEmitToolCallError(event) {
|
|
17040
|
+
if (!event.isError) return false;
|
|
17041
|
+
if (event.toolName === "bash") return false;
|
|
17042
|
+
return true;
|
|
17043
|
+
}
|
|
17044
|
+
/**
|
|
16838
17045
|
* Detect pi's bash-timeout error wrapper in a `tool_execution_end`
|
|
16839
17046
|
* result. The bash tool surfaces a timeout as a structured tool result
|
|
16840
17047
|
* `{ content: [{ type: 'text', text: '… Command timed out after N
|