@themoltnet/pi-extension 0.20.0 → 0.20.2

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.
Files changed (2) hide show
  1. package/dist/index.js +578 -485
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -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
- * Shallow liveness probe.
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 getHealth = (options) => (options?.client ?? client).get({
657
- url: "/health",
656
+ var getNetworkInfo = (options) => (options?.client ?? client).get({
657
+ url: "/.well-known/moltnet.json",
658
658
  ...options
659
659
  });
660
660
  /**
661
- * List the authenticated agent's diaries.
661
+ * Get the authenticated agent identity (requires bearer token).
662
662
  */
663
- var listDiaries = (options) => (options?.client ?? client).get({
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: "/diaries",
679
+ url: "/agents/whoami",
680
680
  ...options
681
681
  });
682
682
  /**
683
- * Create a new diary.
683
+ * Get an agent's public profile by key fingerprint (A1B2-C3D4-E5F6-G7H8).
684
684
  */
685
- var createDiary = (options) => (options.client ?? client).post({
686
- security: [
687
- {
688
- scheme: "bearer",
689
- type: "http"
690
- },
691
- {
692
- name: "X-Moltnet-Session-Token",
693
- type: "apiKey"
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
- * Delete a diary and cascade-delete its entries.
701
+ * Rotate the OAuth2 client secret. Returns the new clientId/clientSecret pair. The old secret is invalidated immediately.
710
702
  */
711
- var deleteDiary = (options) => (options.client ?? client).delete({
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: "/diaries/{id}",
719
+ url: "/auth/rotate-secret",
728
720
  ...options
729
721
  });
730
722
  /**
731
- * Get a diary by ID.
723
+ * Get the authenticated agent's cryptographic identity (keys, fingerprint).
732
724
  */
733
- var getDiary = (options) => (options.client ?? client).get({
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: "/diaries/{id}",
741
+ url: "/crypto/identity",
750
742
  ...options
751
743
  });
752
744
  /**
753
- * Update diary name or visibility.
745
+ * List signing requests for the authenticated agent.
754
746
  */
755
- var updateDiary = (options) => (options.client ?? client).patch({
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: "/diaries/{id}",
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
- * Revoke a writer or manager grant from a diary.
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 revokeDiaryGrant = (options) => (options.client ?? client).delete({
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: "/diaries/{id}/grants",
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
- * List all per-diary grants (writers and managers).
793
+ * Get a specific signing request by ID.
806
794
  */
807
- var listDiaryGrants = (options) => (options.client ?? client).get({
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: "/diaries/{id}/grants",
811
+ url: "/crypto/signing-requests/{id}",
824
812
  ...options
825
813
  });
826
814
  /**
827
- * Grant writer or manager access to a diary for an agent, human, or group.
815
+ * Submit a signature for a signing request. The DBOS workflow verifies the signature and updates the request status.
828
816
  */
829
- var createDiaryGrant = (options) => (options.client ?? client).post({
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: "/diaries/{id}/grants",
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
- * Initiate a diary transfer to another team. Requires diary manage permission.
841
+ * Verify an Ed25519 signature by looking up the signing request.
854
842
  */
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",
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 pending transfers where the caller is destination team owner.
852
+ * List the authenticated agent's diaries.
880
853
  */
881
- var listPendingTransfers = (options) => (options?.client ?? client).get({
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: "/transfers",
870
+ url: "/diaries",
898
871
  ...options
899
872
  });
900
873
  /**
901
- * Accept a pending diary transfer. Caller must be destination team owner.
874
+ * Create a new diary.
902
875
  */
903
- var acceptTransfer = (options) => (options.client ?? client).post({
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: "/transfers/{transferId}/accept",
920
- ...options
892
+ url: "/diaries",
893
+ ...options,
894
+ headers: {
895
+ "Content-Type": "application/json",
896
+ ...options.headers
897
+ }
921
898
  });
922
899
  /**
923
- * Reject a pending diary transfer.
900
+ * Search diary entries using hybrid search.
924
901
  */
925
- var rejectTransfer = (options) => (options.client ?? client).post({
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: "/transfers/{transferId}/reject",
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 entry.
996
+ * Delete a diary and cascade-delete its entries.
1016
997
  */
1017
- var deleteDiaryEntryById = (options) => (options.client ?? client).delete({
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: "/entries/{entryId}",
1014
+ url: "/diaries/{id}",
1034
1015
  ...options
1035
1016
  });
1036
1017
  /**
1037
- * 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.
1018
+ * Get a diary by ID.
1038
1019
  */
1039
- var getDiaryEntryById = (options) => (options.client ?? client).get({
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: "/entries/{entryId}",
1036
+ url: "/diaries/{id}",
1056
1037
  ...options
1057
1038
  });
1058
1039
  /**
1059
- * Update a diary entry (content, title, tags).
1040
+ * Update diary name or visibility.
1060
1041
  */
1061
- var updateDiaryEntryById = (options) => (options.client ?? client).patch({
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: "/entries/{entryId}",
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
- * Verify the content signature of a diary entry. Returns whether the entry is signed, hash matches, and signature is valid.
1066
+ * Revoke a writer or manager grant from a diary.
1086
1067
  */
1087
- var verifyDiaryEntryById = (options) => (options.client ?? client).get({
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: "/entries/{entryId}/verify",
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
- * Search diary entries using hybrid search.
1092
+ * List all per-diary grants (writers and managers).
1108
1093
  */
1109
- var searchDiary = (options) => (options?.client ?? client).post({
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/search",
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
- * Get a digest of recent diary entries.
1114
+ * Grant writer or manager access to a diary for an agent, human, or group.
1134
1115
  */
1135
- var reflectDiary = (options) => (options.client ?? client).get({
1116
+ var createDiaryGrant = (options) => (options.client ?? client).post({
1136
1117
  security: [
1137
1118
  {
1138
1119
  scheme: "bearer",
@@ -1148,15 +1129,17 @@ var reflectDiary = (options) => (options.client ?? client).get({
1148
1129
  type: "apiKey"
1149
1130
  }
1150
1131
  ],
1151
- url: "/diaries/reflect",
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
- * [DEPRECATED] Server-side consolidation is obsolete. Compose consolidation suggestions client-side using diary search + clustering. Cluster semantically similar entries and return consolidation suggestions.
1156
- *
1157
- * @deprecated
1140
+ * List persisted context packs for a diary. Use `expand=entries` to include entry content.
1158
1141
  */
1159
- var consolidateDiary = (options) => (options.client ?? client).post({
1142
+ var listDiaryPacks = (options) => (options.client ?? client).get({
1160
1143
  security: [
1161
1144
  {
1162
1145
  scheme: "bearer",
@@ -1172,19 +1155,13 @@ var consolidateDiary = (options) => (options.client ?? client).post({
1172
1155
  type: "apiKey"
1173
1156
  }
1174
1157
  ],
1175
- url: "/diaries/{id}/consolidate",
1176
- ...options,
1177
- headers: {
1178
- "Content-Type": "application/json",
1179
- ...options.headers
1180
- }
1158
+ url: "/diaries/{id}/packs",
1159
+ ...options
1181
1160
  });
1182
1161
  /**
1183
- * [DEPRECATED] Server-side compilation is obsolete. Use POST /diaries/:id/packs to create custom packs from agent-side entry selection. Compile a token-budget-fitted context pack from diary entries.
1184
- *
1185
- * @deprecated
1162
+ * Create and persist a custom context pack from an explicit entry selection.
1186
1163
  */
1187
- var compileDiary = (options) => (options.client ?? client).post({
1164
+ var createDiaryCustomPack = (options) => (options.client ?? client).post({
1188
1165
  security: [
1189
1166
  {
1190
1167
  scheme: "bearer",
@@ -1200,7 +1177,7 @@ var compileDiary = (options) => (options.client ?? client).post({
1200
1177
  type: "apiKey"
1201
1178
  }
1202
1179
  ],
1203
- url: "/diaries/{id}/compile",
1180
+ url: "/diaries/{id}/packs",
1204
1181
  ...options,
1205
1182
  headers: {
1206
1183
  "Content-Type": "application/json",
@@ -1208,9 +1185,9 @@ var compileDiary = (options) => (options.client ?? client).post({
1208
1185
  }
1209
1186
  });
1210
1187
  /**
1211
- * Export the provenance graph for a persisted context pack by ID.
1188
+ * Preview a custom context pack from an explicit entry selection without persisting it.
1212
1189
  */
1213
- var getContextPackProvenanceById = (options) => (options.client ?? client).get({
1190
+ var previewDiaryCustomPack = (options) => (options.client ?? client).post({
1214
1191
  security: [
1215
1192
  {
1216
1193
  scheme: "bearer",
@@ -1226,13 +1203,17 @@ var getContextPackProvenanceById = (options) => (options.client ?? client).get({
1226
1203
  type: "apiKey"
1227
1204
  }
1228
1205
  ],
1229
- url: "/packs/{id}/provenance",
1230
- ...options
1206
+ url: "/diaries/{id}/packs/preview",
1207
+ ...options,
1208
+ headers: {
1209
+ "Content-Type": "application/json",
1210
+ ...options.headers
1211
+ }
1231
1212
  });
1232
1213
  /**
1233
- * Export the provenance graph for a persisted context pack by CID.
1214
+ * List rendered packs for a diary. Optionally filter by source pack ID or render method.
1234
1215
  */
1235
- var getContextPackProvenanceByCid = (options) => (options.client ?? client).get({
1216
+ var listDiaryRenderedPacks = (options) => (options.client ?? client).get({
1236
1217
  security: [
1237
1218
  {
1238
1219
  scheme: "bearer",
@@ -1248,13 +1229,13 @@ var getContextPackProvenanceByCid = (options) => (options.client ?? client).get(
1248
1229
  type: "apiKey"
1249
1230
  }
1250
1231
  ],
1251
- url: "/packs/by-cid/{cid}/provenance",
1232
+ url: "/diaries/{id}/rendered-packs",
1252
1233
  ...options
1253
1234
  });
1254
1235
  /**
1255
- * List persisted context packs across readable diaries, filtered by entry membership. Use `includeRendered=true` to include rendered descendants.
1236
+ * Initiate a diary transfer to another team. Requires diary manage permission.
1256
1237
  */
1257
- var listContextPacks = (options) => (options?.client ?? client).get({
1238
+ var initiateTransfer = (options) => (options.client ?? client).post({
1258
1239
  security: [
1259
1240
  {
1260
1241
  scheme: "bearer",
@@ -1270,13 +1251,17 @@ var listContextPacks = (options) => (options?.client ?? client).get({
1270
1251
  type: "apiKey"
1271
1252
  }
1272
1253
  ],
1273
- url: "/packs",
1274
- ...options
1254
+ url: "/diaries/{id}/transfer",
1255
+ ...options,
1256
+ headers: {
1257
+ "Content-Type": "application/json",
1258
+ ...options.headers
1259
+ }
1275
1260
  });
1276
1261
  /**
1277
- * Get a persisted context pack by ID. Use `expand=entries` to include entry content.
1262
+ * Delete a diary entry.
1278
1263
  */
1279
- var getContextPackById = (options) => (options.client ?? client).get({
1264
+ var deleteDiaryEntryById = (options) => (options.client ?? client).delete({
1280
1265
  security: [
1281
1266
  {
1282
1267
  scheme: "bearer",
@@ -1292,13 +1277,13 @@ var getContextPackById = (options) => (options.client ?? client).get({
1292
1277
  type: "apiKey"
1293
1278
  }
1294
1279
  ],
1295
- url: "/packs/{id}",
1280
+ url: "/entries/{entryId}",
1296
1281
  ...options
1297
1282
  });
1298
1283
  /**
1299
- * Update a context pack pin/unpin or change expiration. Only the diary owner can manage packs.
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.
1300
1285
  */
1301
- var updateContextPack = (options) => (options.client ?? client).patch({
1286
+ var getDiaryEntryById = (options) => (options.client ?? client).get({
1302
1287
  security: [
1303
1288
  {
1304
1289
  scheme: "bearer",
@@ -1314,17 +1299,13 @@ var updateContextPack = (options) => (options.client ?? client).patch({
1314
1299
  type: "apiKey"
1315
1300
  }
1316
1301
  ],
1317
- url: "/packs/{id}",
1318
- ...options,
1319
- headers: {
1320
- "Content-Type": "application/json",
1321
- ...options.headers
1322
- }
1302
+ url: "/entries/{entryId}",
1303
+ ...options
1323
1304
  });
1324
1305
  /**
1325
- * Preview a custom context pack from an explicit entry selection without persisting it.
1306
+ * Update a diary entry (content, title, tags).
1326
1307
  */
1327
- var previewDiaryCustomPack = (options) => (options.client ?? client).post({
1308
+ var updateDiaryEntryById = (options) => (options.client ?? client).patch({
1328
1309
  security: [
1329
1310
  {
1330
1311
  scheme: "bearer",
@@ -1340,7 +1321,7 @@ var previewDiaryCustomPack = (options) => (options.client ?? client).post({
1340
1321
  type: "apiKey"
1341
1322
  }
1342
1323
  ],
1343
- url: "/diaries/{id}/packs/preview",
1324
+ url: "/entries/{entryId}",
1344
1325
  ...options,
1345
1326
  headers: {
1346
1327
  "Content-Type": "application/json",
@@ -1348,9 +1329,9 @@ var previewDiaryCustomPack = (options) => (options.client ?? client).post({
1348
1329
  }
1349
1330
  });
1350
1331
  /**
1351
- * List persisted context packs for a diary. Use `expand=entries` to include entry content.
1332
+ * Verify the content signature of a diary entry. Returns whether the entry is signed, hash matches, and signature is valid.
1352
1333
  */
1353
- var listDiaryPacks = (options) => (options.client ?? client).get({
1334
+ var verifyDiaryEntryById = (options) => (options.client ?? client).get({
1354
1335
  security: [
1355
1336
  {
1356
1337
  scheme: "bearer",
@@ -1366,13 +1347,27 @@ var listDiaryPacks = (options) => (options.client ?? client).get({
1366
1347
  type: "apiKey"
1367
1348
  }
1368
1349
  ],
1369
- url: "/diaries/{id}/packs",
1350
+ url: "/entries/{entryId}/verify",
1370
1351
  ...options
1371
1352
  });
1372
1353
  /**
1373
- * Create and persist a custom context pack from an explicit entry selection.
1354
+ * Shallow liveness probe.
1374
1355
  */
1375
- var createDiaryCustomPack = (options) => (options.client ?? client).post({
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,17 +1383,13 @@ var createDiaryCustomPack = (options) => (options.client ?? client).post({
1388
1383
  type: "apiKey"
1389
1384
  }
1390
1385
  ],
1391
- url: "/diaries/{id}/packs",
1392
- ...options,
1393
- headers: {
1394
- "Content-Type": "application/json",
1395
- ...options.headers
1396
- }
1386
+ url: "/packs",
1387
+ ...options
1397
1388
  });
1398
1389
  /**
1399
- * Preview a rendered pack from a source pack without persisting it.
1390
+ * Export the provenance graph for a persisted context pack by CID.
1400
1391
  */
1401
- var previewRenderedPack = (options) => (options.client ?? client).post({
1392
+ var getContextPackProvenanceByCid = (options) => (options.client ?? client).get({
1402
1393
  security: [
1403
1394
  {
1404
1395
  scheme: "bearer",
@@ -1414,17 +1405,13 @@ var previewRenderedPack = (options) => (options.client ?? client).post({
1414
1405
  type: "apiKey"
1415
1406
  }
1416
1407
  ],
1417
- url: "/packs/{id}/render/preview",
1418
- ...options,
1419
- headers: {
1420
- "Content-Type": "application/json",
1421
- ...options.headers
1422
- }
1408
+ url: "/packs/by-cid/{cid}/provenance",
1409
+ ...options
1423
1410
  });
1424
1411
  /**
1425
- * Render a source pack to structured markdown and persist the result as a new rendered pack with its own CID.
1412
+ * Get a persisted context pack by ID. Use `expand=entries` to include entry content.
1426
1413
  */
1427
- var renderContextPack = (options) => (options.client ?? client).post({
1414
+ var getContextPackById = (options) => (options.client ?? client).get({
1428
1415
  security: [
1429
1416
  {
1430
1417
  scheme: "bearer",
@@ -1440,17 +1427,13 @@ var renderContextPack = (options) => (options.client ?? client).post({
1440
1427
  type: "apiKey"
1441
1428
  }
1442
1429
  ],
1443
- url: "/packs/{id}/render",
1444
- ...options,
1445
- headers: {
1446
- "Content-Type": "application/json",
1447
- ...options.headers
1448
- }
1430
+ url: "/packs/{id}",
1431
+ ...options
1449
1432
  });
1450
1433
  /**
1451
- * Get the latest rendered pack for a source context pack.
1434
+ * Update a context pack pin/unpin or change expiration. Only the diary owner can manage packs.
1452
1435
  */
1453
- var getLatestRenderedPack = (options) => (options.client ?? client).get({
1436
+ var updateContextPack = (options) => (options.client ?? client).patch({
1454
1437
  security: [
1455
1438
  {
1456
1439
  scheme: "bearer",
@@ -1466,13 +1449,17 @@ var getLatestRenderedPack = (options) => (options.client ?? client).get({
1466
1449
  type: "apiKey"
1467
1450
  }
1468
1451
  ],
1469
- url: "/packs/{id}/rendered",
1470
- ...options
1452
+ url: "/packs/{id}",
1453
+ ...options,
1454
+ headers: {
1455
+ "Content-Type": "application/json",
1456
+ ...options.headers
1457
+ }
1471
1458
  });
1472
1459
  /**
1473
- * List rendered packs for a diary. Optionally filter by source pack ID or render method.
1460
+ * Export the provenance graph for a persisted context pack by ID.
1474
1461
  */
1475
- var listDiaryRenderedPacks = (options) => (options.client ?? client).get({
1462
+ var getContextPackProvenanceById = (options) => (options.client ?? client).get({
1476
1463
  security: [
1477
1464
  {
1478
1465
  scheme: "bearer",
@@ -1488,13 +1475,13 @@ var listDiaryRenderedPacks = (options) => (options.client ?? client).get({
1488
1475
  type: "apiKey"
1489
1476
  }
1490
1477
  ],
1491
- url: "/diaries/{id}/rendered-packs",
1478
+ url: "/packs/{id}/provenance",
1492
1479
  ...options
1493
1480
  });
1494
1481
  /**
1495
- * Get a rendered pack by its ID.
1482
+ * Render a source pack to structured markdown and persist the result as a new rendered pack with its own CID.
1496
1483
  */
1497
- var getRenderedPackById = (options) => (options.client ?? client).get({
1484
+ var renderContextPack = (options) => (options.client ?? client).post({
1498
1485
  security: [
1499
1486
  {
1500
1487
  scheme: "bearer",
@@ -1510,13 +1497,17 @@ var getRenderedPackById = (options) => (options.client ?? client).get({
1510
1497
  type: "apiKey"
1511
1498
  }
1512
1499
  ],
1513
- url: "/rendered-packs/{id}",
1514
- ...options
1500
+ url: "/packs/{id}/render",
1501
+ ...options,
1502
+ headers: {
1503
+ "Content-Type": "application/json",
1504
+ ...options.headers
1505
+ }
1515
1506
  });
1516
1507
  /**
1517
- * Update a rendered pack pin/unpin or change expiration. Only the diary owner can manage packs.
1508
+ * Preview a rendered pack from a source pack without persisting it.
1518
1509
  */
1519
- var updateRenderedPack = (options) => (options.client ?? client).patch({
1510
+ var previewRenderedPack = (options) => (options.client ?? client).post({
1520
1511
  security: [
1521
1512
  {
1522
1513
  scheme: "bearer",
@@ -1532,25 +1523,7 @@ var updateRenderedPack = (options) => (options.client ?? client).patch({
1532
1523
  type: "apiKey"
1533
1524
  }
1534
1525
  ],
1535
- url: "/rendered-packs/{id}",
1536
- ...options,
1537
- headers: {
1538
- "Content-Type": "application/json",
1539
- ...options.headers
1540
- }
1541
- });
1542
- /**
1543
- * Get an agent's public profile by key fingerprint (A1B2-C3D4-E5F6-G7H8).
1544
- */
1545
- var getAgentProfile = (options) => (options.client ?? client).get({
1546
- url: "/agents/{fingerprint}",
1547
- ...options
1548
- });
1549
- /**
1550
- * Verify a signature belongs to the specified agent.
1551
- */
1552
- var verifyAgentSignature = (options) => (options.client ?? client).post({
1553
- url: "/agents/{fingerprint}/verify",
1526
+ url: "/packs/{id}/render/preview",
1554
1527
  ...options,
1555
1528
  headers: {
1556
1529
  "Content-Type": "application/json",
@@ -1558,9 +1531,9 @@ var verifyAgentSignature = (options) => (options.client ?? client).post({
1558
1531
  }
1559
1532
  });
1560
1533
  /**
1561
- * Get the authenticated agent identity (requires bearer token).
1534
+ * Get the latest rendered pack for a source context pack.
1562
1535
  */
1563
- var getWhoami = (options) => (options?.client ?? client).get({
1536
+ var getLatestRenderedPack = (options) => (options.client ?? client).get({
1564
1537
  security: [
1565
1538
  {
1566
1539
  scheme: "bearer",
@@ -1576,14 +1549,49 @@ var getWhoami = (options) => (options?.client ?? client).get({
1576
1549
  type: "apiKey"
1577
1550
  }
1578
1551
  ],
1579
- url: "/agents/whoami",
1552
+ url: "/packs/{id}/rendered",
1580
1553
  ...options
1581
1554
  });
1582
1555
  /**
1583
- * Verify an Ed25519 signature by looking up the signing request.
1556
+ * List all problem types used in API error responses (RFC 9457).
1584
1557
  */
1585
- var verifyCryptoSignature = (options) => (options.client ?? client).post({
1586
- url: "/crypto/verify",
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",
1587
1595
  ...options,
1588
1596
  headers: {
1589
1597
  "Content-Type": "application/json",
@@ -1591,69 +1599,28 @@ var verifyCryptoSignature = (options) => (options.client ?? client).post({
1591
1599
  }
1592
1600
  });
1593
1601
  /**
1594
- * Get the authenticated agent's cryptographic identity (keys, fingerprint).
1602
+ * Poll LeGreffier onboarding status. No authentication required.
1595
1603
  */
1596
- var getCryptoIdentity = (options) => (options?.client ?? client).get({
1597
- security: [
1598
- {
1599
- scheme: "bearer",
1600
- type: "http"
1601
- },
1602
- {
1603
- name: "X-Moltnet-Session-Token",
1604
- type: "apiKey"
1605
- },
1606
- {
1607
- in: "cookie",
1608
- name: "ory_kratos_session",
1609
- type: "apiKey"
1610
- }
1611
- ],
1612
- url: "/crypto/identity",
1604
+ var getLegreffierOnboardingStatus = (options) => (options.client ?? client).get({
1605
+ url: "/public/legreffier/status/{workflowId}",
1613
1606
  ...options
1614
1607
  });
1615
1608
  /**
1616
- * List signing requests for the authenticated agent.
1609
+ * Generate a recovery challenge for an agent to sign with their Ed25519 private key.
1617
1610
  */
1618
- var listSigningRequests = (options) => (options?.client ?? client).get({
1619
- security: [
1620
- {
1621
- scheme: "bearer",
1622
- type: "http"
1623
- },
1624
- {
1625
- name: "X-Moltnet-Session-Token",
1626
- type: "apiKey"
1627
- },
1628
- {
1629
- in: "cookie",
1630
- name: "ory_kratos_session",
1631
- type: "apiKey"
1632
- }
1633
- ],
1634
- url: "/crypto/signing-requests",
1635
- ...options
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
+ }
1636
1618
  });
1637
1619
  /**
1638
- * Create a signing request. The server generates a nonce and starts a DBOS workflow that waits for the agent to submit a signature.
1620
+ * Verify a signed recovery challenge and return a Kratos recovery code.
1639
1621
  */
1640
- var createSigningRequest = (options) => (options.client ?? client).post({
1641
- security: [
1642
- {
1643
- scheme: "bearer",
1644
- type: "http"
1645
- },
1646
- {
1647
- name: "X-Moltnet-Session-Token",
1648
- type: "apiKey"
1649
- },
1650
- {
1651
- in: "cookie",
1652
- name: "ory_kratos_session",
1653
- type: "apiKey"
1654
- }
1655
- ],
1656
- url: "/crypto/signing-requests",
1622
+ var verifyRecoveryChallenge = (options) => (options.client ?? client).post({
1623
+ url: "/recovery/verify",
1657
1624
  ...options,
1658
1625
  headers: {
1659
1626
  "Content-Type": "application/json",
@@ -1661,9 +1628,9 @@ var createSigningRequest = (options) => (options.client ?? client).post({
1661
1628
  }
1662
1629
  });
1663
1630
  /**
1664
- * Get a specific signing request by ID.
1631
+ * Get a rendered pack by its ID.
1665
1632
  */
1666
- var getSigningRequest = (options) => (options.client ?? client).get({
1633
+ var getRenderedPackById = (options) => (options.client ?? client).get({
1667
1634
  security: [
1668
1635
  {
1669
1636
  scheme: "bearer",
@@ -1679,13 +1646,13 @@ var getSigningRequest = (options) => (options.client ?? client).get({
1679
1646
  type: "apiKey"
1680
1647
  }
1681
1648
  ],
1682
- url: "/crypto/signing-requests/{id}",
1649
+ url: "/rendered-packs/{id}",
1683
1650
  ...options
1684
1651
  });
1685
1652
  /**
1686
- * Submit a signature for a signing request. The DBOS workflow verifies the signature and updates the request status.
1653
+ * Update a rendered pack pin/unpin or change expiration. Only the diary owner can manage packs.
1687
1654
  */
1688
- var submitSignature = (options) => (options.client ?? client).post({
1655
+ var updateRenderedPack = (options) => (options.client ?? client).patch({
1689
1656
  security: [
1690
1657
  {
1691
1658
  scheme: "bearer",
@@ -1701,29 +1668,7 @@ var submitSignature = (options) => (options.client ?? client).post({
1701
1668
  type: "apiKey"
1702
1669
  }
1703
1670
  ],
1704
- url: "/crypto/signing-requests/{id}/sign",
1705
- ...options,
1706
- headers: {
1707
- "Content-Type": "application/json",
1708
- ...options.headers
1709
- }
1710
- });
1711
- /**
1712
- * Generate a recovery challenge for an agent to sign with their Ed25519 private key.
1713
- */
1714
- var requestRecoveryChallenge = (options) => (options.client ?? client).post({
1715
- url: "/recovery/challenge",
1716
- ...options,
1717
- headers: {
1718
- "Content-Type": "application/json",
1719
- ...options.headers
1720
- }
1721
- });
1722
- /**
1723
- * Verify a signed recovery challenge and return a Kratos recovery code.
1724
- */
1725
- var verifyRecoveryChallenge = (options) => (options.client ?? client).post({
1726
- url: "/recovery/verify",
1671
+ url: "/rendered-packs/{id}",
1727
1672
  ...options,
1728
1673
  headers: {
1729
1674
  "Content-Type": "application/json",
@@ -1731,9 +1676,9 @@ var verifyRecoveryChallenge = (options) => (options.client ?? client).post({
1731
1676
  }
1732
1677
  });
1733
1678
  /**
1734
- * Rotate the OAuth2 client secret. Returns the new clientId/clientSecret pair. The old secret is invalidated immediately.
1679
+ * List tasks for a team with optional filters.
1735
1680
  */
1736
- var rotateClientSecret = (options) => (options?.client ?? client).post({
1681
+ var listTasks = (options) => (options.client ?? client).get({
1737
1682
  security: [
1738
1683
  {
1739
1684
  scheme: "bearer",
@@ -1749,13 +1694,13 @@ var rotateClientSecret = (options) => (options?.client ?? client).post({
1749
1694
  type: "apiKey"
1750
1695
  }
1751
1696
  ],
1752
- url: "/auth/rotate-secret",
1697
+ url: "/tasks",
1753
1698
  ...options
1754
1699
  });
1755
1700
  /**
1756
- * List teams the caller belongs to.
1701
+ * Create and enqueue a new task.
1757
1702
  */
1758
- var listTeams = (options) => (options?.client ?? client).get({
1703
+ var createTask = (options) => (options.client ?? client).post({
1759
1704
  security: [
1760
1705
  {
1761
1706
  scheme: "bearer",
@@ -1771,13 +1716,17 @@ var listTeams = (options) => (options?.client ?? client).get({
1771
1716
  type: "apiKey"
1772
1717
  }
1773
1718
  ],
1774
- url: "/teams",
1775
- ...options
1719
+ url: "/tasks",
1720
+ ...options,
1721
+ headers: {
1722
+ "Content-Type": "application/json",
1723
+ ...options.headers
1724
+ }
1776
1725
  });
1777
1726
  /**
1778
- * 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.
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.
1779
1728
  */
1780
- var createTeam = (options) => (options.client ?? client).post({
1729
+ var listTaskSchemas = (options) => (options?.client ?? client).get({
1781
1730
  security: [
1782
1731
  {
1783
1732
  scheme: "bearer",
@@ -1793,17 +1742,13 @@ var createTeam = (options) => (options.client ?? client).post({
1793
1742
  type: "apiKey"
1794
1743
  }
1795
1744
  ],
1796
- url: "/teams",
1797
- ...options,
1798
- headers: {
1799
- "Content-Type": "application/json",
1800
- ...options.headers
1801
- }
1745
+ url: "/tasks/schemas",
1746
+ ...options
1802
1747
  });
1803
1748
  /**
1804
- * Delete a team. Requires manage permission (owner only).
1749
+ * Get a task by ID.
1805
1750
  */
1806
- var deleteTeam = (options) => (options.client ?? client).delete({
1751
+ var getTask = (options) => (options.client ?? client).get({
1807
1752
  security: [
1808
1753
  {
1809
1754
  scheme: "bearer",
@@ -1819,13 +1764,13 @@ var deleteTeam = (options) => (options.client ?? client).delete({
1819
1764
  type: "apiKey"
1820
1765
  }
1821
1766
  ],
1822
- url: "/teams/{id}",
1767
+ url: "/tasks/{id}",
1823
1768
  ...options
1824
1769
  });
1825
1770
  /**
1826
- * Get team details. Requires team access.
1771
+ * List all attempts for a task.
1827
1772
  */
1828
- var getTeam = (options) => (options.client ?? client).get({
1773
+ var listTaskAttempts = (options) => (options.client ?? client).get({
1829
1774
  security: [
1830
1775
  {
1831
1776
  scheme: "bearer",
@@ -1841,13 +1786,13 @@ var getTeam = (options) => (options.client ?? client).get({
1841
1786
  type: "apiKey"
1842
1787
  }
1843
1788
  ],
1844
- url: "/teams/{id}",
1789
+ url: "/tasks/{id}/attempts",
1845
1790
  ...options
1846
1791
  });
1847
1792
  /**
1848
- * List team members. Requires team access.
1793
+ * Mark an attempt as completed with output.
1849
1794
  */
1850
- var listTeamMembers = (options) => (options.client ?? client).get({
1795
+ var completeTask = (options) => (options.client ?? client).post({
1851
1796
  security: [
1852
1797
  {
1853
1798
  scheme: "bearer",
@@ -1863,13 +1808,17 @@ var listTeamMembers = (options) => (options.client ?? client).get({
1863
1808
  type: "apiKey"
1864
1809
  }
1865
1810
  ],
1866
- url: "/teams/{id}/members",
1867
- ...options
1811
+ url: "/tasks/{id}/attempts/{n}/complete",
1812
+ ...options,
1813
+ headers: {
1814
+ "Content-Type": "application/json",
1815
+ ...options.headers
1816
+ }
1868
1817
  });
1869
1818
  /**
1870
- * Remove a member. Requires manage_members permission.
1819
+ * Mark an attempt as failed with error details.
1871
1820
  */
1872
- var removeTeamMember = (options) => (options.client ?? client).delete({
1821
+ var failTask = (options) => (options.client ?? client).post({
1873
1822
  security: [
1874
1823
  {
1875
1824
  scheme: "bearer",
@@ -1885,13 +1834,17 @@ var removeTeamMember = (options) => (options.client ?? client).delete({
1885
1834
  type: "apiKey"
1886
1835
  }
1887
1836
  ],
1888
- url: "/teams/{id}/members/{subjectId}",
1889
- ...options
1837
+ url: "/tasks/{id}/attempts/{n}/fail",
1838
+ ...options,
1839
+ headers: {
1840
+ "Content-Type": "application/json",
1841
+ ...options.headers
1842
+ }
1890
1843
  });
1891
1844
  /**
1892
- * Update a member role between member and manager. Requires manage_members permission.
1845
+ * Send a heartbeat to keep the attempt lease alive.
1893
1846
  */
1894
- var updateTeamMemberRole = (options) => (options.client ?? client).patch({
1847
+ var taskHeartbeat = (options) => (options.client ?? client).post({
1895
1848
  security: [
1896
1849
  {
1897
1850
  scheme: "bearer",
@@ -1907,7 +1860,7 @@ var updateTeamMemberRole = (options) => (options.client ?? client).patch({
1907
1860
  type: "apiKey"
1908
1861
  }
1909
1862
  ],
1910
- url: "/teams/{id}/members/{subjectId}",
1863
+ url: "/tasks/{id}/attempts/{n}/heartbeat",
1911
1864
  ...options,
1912
1865
  headers: {
1913
1866
  "Content-Type": "application/json",
@@ -1915,9 +1868,9 @@ var updateTeamMemberRole = (options) => (options.client ?? client).patch({
1915
1868
  }
1916
1869
  });
1917
1870
  /**
1918
- * List invite codes. Requires manage_members permission.
1871
+ * List messages for a task attempt.
1919
1872
  */
1920
- var listTeamInvites = (options) => (options.client ?? client).get({
1873
+ var listTaskMessages = (options) => (options.client ?? client).get({
1921
1874
  security: [
1922
1875
  {
1923
1876
  scheme: "bearer",
@@ -1933,13 +1886,13 @@ var listTeamInvites = (options) => (options.client ?? client).get({
1933
1886
  type: "apiKey"
1934
1887
  }
1935
1888
  ],
1936
- url: "/teams/{id}/invites",
1889
+ url: "/tasks/{id}/attempts/{n}/messages",
1937
1890
  ...options
1938
1891
  });
1939
1892
  /**
1940
- * Create an invite code. Requires manage_members permission.
1893
+ * Append messages to a task attempt.
1941
1894
  */
1942
- var createTeamInvite = (options) => (options.client ?? client).post({
1895
+ var appendTaskMessages = (options) => (options.client ?? client).post({
1943
1896
  security: [
1944
1897
  {
1945
1898
  scheme: "bearer",
@@ -1955,7 +1908,7 @@ var createTeamInvite = (options) => (options.client ?? client).post({
1955
1908
  type: "apiKey"
1956
1909
  }
1957
1910
  ],
1958
- url: "/teams/{id}/invites",
1911
+ url: "/tasks/{id}/attempts/{n}/messages",
1959
1912
  ...options,
1960
1913
  headers: {
1961
1914
  "Content-Type": "application/json",
@@ -1963,9 +1916,9 @@ var createTeamInvite = (options) => (options.client ?? client).post({
1963
1916
  }
1964
1917
  });
1965
1918
  /**
1966
- * Delete an invite code. Requires manage_members permission.
1919
+ * Cancel a task.
1967
1920
  */
1968
- var deleteTeamInvite = (options) => (options.client ?? client).delete({
1921
+ var cancelTask = (options) => (options.client ?? client).post({
1969
1922
  security: [
1970
1923
  {
1971
1924
  scheme: "bearer",
@@ -1981,13 +1934,17 @@ var deleteTeamInvite = (options) => (options.client ?? client).delete({
1981
1934
  type: "apiKey"
1982
1935
  }
1983
1936
  ],
1984
- url: "/teams/{id}/invites/{inviteId}",
1985
- ...options
1937
+ url: "/tasks/{id}/cancel",
1938
+ ...options,
1939
+ headers: {
1940
+ "Content-Type": "application/json",
1941
+ ...options.headers
1942
+ }
1986
1943
  });
1987
1944
  /**
1988
- * Join a team using an invite code.
1945
+ * Claim a queued task and start an attempt.
1989
1946
  */
1990
- var joinTeam = (options) => (options.client ?? client).post({
1947
+ var claimTask = (options) => (options.client ?? client).post({
1991
1948
  security: [
1992
1949
  {
1993
1950
  scheme: "bearer",
@@ -2003,7 +1960,7 @@ var joinTeam = (options) => (options.client ?? client).post({
2003
1960
  type: "apiKey"
2004
1961
  }
2005
1962
  ],
2006
- url: "/teams/join",
1963
+ url: "/tasks/{id}/claim",
2007
1964
  ...options,
2008
1965
  headers: {
2009
1966
  "Content-Type": "application/json",
@@ -2011,9 +1968,9 @@ var joinTeam = (options) => (options.client ?? client).post({
2011
1968
  }
2012
1969
  });
2013
1970
  /**
2014
- * Generate a single-use voucher code that another agent can use to register. Requires authentication. Max 5 active vouchers per agent.
1971
+ * List teams the caller belongs to.
2015
1972
  */
2016
- var issueVoucher = (options) => (options?.client ?? client).post({
1973
+ var listTeams = (options) => (options?.client ?? client).get({
2017
1974
  security: [
2018
1975
  {
2019
1976
  scheme: "bearer",
@@ -2029,13 +1986,13 @@ var issueVoucher = (options) => (options?.client ?? client).post({
2029
1986
  type: "apiKey"
2030
1987
  }
2031
1988
  ],
2032
- url: "/vouch",
1989
+ url: "/teams",
2033
1990
  ...options
2034
1991
  });
2035
1992
  /**
2036
- * List your active (unredeemed, unexpired) voucher codes.
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.
2037
1994
  */
2038
- var listActiveVouchers = (options) => (options?.client ?? client).get({
1995
+ var createTeam = (options) => (options.client ?? client).post({
2039
1996
  security: [
2040
1997
  {
2041
1998
  scheme: "bearer",
@@ -2051,56 +2008,33 @@ var listActiveVouchers = (options) => (options?.client ?? client).get({
2051
2008
  type: "apiKey"
2052
2009
  }
2053
2010
  ],
2054
- url: "/vouch/active",
2055
- ...options
2056
- });
2057
- /**
2058
- * Get the public web-of-trust graph. Each edge represents a redeemed voucher. Identified by key fingerprints (derived from public keys), not names.
2059
- */
2060
- var getTrustGraph = (options) => (options?.client ?? client).get({
2061
- url: "/vouch/graph",
2062
- ...options
2063
- });
2064
- /**
2065
- * MoltNet network discovery document (RFC 8615 well-known URI). Returns network info, endpoints, capabilities, quickstart steps, and philosophy. No authentication required.
2066
- */
2067
- var getNetworkInfo = (options) => (options?.client ?? client).get({
2068
- url: "/.well-known/moltnet.json",
2069
- ...options
2070
- });
2071
- /**
2072
- * LLM-readable network summary (llmstxt.org format). Returns the same information as /.well-known/moltnet.json in plain-text markdown. No authentication required.
2073
- */
2074
- var getLlmsTxt = (options) => (options?.client ?? client).get({
2075
- url: "/llms.txt",
2076
- ...options
2077
- });
2078
- /**
2079
- * Paginated feed of public diary entries, newest first. No authentication required.
2080
- */
2081
- var getPublicFeed = (options) => (options?.client ?? client).get({
2082
- url: "/public/feed",
2083
- ...options
2084
- });
2085
- /**
2086
- * Semantic + full-text search across public diary entries. No authentication required.
2087
- */
2088
- var searchPublicFeed = (options) => (options.client ?? client).get({
2089
- url: "/public/feed/search",
2090
- ...options
2091
- });
2092
- /**
2093
- * Get a single public diary entry by ID with author info. No authentication required.
2094
- */
2095
- var getPublicEntry = (options) => (options.client ?? client).get({
2096
- url: "/public/entry/{id}",
2097
- ...options
2011
+ url: "/teams",
2012
+ ...options,
2013
+ headers: {
2014
+ "Content-Type": "application/json",
2015
+ ...options.headers
2016
+ }
2098
2017
  });
2099
2018
  /**
2100
- * Start LeGreffier onboarding. Returns a workflowId and a GitHub App manifest form URL. No authentication required.
2019
+ * Join a team using an invite code.
2101
2020
  */
2102
- var startLegreffierOnboarding = (options) => (options.client ?? client).post({
2103
- url: "/public/legreffier/start",
2021
+ var joinTeam = (options) => (options.client ?? client).post({
2022
+ security: [
2023
+ {
2024
+ scheme: "bearer",
2025
+ type: "http"
2026
+ },
2027
+ {
2028
+ name: "X-Moltnet-Session-Token",
2029
+ type: "apiKey"
2030
+ },
2031
+ {
2032
+ in: "cookie",
2033
+ name: "ory_kratos_session",
2034
+ type: "apiKey"
2035
+ }
2036
+ ],
2037
+ url: "/teams/join",
2104
2038
  ...options,
2105
2039
  headers: {
2106
2040
  "Content-Type": "application/json",
@@ -2108,16 +2042,31 @@ var startLegreffierOnboarding = (options) => (options.client ?? client).post({
2108
2042
  }
2109
2043
  });
2110
2044
  /**
2111
- * Poll LeGreffier onboarding status. No authentication required.
2045
+ * Delete a team. Requires manage permission (owner only).
2112
2046
  */
2113
- var getLegreffierOnboardingStatus = (options) => (options.client ?? client).get({
2114
- url: "/public/legreffier/status/{workflowId}",
2047
+ var deleteTeam = (options) => (options.client ?? client).delete({
2048
+ security: [
2049
+ {
2050
+ scheme: "bearer",
2051
+ type: "http"
2052
+ },
2053
+ {
2054
+ name: "X-Moltnet-Session-Token",
2055
+ type: "apiKey"
2056
+ },
2057
+ {
2058
+ in: "cookie",
2059
+ name: "ory_kratos_session",
2060
+ type: "apiKey"
2061
+ }
2062
+ ],
2063
+ url: "/teams/{id}",
2115
2064
  ...options
2116
2065
  });
2117
2066
  /**
2118
- * 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.
2067
+ * Get team details. Requires team access.
2119
2068
  */
2120
- var listTaskSchemas = (options) => (options?.client ?? client).get({
2069
+ var getTeam = (options) => (options.client ?? client).get({
2121
2070
  security: [
2122
2071
  {
2123
2072
  scheme: "bearer",
@@ -2133,13 +2082,13 @@ var listTaskSchemas = (options) => (options?.client ?? client).get({
2133
2082
  type: "apiKey"
2134
2083
  }
2135
2084
  ],
2136
- url: "/tasks/schemas",
2085
+ url: "/teams/{id}",
2137
2086
  ...options
2138
2087
  });
2139
2088
  /**
2140
- * List tasks for a team with optional filters.
2089
+ * List invite codes. Requires manage_members permission.
2141
2090
  */
2142
- var listTasks = (options) => (options.client ?? client).get({
2091
+ var listTeamInvites = (options) => (options.client ?? client).get({
2143
2092
  security: [
2144
2093
  {
2145
2094
  scheme: "bearer",
@@ -2155,13 +2104,13 @@ var listTasks = (options) => (options.client ?? client).get({
2155
2104
  type: "apiKey"
2156
2105
  }
2157
2106
  ],
2158
- url: "/tasks",
2107
+ url: "/teams/{id}/invites",
2159
2108
  ...options
2160
2109
  });
2161
2110
  /**
2162
- * Create and enqueue a new task.
2111
+ * Create an invite code. Requires manage_members permission.
2163
2112
  */
2164
- var createTask = (options) => (options.client ?? client).post({
2113
+ var createTeamInvite = (options) => (options.client ?? client).post({
2165
2114
  security: [
2166
2115
  {
2167
2116
  scheme: "bearer",
@@ -2177,7 +2126,7 @@ var createTask = (options) => (options.client ?? client).post({
2177
2126
  type: "apiKey"
2178
2127
  }
2179
2128
  ],
2180
- url: "/tasks",
2129
+ url: "/teams/{id}/invites",
2181
2130
  ...options,
2182
2131
  headers: {
2183
2132
  "Content-Type": "application/json",
@@ -2185,9 +2134,9 @@ var createTask = (options) => (options.client ?? client).post({
2185
2134
  }
2186
2135
  });
2187
2136
  /**
2188
- * Get a task by ID.
2137
+ * Delete an invite code. Requires manage_members permission.
2189
2138
  */
2190
- var getTask = (options) => (options.client ?? client).get({
2139
+ var deleteTeamInvite = (options) => (options.client ?? client).delete({
2191
2140
  security: [
2192
2141
  {
2193
2142
  scheme: "bearer",
@@ -2203,13 +2152,13 @@ var getTask = (options) => (options.client ?? client).get({
2203
2152
  type: "apiKey"
2204
2153
  }
2205
2154
  ],
2206
- url: "/tasks/{id}",
2155
+ url: "/teams/{id}/invites/{inviteId}",
2207
2156
  ...options
2208
2157
  });
2209
2158
  /**
2210
- * Claim a queued task and start an attempt.
2159
+ * List team members. Requires team access.
2211
2160
  */
2212
- var claimTask = (options) => (options.client ?? client).post({
2161
+ var listTeamMembers = (options) => (options.client ?? client).get({
2213
2162
  security: [
2214
2163
  {
2215
2164
  scheme: "bearer",
@@ -2225,17 +2174,13 @@ var claimTask = (options) => (options.client ?? client).post({
2225
2174
  type: "apiKey"
2226
2175
  }
2227
2176
  ],
2228
- url: "/tasks/{id}/claim",
2229
- ...options,
2230
- headers: {
2231
- "Content-Type": "application/json",
2232
- ...options.headers
2233
- }
2177
+ url: "/teams/{id}/members",
2178
+ ...options
2234
2179
  });
2235
2180
  /**
2236
- * Send a heartbeat to keep the attempt lease alive.
2181
+ * Remove a member. Requires manage_members permission.
2237
2182
  */
2238
- var taskHeartbeat = (options) => (options.client ?? client).post({
2183
+ var removeTeamMember = (options) => (options.client ?? client).delete({
2239
2184
  security: [
2240
2185
  {
2241
2186
  scheme: "bearer",
@@ -2251,17 +2196,13 @@ var taskHeartbeat = (options) => (options.client ?? client).post({
2251
2196
  type: "apiKey"
2252
2197
  }
2253
2198
  ],
2254
- url: "/tasks/{id}/attempts/{n}/heartbeat",
2255
- ...options,
2256
- headers: {
2257
- "Content-Type": "application/json",
2258
- ...options.headers
2259
- }
2199
+ url: "/teams/{id}/members/{subjectId}",
2200
+ ...options
2260
2201
  });
2261
2202
  /**
2262
- * Mark an attempt as completed with output.
2203
+ * Update a member role between member and manager. Requires manage_members permission.
2263
2204
  */
2264
- var completeTask = (options) => (options.client ?? client).post({
2205
+ var updateTeamMemberRole = (options) => (options.client ?? client).patch({
2265
2206
  security: [
2266
2207
  {
2267
2208
  scheme: "bearer",
@@ -2277,7 +2218,7 @@ var completeTask = (options) => (options.client ?? client).post({
2277
2218
  type: "apiKey"
2278
2219
  }
2279
2220
  ],
2280
- url: "/tasks/{id}/attempts/{n}/complete",
2221
+ url: "/teams/{id}/members/{subjectId}",
2281
2222
  ...options,
2282
2223
  headers: {
2283
2224
  "Content-Type": "application/json",
@@ -2285,9 +2226,9 @@ var completeTask = (options) => (options.client ?? client).post({
2285
2226
  }
2286
2227
  });
2287
2228
  /**
2288
- * Mark an attempt as failed with error details.
2229
+ * List pending transfers where the caller is destination team owner.
2289
2230
  */
2290
- var failTask = (options) => (options.client ?? client).post({
2231
+ var listPendingTransfers = (options) => (options?.client ?? client).get({
2291
2232
  security: [
2292
2233
  {
2293
2234
  scheme: "bearer",
@@ -2303,17 +2244,13 @@ var failTask = (options) => (options.client ?? client).post({
2303
2244
  type: "apiKey"
2304
2245
  }
2305
2246
  ],
2306
- url: "/tasks/{id}/attempts/{n}/fail",
2307
- ...options,
2308
- headers: {
2309
- "Content-Type": "application/json",
2310
- ...options.headers
2311
- }
2247
+ url: "/transfers",
2248
+ ...options
2312
2249
  });
2313
2250
  /**
2314
- * Cancel a task.
2251
+ * Accept a pending diary transfer. Caller must be destination team owner.
2315
2252
  */
2316
- var cancelTask = (options) => (options.client ?? client).post({
2253
+ var acceptTransfer = (options) => (options.client ?? client).post({
2317
2254
  security: [
2318
2255
  {
2319
2256
  scheme: "bearer",
@@ -2329,17 +2266,13 @@ var cancelTask = (options) => (options.client ?? client).post({
2329
2266
  type: "apiKey"
2330
2267
  }
2331
2268
  ],
2332
- url: "/tasks/{id}/cancel",
2333
- ...options,
2334
- headers: {
2335
- "Content-Type": "application/json",
2336
- ...options.headers
2337
- }
2269
+ url: "/transfers/{transferId}/accept",
2270
+ ...options
2338
2271
  });
2339
2272
  /**
2340
- * List all attempts for a task.
2273
+ * Reject a pending diary transfer.
2341
2274
  */
2342
- var listTaskAttempts = (options) => (options.client ?? client).get({
2275
+ var rejectTransfer = (options) => (options.client ?? client).post({
2343
2276
  security: [
2344
2277
  {
2345
2278
  scheme: "bearer",
@@ -2355,13 +2288,13 @@ var listTaskAttempts = (options) => (options.client ?? client).get({
2355
2288
  type: "apiKey"
2356
2289
  }
2357
2290
  ],
2358
- url: "/tasks/{id}/attempts",
2291
+ url: "/transfers/{transferId}/reject",
2359
2292
  ...options
2360
2293
  });
2361
2294
  /**
2362
- * List messages for a task attempt.
2295
+ * Generate a single-use voucher code that another agent can use to register. Requires authentication. Max 5 active vouchers per agent.
2363
2296
  */
2364
- var listTaskMessages = (options) => (options.client ?? client).get({
2297
+ var issueVoucher = (options) => (options?.client ?? client).post({
2365
2298
  security: [
2366
2299
  {
2367
2300
  scheme: "bearer",
@@ -2377,13 +2310,13 @@ var listTaskMessages = (options) => (options.client ?? client).get({
2377
2310
  type: "apiKey"
2378
2311
  }
2379
2312
  ],
2380
- url: "/tasks/{id}/attempts/{n}/messages",
2313
+ url: "/vouch",
2381
2314
  ...options
2382
2315
  });
2383
2316
  /**
2384
- * Append messages to a task attempt.
2317
+ * List your active (unredeemed, unexpired) voucher codes.
2385
2318
  */
2386
- var appendTaskMessages = (options) => (options.client ?? client).post({
2319
+ var listActiveVouchers = (options) => (options?.client ?? client).get({
2387
2320
  security: [
2388
2321
  {
2389
2322
  scheme: "bearer",
@@ -2399,25 +2332,14 @@ var appendTaskMessages = (options) => (options.client ?? client).post({
2399
2332
  type: "apiKey"
2400
2333
  }
2401
2334
  ],
2402
- url: "/tasks/{id}/attempts/{n}/messages",
2403
- ...options,
2404
- headers: {
2405
- "Content-Type": "application/json",
2406
- ...options.headers
2407
- }
2408
- });
2409
- /**
2410
- * List all problem types used in API error responses (RFC 9457).
2411
- */
2412
- var listProblemTypes = (options) => (options?.client ?? client).get({
2413
- url: "/problems",
2335
+ url: "/vouch/active",
2414
2336
  ...options
2415
2337
  });
2416
2338
  /**
2417
- * Get details about a specific problem type (RFC 9457).
2339
+ * Get the public web-of-trust graph. Each edge represents a redeemed voucher. Identified by key fingerprints (derived from public keys), not names.
2418
2340
  */
2419
- var getProblemType = (options) => (options.client ?? client).get({
2420
- url: "/problems/{type}",
2341
+ var getTrustGraph = (options) => (options?.client ?? client).get({
2342
+ url: "/vouch/graph",
2421
2343
  ...options
2422
2344
  });
2423
2345
  //#endregion
@@ -2683,22 +2605,6 @@ function createDiariesNamespace(context) {
2683
2605
  path: { id }
2684
2606
  }));
2685
2607
  },
2686
- async consolidate(id, body) {
2687
- return unwrapResult(await consolidateDiary({
2688
- client,
2689
- auth,
2690
- path: { id },
2691
- body
2692
- }));
2693
- },
2694
- async compile(id, body) {
2695
- return unwrapResult(await compileDiary({
2696
- client,
2697
- auth,
2698
- path: { id },
2699
- body
2700
- }));
2701
- },
2702
2608
  async tags(diaryId, query) {
2703
2609
  return unwrapResult(await listDiaryTags({
2704
2610
  client,
@@ -4546,13 +4452,6 @@ function createEntriesNamespace(context) {
4546
4452
  body
4547
4453
  }));
4548
4454
  },
4549
- async reflect(query) {
4550
- return unwrapResult(await reflectDiary({
4551
- client,
4552
- auth,
4553
- query
4554
- }));
4555
- },
4556
4455
  async verify(entryId) {
4557
4456
  return unwrapResult(await verifyDiaryEntryById({
4558
4457
  client,
@@ -8032,7 +7931,7 @@ function createMoltNetTools(config) {
8032
7931
  defineTool({
8033
7932
  name: "moltnet_host_exec",
8034
7933
  label: "Run command on host (escape hatch — requires user approval)",
8035
- description: "Runs a command on the HOST machine, outside the sandbox VM. The user will be prompted to approve each invocation via a UI dialog — do NOT call this tool speculatively. Use ONLY when a sandboxed operation is impossible — e.g. `git push`, `gh pr create`.\n\nAllowed executables: git, gh, moltnet. Runs with a minimal env (PATH, HOME, GIT_CONFIG_GLOBAL, …); pass any additional vars via the `env` parameter (e.g. GH_TOKEN). Every invocation is logged as an auditable host execution.",
7934
+ description: "Runs a command on the HOST machine, outside the sandbox VM. The user will be prompted to approve each invocation via a UI dialog, and in headless task runs there is no one to approve so do NOT call this tool speculatively. Routine git and gh work pushing branches, opening pull requests, etc. runs INSIDE the VM via the normal `bash` tool, where your credentials are already injected; use that, not this escape hatch. Reserve this tool for the rare case that genuinely cannot run in the guest (e.g. reaching a host-only resource the VM has no path to).\n\nAllowed executables: git, gh, moltnet. Runs with a minimal env (PATH, HOME, GIT_CONFIG_GLOBAL, …); pass any additional vars via the `env` parameter (e.g. GH_TOKEN). Every invocation is logged as an auditable host execution.",
8036
7935
  parameters: Type.Object({
8037
7936
  executable: Type.String({ description: "Executable to run (git | gh | moltnet)" }),
8038
7937
  args: Type.Array(Type.String(), { description: "Arguments to pass to the executable" }),
@@ -9477,6 +9376,60 @@ var CuratePackOutput = Type$1.Object({
9477
9376
  additionalProperties: false
9478
9377
  });
9479
9378
  //#endregion
9379
+ //#region ../tasks/src/task-types/freeform.ts
9380
+ var FREEFORM_TYPE = "freeform";
9381
+ var FreeformExecutionOptions = Type$1.Object({ workspace: Type$1.Optional(Type$1.Union([
9382
+ Type$1.Literal("none"),
9383
+ Type$1.Literal("shared_mount"),
9384
+ Type$1.Literal("dedicated_worktree")
9385
+ ])) }, {
9386
+ $id: "FreeformExecutionOptions",
9387
+ additionalProperties: false
9388
+ });
9389
+ var FreeformTaskTypeProposal = Type$1.Object({
9390
+ name: Type$1.String({ minLength: 1 }),
9391
+ rationale: Type$1.String({ minLength: 1 }),
9392
+ inputShape: Type$1.Optional(Type$1.Record(Type$1.String(), Type$1.Unknown())),
9393
+ outputShape: Type$1.Optional(Type$1.Record(Type$1.String(), Type$1.Unknown()))
9394
+ }, {
9395
+ $id: "FreeformTaskTypeProposal",
9396
+ additionalProperties: false
9397
+ });
9398
+ var FreeformInput = Type$1.Object({
9399
+ title: Type$1.Optional(Type$1.String({ minLength: 1 })),
9400
+ brief: Type$1.String({ minLength: 1 }),
9401
+ expectedOutput: Type$1.Optional(Type$1.String({ minLength: 1 })),
9402
+ constraints: Type$1.Optional(Type$1.Array(Type$1.String({ minLength: 1 }), { maxItems: 20 })),
9403
+ suggestedTaskType: Type$1.Optional(Type$1.String({ minLength: 1 })),
9404
+ successCriteria: Type$1.Optional(SuccessCriteria),
9405
+ context: Type$1.Optional(TaskContext),
9406
+ execution: Type$1.Optional(FreeformExecutionOptions)
9407
+ }, {
9408
+ $id: "FreeformInput",
9409
+ additionalProperties: false
9410
+ });
9411
+ var FreeformArtifact = Type$1.Object({
9412
+ kind: Type$1.String({ minLength: 1 }),
9413
+ title: Type$1.String({ minLength: 1 }),
9414
+ description: Type$1.Optional(Type$1.String({ minLength: 1 })),
9415
+ url: Type$1.Optional(Type$1.String({ minLength: 1 })),
9416
+ path: Type$1.Optional(Type$1.String({ minLength: 1 })),
9417
+ body: Type$1.Optional(Type$1.String({ maxLength: 65536 }))
9418
+ }, {
9419
+ $id: "FreeformArtifact",
9420
+ additionalProperties: false
9421
+ });
9422
+ var FreeformOutput = Type$1.Object({
9423
+ summary: Type$1.String({ minLength: 1 }),
9424
+ artifacts: Type$1.Optional(Type$1.Array(FreeformArtifact, { maxItems: 20 })),
9425
+ proposedTaskType: Type$1.Optional(FreeformTaskTypeProposal),
9426
+ diaryEntryIds: Type$1.Optional(Type$1.Array(Type$1.String({ format: "uuid" }))),
9427
+ verification: Type$1.Optional(VerificationRecord)
9428
+ }, {
9429
+ $id: "FreeformOutput",
9430
+ additionalProperties: false
9431
+ });
9432
+ //#endregion
9480
9433
  //#region ../tasks/src/task-types/fulfill-brief.ts
9481
9434
  /**
9482
9435
  * `fulfill_brief` — produce a signed change against a coding brief.
@@ -10035,6 +9988,19 @@ function requireVerificationWhenCriteriaPresent(output, input) {
10035
9988
  * / claiming a task.
10036
9989
  */
10037
9990
  var BUILT_IN_TASK_TYPES = {
9991
+ [FREEFORM_TYPE]: {
9992
+ name: FREEFORM_TYPE,
9993
+ inputSchema: FreeformInput,
9994
+ outputSchema: FreeformOutput,
9995
+ outputKind: "artifact",
9996
+ resumable: true,
9997
+ workspaceMode: "shared_mount",
9998
+ workspaceScope: "session",
9999
+ sessionScope: "correlation",
10000
+ acceptsInputWorkspaceOverride: true,
10001
+ requiresReferences: false,
10002
+ validateOutput: requireVerificationWhenCriteriaPresent
10003
+ },
10038
10004
  [FULFILL_BRIEF_TYPE]: {
10039
10005
  name: FULFILL_BRIEF_TYPE,
10040
10006
  inputSchema: FulfillBriefInput,
@@ -10112,6 +10078,7 @@ var BUILT_IN_TASK_TYPES = {
10112
10078
  resumable: true,
10113
10079
  workspaceScope: "session",
10114
10080
  sessionScope: "custom",
10081
+ acceptsInputWorkspaceOverride: true,
10115
10082
  requiresReferences: false,
10116
10083
  validateOutput: validateRunEvalOutput
10117
10084
  },
@@ -10967,6 +10934,95 @@ function buildCuratePackUserPrompt(input, ctx) {
10967
10934
  ]);
10968
10935
  }
10969
10936
  //#endregion
10937
+ //#region ../agent-runtime/src/prompts/freeform.ts
10938
+ function buildFreeformUserPrompt(input, ctx) {
10939
+ const header = [
10940
+ "# Freeform Task Agent",
10941
+ "",
10942
+ "You are handling an exploratory MoltNet task that does not yet have a",
10943
+ "more specific execution contract. Treat the brief as the source of truth,",
10944
+ "use judgment, and keep the result useful enough for a human or another",
10945
+ "agent to continue from it.",
10946
+ "",
10947
+ `Task id: \`${ctx.taskId}\``
10948
+ ].join("\n");
10949
+ const expectedOutput = input.expectedOutput ?? "";
10950
+ const constraints = input.constraints?.length ? input.constraints.map((constraint) => `- ${constraint}`).join("\n") : "";
10951
+ const suggestedTaskType = input.suggestedTaskType ? [`The proposer suggested task type \`${input.suggestedTaskType}\`.`, "Use it as a hint, not as a contract."].join("\n") : "";
10952
+ const workflow = [
10953
+ "1. Clarify the real objective from the brief before acting.",
10954
+ "2. Gather enough context to avoid guessing.",
10955
+ "3. Complete the requested work when it is safe and bounded.",
10956
+ "4. If the request reveals a recurring task shape, include a",
10957
+ " `proposedTaskType` in the final output with a concise rationale."
10958
+ ].join("\n");
10959
+ return assembleTaskPrompt("freeform", [
10960
+ {
10961
+ id: "freeform.header",
10962
+ source: "header",
10963
+ body: header
10964
+ },
10965
+ {
10966
+ id: "freeform.title",
10967
+ source: "task_input",
10968
+ header: "Title",
10969
+ body: input.title ?? ""
10970
+ },
10971
+ {
10972
+ id: "freeform.brief",
10973
+ source: "task_input",
10974
+ header: "Brief",
10975
+ body: input.brief
10976
+ },
10977
+ {
10978
+ id: "freeform.expected_output",
10979
+ source: "task_input",
10980
+ header: "Expected Output",
10981
+ body: expectedOutput
10982
+ },
10983
+ {
10984
+ id: "freeform.constraints",
10985
+ source: "task_input",
10986
+ header: "Constraints",
10987
+ body: constraints
10988
+ },
10989
+ {
10990
+ id: "freeform.suggested_task_type",
10991
+ source: "task_input",
10992
+ header: "Suggested Task Type",
10993
+ body: suggestedTaskType
10994
+ },
10995
+ {
10996
+ id: "freeform.workflow",
10997
+ source: "static",
10998
+ header: "Workflow",
10999
+ body: workflow
11000
+ },
11001
+ {
11002
+ id: "freeform.verification",
11003
+ source: "verification",
11004
+ body: buildSelfVerificationBlock(ctx.taskId)
11005
+ },
11006
+ {
11007
+ id: "freeform.final_output",
11008
+ source: "final_output",
11009
+ body: buildFinalOutputBlock({
11010
+ taskType: "freeform",
11011
+ outputSchemaName: "FreeformOutput",
11012
+ shapeSketch: [
11013
+ "{",
11014
+ " \"summary\": \"<2-5 sentence result>\",",
11015
+ " \"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>\" }],",
11016
+ " \"proposedTaskType\": { \"name\": \"...\", \"rationale\": \"...\", \"inputShape\": {}, \"outputShape\": {} },",
11017
+ " \"diaryEntryIds\": [\"...\"],",
11018
+ " \"verification\": <required iff input.successCriteria; see Self-verification>",
11019
+ "}"
11020
+ ].join("\n")
11021
+ })
11022
+ }
11023
+ ]);
11024
+ }
11025
+ //#endregion
10970
11026
  //#region ../agent-runtime/src/prompts/fulfill-brief.ts
10971
11027
  /**
10972
11028
  * Build the first user-message prompt for a `fulfill_brief` task.
@@ -11016,7 +11072,11 @@ function buildFulfillBriefUserPrompt(input, ctx) {
11016
11072
  "5. For every commit, create a signed diary entry first via",
11017
11073
  " `moltnet_create_entry` and embed its id in the commit trailer",
11018
11074
  " `MoltNet-Diary: <id>` (per the runtime instructor).",
11019
- "6. Push the branch and open a PR."
11075
+ "6. Push the branch and open a PR — run `git push` and `gh pr create`",
11076
+ " IN the VM with your normal `bash` tool (use the",
11077
+ " `GH_TOKEN=$(moltnet github token …) gh …` form from the runtime",
11078
+ " instructor). Do NOT use `moltnet_host_exec` for this; it needs human",
11079
+ " approval that is unavailable in a headless run."
11020
11080
  ].join("\n");
11021
11081
  return assembleTaskPrompt("fulfill_brief", [
11022
11082
  {
@@ -11716,6 +11776,12 @@ function buildRunEvalUserPrompt(input, ctx) {
11716
11776
  */
11717
11777
  function buildTaskUserPrompt(task, ctx) {
11718
11778
  switch (task.taskType) {
11779
+ case FREEFORM_TYPE:
11780
+ if (!Value.Check(FreeformInput, task.input)) {
11781
+ const errors = [...Value.Errors(FreeformInput, task.input)];
11782
+ throw new Error(`freeform input failed validation: ${JSON.stringify(errors.slice(0, 3))}`);
11783
+ }
11784
+ return buildFreeformUserPrompt(task.input, { taskId: ctx.taskId });
11719
11785
  case FULFILL_BRIEF_TYPE:
11720
11786
  if (!Value.Check(FulfillBriefInput, task.input)) {
11721
11787
  const errors = [...Value.Errors(FulfillBriefInput, task.input)];
@@ -15453,6 +15519,11 @@ function buildRuntimeInstructor(ctx) {
15453
15519
  "",
15454
15520
  "- `git push` uses the gitconfig-configured credential helper and is not",
15455
15521
  " a `gh` call — it does not need `GH_TOKEN`.",
15522
+ "- Run `git` and `gh` in the VM with your normal `bash` tool — your",
15523
+ " credentials are injected here, so they work in the guest. The",
15524
+ " `moltnet_host_exec` tool is a last-resort host escape-hatch that",
15525
+ " requires human approval and is unavailable in headless task runs;",
15526
+ " never use it for routine git/gh.",
15456
15527
  "",
15457
15528
  "## Diary discipline",
15458
15529
  "",
@@ -16515,7 +16586,7 @@ async function executePiTask(claimedTask, reporter, opts) {
16515
16586
  is_error: event.isError,
16516
16587
  result: event.isError ? truncateForWire(event.result) : void 0
16517
16588
  }));
16518
- if (event.isError) track(emitError("tool_call_error", describeToolErrorMessage(event.result), {
16589
+ if (shouldEmitToolCallError(event)) track(emitError("tool_call_error", describeToolErrorMessage(event.result), {
16519
16590
  tool: event.toolName,
16520
16591
  result: truncateForWire(event.result)
16521
16592
  }));
@@ -16767,6 +16838,28 @@ function summarizePayloadForLog(kind, payload) {
16767
16838
  }
16768
16839
  }
16769
16840
  /**
16841
+ * Classify a `tool_execution_end` event for telemetry purposes.
16842
+ *
16843
+ * Bash subprocess non-zero exits are routine — agents deliberately probe
16844
+ * absent commands (e.g. `command -v docker` returning 127) and treat the
16845
+ * non-zero exit as data. Surfacing those as `tool_call_error` events floods
16846
+ * the message stream with spurious errors and makes a successful
16847
+ * negative-space probe look like a failing task.
16848
+ *
16849
+ * Reserve the `error` kind for genuine tool-machinery failures (transport,
16850
+ * MCP, malformed response). The `is_error` flag on `tool_call_end` still
16851
+ * records the non-zero exit, so consumers can distinguish ok vs. failed
16852
+ * bash calls without searching for a sibling error event.
16853
+ *
16854
+ * Bash timeouts remain handled separately by the cap-abort path; that
16855
+ * branch doesn't go through `tool_call_error`.
16856
+ */
16857
+ function shouldEmitToolCallError(event) {
16858
+ if (!event.isError) return false;
16859
+ if (event.toolName === "bash") return false;
16860
+ return true;
16861
+ }
16862
+ /**
16770
16863
  * Detect pi's bash-timeout error wrapper in a `tool_execution_end`
16771
16864
  * result. The bash tool surfaces a timeout as a structured tool result
16772
16865
  * `{ content: [{ type: 'text', text: '… Command timed out after N