@isaacthoman/pulpo 0.155.0 → 0.156.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.
- package/dist/index.js +219 -98
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -14817,6 +14817,206 @@ var insightsFiltersSchema = external_exports.object({
|
|
|
14817
14817
|
model: csvFilter
|
|
14818
14818
|
});
|
|
14819
14819
|
|
|
14820
|
+
// ../../packages/contracts/dist/files.js
|
|
14821
|
+
var FILE_NAME_MAX_LENGTH = 255;
|
|
14822
|
+
function normalizeFileName(value) {
|
|
14823
|
+
return value.normalize("NFC").trim();
|
|
14824
|
+
}
|
|
14825
|
+
function fileNameError(name) {
|
|
14826
|
+
if (!name)
|
|
14827
|
+
return "empty";
|
|
14828
|
+
if ([...name].length > FILE_NAME_MAX_LENGTH)
|
|
14829
|
+
return "too_long";
|
|
14830
|
+
if (name === "." || name === "..")
|
|
14831
|
+
return "reserved";
|
|
14832
|
+
for (const character of name) {
|
|
14833
|
+
const code = character.charCodeAt(0);
|
|
14834
|
+
if (character === "/" || code < 32 || code === 127)
|
|
14835
|
+
return "invalid_character";
|
|
14836
|
+
}
|
|
14837
|
+
return null;
|
|
14838
|
+
}
|
|
14839
|
+
var fileNameSchema = external_exports.string().max(4 * FILE_NAME_MAX_LENGTH).transform(normalizeFileName).superRefine((name, context) => {
|
|
14840
|
+
const error51 = fileNameError(name);
|
|
14841
|
+
if (error51)
|
|
14842
|
+
context.addIssue({ code: "custom", message: `Invalid file name (${error51})` });
|
|
14843
|
+
});
|
|
14844
|
+
var fileNodeKindSchema = external_exports.enum(["folder", "doc", "blob", "chat", "shortcut"]);
|
|
14845
|
+
var fileNodeStatusSchema = external_exports.enum(["pending", "ready"]);
|
|
14846
|
+
var fileSystemRoleSchema = external_exports.enum(["chats", "archive"]);
|
|
14847
|
+
var FILE_COLORS = ["red", "orange", "yellow", "green", "teal", "blue", "purple", "pink", "gray"];
|
|
14848
|
+
var fileColorSchema = external_exports.enum(FILE_COLORS);
|
|
14849
|
+
var FILE_ICONS = [
|
|
14850
|
+
"star",
|
|
14851
|
+
"heart",
|
|
14852
|
+
"bookmark",
|
|
14853
|
+
"flag",
|
|
14854
|
+
"book",
|
|
14855
|
+
"briefcase",
|
|
14856
|
+
"code",
|
|
14857
|
+
"music",
|
|
14858
|
+
"image",
|
|
14859
|
+
"camera",
|
|
14860
|
+
"film",
|
|
14861
|
+
"graduation-cap",
|
|
14862
|
+
"home",
|
|
14863
|
+
"globe",
|
|
14864
|
+
"lightbulb",
|
|
14865
|
+
"flask",
|
|
14866
|
+
"rocket",
|
|
14867
|
+
"gamepad",
|
|
14868
|
+
"shopping-cart",
|
|
14869
|
+
"plane",
|
|
14870
|
+
"wallet",
|
|
14871
|
+
"calendar",
|
|
14872
|
+
"lock",
|
|
14873
|
+
"users",
|
|
14874
|
+
"sparkles",
|
|
14875
|
+
"palette",
|
|
14876
|
+
"pen",
|
|
14877
|
+
"wrench",
|
|
14878
|
+
"leaf",
|
|
14879
|
+
"coffee"
|
|
14880
|
+
];
|
|
14881
|
+
var fileIconSchema = external_exports.enum(FILE_ICONS);
|
|
14882
|
+
var fileNodeSchema = external_exports.object({
|
|
14883
|
+
id: external_exports.uuid(),
|
|
14884
|
+
parentId: external_exports.uuid().nullable(),
|
|
14885
|
+
kind: fileNodeKindSchema,
|
|
14886
|
+
name: external_exports.string(),
|
|
14887
|
+
status: fileNodeStatusSchema,
|
|
14888
|
+
mimeType: external_exports.string().nullable(),
|
|
14889
|
+
sizeBytes: external_exports.number().int().nonnegative(),
|
|
14890
|
+
revision: external_exports.number().int().nonnegative(),
|
|
14891
|
+
trashedAt: external_exports.string().nullable(),
|
|
14892
|
+
createdAt: external_exports.string(),
|
|
14893
|
+
updatedAt: external_exports.string(),
|
|
14894
|
+
systemRole: fileSystemRoleSchema.nullable().optional(),
|
|
14895
|
+
color: fileColorSchema.nullable().optional(),
|
|
14896
|
+
icon: fileIconSchema.nullable().optional(),
|
|
14897
|
+
/**
|
|
14898
|
+
* Position among the folder's items, chats included: ascending, newest first on ties. While
|
|
14899
|
+
* pinned, the position in the sidebar's pinned list instead.
|
|
14900
|
+
*/
|
|
14901
|
+
sortOrder: external_exports.number().int().optional(),
|
|
14902
|
+
/** Listed under Pinned at the top of the sidebar (and not in its folder there); Files marks it. */
|
|
14903
|
+
pinned: external_exports.boolean().optional(),
|
|
14904
|
+
/**
|
|
14905
|
+
* Set while the item is an agent's suggestion the owner has not accepted yet: it was created by
|
|
14906
|
+
* an agent working in Suggest mode, and rejecting the suggestion deletes it.
|
|
14907
|
+
*/
|
|
14908
|
+
suggestion: external_exports.object({ changeId: external_exports.uuid() }).nullable().optional(),
|
|
14909
|
+
/** What a shortcut opens. `available` is false while the target is in the trash. */
|
|
14910
|
+
target: external_exports.object({
|
|
14911
|
+
kind: external_exports.enum(["folder", "doc", "blob", "chat"]),
|
|
14912
|
+
id: external_exports.uuid(),
|
|
14913
|
+
name: external_exports.string(),
|
|
14914
|
+
mimeType: external_exports.string().nullable(),
|
|
14915
|
+
systemRole: fileSystemRoleSchema.nullable(),
|
|
14916
|
+
color: fileColorSchema.nullable().optional(),
|
|
14917
|
+
icon: fileIconSchema.nullable().optional(),
|
|
14918
|
+
available: external_exports.boolean()
|
|
14919
|
+
}).nullable().optional()
|
|
14920
|
+
});
|
|
14921
|
+
var createFileFolderSchema = external_exports.object({
|
|
14922
|
+
parentId: external_exports.uuid().nullable().default(null),
|
|
14923
|
+
name: fileNameSchema
|
|
14924
|
+
});
|
|
14925
|
+
var FILE_DOC_MAX_MARKDOWN_LENGTH = 2e6;
|
|
14926
|
+
var createFileDocSchema = external_exports.object({
|
|
14927
|
+
parentId: external_exports.uuid().nullable().default(null),
|
|
14928
|
+
name: fileNameSchema.optional(),
|
|
14929
|
+
/** Initial content, e.g. when importing an uploaded .md file. */
|
|
14930
|
+
markdown: external_exports.string().max(FILE_DOC_MAX_MARKDOWN_LENGTH).optional()
|
|
14931
|
+
});
|
|
14932
|
+
var fileAppearanceFields = {
|
|
14933
|
+
color: fileColorSchema.nullable().optional(),
|
|
14934
|
+
icon: fileIconSchema.nullable().optional()
|
|
14935
|
+
};
|
|
14936
|
+
var updateFileNodeSchema = external_exports.object({
|
|
14937
|
+
name: fileNameSchema.optional(),
|
|
14938
|
+
parentId: external_exports.uuid().nullable().optional(),
|
|
14939
|
+
expectedRevision: external_exports.number().int().nonnegative().optional(),
|
|
14940
|
+
...fileAppearanceFields
|
|
14941
|
+
}).refine((input) => [input.name, input.parentId, input.color, input.icon].some((value) => value !== void 0), { message: "Nothing to update" });
|
|
14942
|
+
var FILE_BATCH_MAX_ITEMS = 500;
|
|
14943
|
+
var fileIdsSchema = external_exports.array(external_exports.uuid()).min(1).max(FILE_BATCH_MAX_ITEMS);
|
|
14944
|
+
var fileNodeIdsSchema = external_exports.object({ ids: fileIdsSchema });
|
|
14945
|
+
var moveFileNodesSchema = external_exports.object({
|
|
14946
|
+
items: external_exports.array(external_exports.object({
|
|
14947
|
+
id: external_exports.uuid(),
|
|
14948
|
+
parentId: external_exports.uuid().nullable(),
|
|
14949
|
+
/** Optional target name, e.g. when undoing a move that had to rename. */
|
|
14950
|
+
name: fileNameSchema.optional()
|
|
14951
|
+
})).min(1).max(FILE_BATCH_MAX_ITEMS)
|
|
14952
|
+
});
|
|
14953
|
+
var saveAttachmentToFilesSchema = external_exports.object({
|
|
14954
|
+
parentId: external_exports.uuid().nullable().default(null),
|
|
14955
|
+
name: fileNameSchema.optional(),
|
|
14956
|
+
replaceId: external_exports.uuid().optional()
|
|
14957
|
+
});
|
|
14958
|
+
var copyFileNodesSchema = external_exports.object({
|
|
14959
|
+
ids: fileIdsSchema,
|
|
14960
|
+
parentId: external_exports.uuid().nullable()
|
|
14961
|
+
});
|
|
14962
|
+
var reserveFileUploadSchema = external_exports.object({
|
|
14963
|
+
parentId: external_exports.uuid().nullable().default(null),
|
|
14964
|
+
name: fileNameSchema,
|
|
14965
|
+
mimeType: external_exports.string().min(1).max(255),
|
|
14966
|
+
// The per-file cap is an admin setting enforced when the upload is reserved.
|
|
14967
|
+
sizeBytes: external_exports.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER)
|
|
14968
|
+
});
|
|
14969
|
+
var fileGridPositionSchema = external_exports.object({
|
|
14970
|
+
x: external_exports.number().int().min(0).max(1e6),
|
|
14971
|
+
y: external_exports.number().int().min(0).max(1e6)
|
|
14972
|
+
});
|
|
14973
|
+
var updateFileFolderLayoutSchema = external_exports.object({
|
|
14974
|
+
folderId: external_exports.uuid().nullable(),
|
|
14975
|
+
snapToGrid: external_exports.boolean().optional(),
|
|
14976
|
+
positions: external_exports.record(external_exports.uuid(), fileGridPositionSchema.nullable()).refine((positions) => Object.keys(positions).length <= 5e3, { message: "Too many positions" }).optional()
|
|
14977
|
+
});
|
|
14978
|
+
var createShortcutSchema = external_exports.object({
|
|
14979
|
+
targetKind: external_exports.enum(["file", "chat"]),
|
|
14980
|
+
targetId: external_exports.uuid(),
|
|
14981
|
+
parentId: external_exports.uuid().nullable().optional(),
|
|
14982
|
+
name: fileNameSchema.optional()
|
|
14983
|
+
});
|
|
14984
|
+
var createSidebarFolderSchema = external_exports.object({
|
|
14985
|
+
/** Client-chosen id, so a folder created offline keeps its identity when replayed. */
|
|
14986
|
+
id: external_exports.uuid().optional(),
|
|
14987
|
+
/** Defaults to the Chats folder. */
|
|
14988
|
+
parentId: external_exports.uuid().nullable().optional(),
|
|
14989
|
+
name: fileNameSchema
|
|
14990
|
+
});
|
|
14991
|
+
var updateSidebarItemSchema = external_exports.object({
|
|
14992
|
+
name: fileNameSchema.optional(),
|
|
14993
|
+
...fileAppearanceFields
|
|
14994
|
+
}).refine((input) => Object.values(input).some((value) => value !== void 0), { message: "Nothing to update" });
|
|
14995
|
+
var moveSidebarItemsSchema = external_exports.object({
|
|
14996
|
+
ids: external_exports.array(external_exports.uuid()).min(1).max(FILE_BATCH_MAX_ITEMS),
|
|
14997
|
+
parentId: external_exports.uuid().nullable(),
|
|
14998
|
+
unpin: external_exports.boolean().optional()
|
|
14999
|
+
});
|
|
15000
|
+
var orderSidebarItemsSchema = external_exports.object({
|
|
15001
|
+
parentId: external_exports.uuid().nullable(),
|
|
15002
|
+
ids: external_exports.array(external_exports.uuid()).min(1).max(1e4)
|
|
15003
|
+
});
|
|
15004
|
+
var pinSidebarItemsSchema = external_exports.object({
|
|
15005
|
+
ids: external_exports.array(external_exports.uuid()).min(1).max(FILE_BATCH_MAX_ITEMS),
|
|
15006
|
+
pinned: external_exports.boolean()
|
|
15007
|
+
});
|
|
15008
|
+
var orderPinnedItemsSchema = external_exports.object({
|
|
15009
|
+
ids: external_exports.array(external_exports.uuid()).min(1).max(1e4)
|
|
15010
|
+
});
|
|
15011
|
+
var archiveItemsSchema = external_exports.object({
|
|
15012
|
+
chatIds: external_exports.array(external_exports.uuid()).max(FILE_BATCH_MAX_ITEMS).default([]),
|
|
15013
|
+
fileIds: external_exports.array(external_exports.uuid()).max(FILE_BATCH_MAX_ITEMS).default([])
|
|
15014
|
+
}).refine((input) => input.chatIds.length + input.fileIds.length > 0, { message: "Nothing to archive" });
|
|
15015
|
+
var FILE_ACCESS_MODES = ["read", "suggest", "write"];
|
|
15016
|
+
var fileAccessModeSchema = external_exports.enum(FILE_ACCESS_MODES);
|
|
15017
|
+
var fileChangeKindSchema = external_exports.enum(["create", "update", "move", "trash"]);
|
|
15018
|
+
var fileChangeStatusSchema = external_exports.enum(["applied", "undone", "pending", "accepted", "rejected"]);
|
|
15019
|
+
|
|
14820
15020
|
// ../../packages/contracts/dist/attachment-limits.js
|
|
14821
15021
|
var MAX_MESSAGE_ATTACHMENTS = 500;
|
|
14822
15022
|
var DEFAULT_MAX_INLINE_IMAGES = 5;
|
|
@@ -16639,98 +16839,6 @@ var shelfMutationSchema = external_exports.object({
|
|
|
16639
16839
|
])
|
|
16640
16840
|
});
|
|
16641
16841
|
|
|
16642
|
-
// ../../packages/contracts/dist/files.js
|
|
16643
|
-
var FILE_NAME_MAX_LENGTH = 255;
|
|
16644
|
-
function normalizeFileName(value) {
|
|
16645
|
-
return value.normalize("NFC").trim();
|
|
16646
|
-
}
|
|
16647
|
-
function fileNameError(name) {
|
|
16648
|
-
if (!name)
|
|
16649
|
-
return "empty";
|
|
16650
|
-
if ([...name].length > FILE_NAME_MAX_LENGTH)
|
|
16651
|
-
return "too_long";
|
|
16652
|
-
if (name === "." || name === "..")
|
|
16653
|
-
return "reserved";
|
|
16654
|
-
for (const character of name) {
|
|
16655
|
-
const code = character.charCodeAt(0);
|
|
16656
|
-
if (character === "/" || code < 32 || code === 127)
|
|
16657
|
-
return "invalid_character";
|
|
16658
|
-
}
|
|
16659
|
-
return null;
|
|
16660
|
-
}
|
|
16661
|
-
var fileNameSchema = external_exports.string().max(4 * FILE_NAME_MAX_LENGTH).transform(normalizeFileName).superRefine((name, context) => {
|
|
16662
|
-
const error51 = fileNameError(name);
|
|
16663
|
-
if (error51)
|
|
16664
|
-
context.addIssue({ code: "custom", message: `Invalid file name (${error51})` });
|
|
16665
|
-
});
|
|
16666
|
-
var fileNodeKindSchema = external_exports.enum(["folder", "doc", "blob"]);
|
|
16667
|
-
var fileNodeStatusSchema = external_exports.enum(["pending", "ready"]);
|
|
16668
|
-
var fileNodeSchema = external_exports.object({
|
|
16669
|
-
id: external_exports.uuid(),
|
|
16670
|
-
parentId: external_exports.uuid().nullable(),
|
|
16671
|
-
kind: fileNodeKindSchema,
|
|
16672
|
-
name: external_exports.string(),
|
|
16673
|
-
status: fileNodeStatusSchema,
|
|
16674
|
-
mimeType: external_exports.string().nullable(),
|
|
16675
|
-
sizeBytes: external_exports.number().int().nonnegative(),
|
|
16676
|
-
revision: external_exports.number().int().nonnegative(),
|
|
16677
|
-
trashedAt: external_exports.string().nullable(),
|
|
16678
|
-
createdAt: external_exports.string(),
|
|
16679
|
-
updatedAt: external_exports.string()
|
|
16680
|
-
});
|
|
16681
|
-
var createFileFolderSchema = external_exports.object({
|
|
16682
|
-
parentId: external_exports.uuid().nullable().default(null),
|
|
16683
|
-
name: fileNameSchema
|
|
16684
|
-
});
|
|
16685
|
-
var FILE_DOC_MAX_MARKDOWN_LENGTH = 2e6;
|
|
16686
|
-
var createFileDocSchema = external_exports.object({
|
|
16687
|
-
parentId: external_exports.uuid().nullable().default(null),
|
|
16688
|
-
name: fileNameSchema.optional(),
|
|
16689
|
-
/** Initial content, e.g. when importing an uploaded .md file. */
|
|
16690
|
-
markdown: external_exports.string().max(FILE_DOC_MAX_MARKDOWN_LENGTH).optional()
|
|
16691
|
-
});
|
|
16692
|
-
var updateFileNodeSchema = external_exports.object({
|
|
16693
|
-
name: fileNameSchema.optional(),
|
|
16694
|
-
parentId: external_exports.uuid().nullable().optional(),
|
|
16695
|
-
expectedRevision: external_exports.number().int().nonnegative().optional()
|
|
16696
|
-
}).refine((input) => input.name !== void 0 || input.parentId !== void 0, { message: "Nothing to update" });
|
|
16697
|
-
var FILE_BATCH_MAX_ITEMS = 500;
|
|
16698
|
-
var fileIdsSchema = external_exports.array(external_exports.uuid()).min(1).max(FILE_BATCH_MAX_ITEMS);
|
|
16699
|
-
var fileNodeIdsSchema = external_exports.object({ ids: fileIdsSchema });
|
|
16700
|
-
var moveFileNodesSchema = external_exports.object({
|
|
16701
|
-
items: external_exports.array(external_exports.object({
|
|
16702
|
-
id: external_exports.uuid(),
|
|
16703
|
-
parentId: external_exports.uuid().nullable(),
|
|
16704
|
-
/** Optional target name, e.g. when undoing a move that had to rename. */
|
|
16705
|
-
name: fileNameSchema.optional()
|
|
16706
|
-
})).min(1).max(FILE_BATCH_MAX_ITEMS)
|
|
16707
|
-
});
|
|
16708
|
-
var saveAttachmentToFilesSchema = external_exports.object({
|
|
16709
|
-
parentId: external_exports.uuid().nullable().default(null),
|
|
16710
|
-
name: fileNameSchema.optional(),
|
|
16711
|
-
replaceId: external_exports.uuid().optional()
|
|
16712
|
-
});
|
|
16713
|
-
var copyFileNodesSchema = external_exports.object({
|
|
16714
|
-
ids: fileIdsSchema,
|
|
16715
|
-
parentId: external_exports.uuid().nullable()
|
|
16716
|
-
});
|
|
16717
|
-
var reserveFileUploadSchema = external_exports.object({
|
|
16718
|
-
parentId: external_exports.uuid().nullable().default(null),
|
|
16719
|
-
name: fileNameSchema,
|
|
16720
|
-
mimeType: external_exports.string().min(1).max(255),
|
|
16721
|
-
// The per-file cap is an admin setting enforced when the upload is reserved.
|
|
16722
|
-
sizeBytes: external_exports.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER)
|
|
16723
|
-
});
|
|
16724
|
-
var fileGridPositionSchema = external_exports.object({
|
|
16725
|
-
x: external_exports.number().int().min(0).max(1e6),
|
|
16726
|
-
y: external_exports.number().int().min(0).max(1e6)
|
|
16727
|
-
});
|
|
16728
|
-
var updateFileFolderLayoutSchema = external_exports.object({
|
|
16729
|
-
folderId: external_exports.uuid().nullable(),
|
|
16730
|
-
snapToGrid: external_exports.boolean().optional(),
|
|
16731
|
-
positions: external_exports.record(external_exports.uuid(), fileGridPositionSchema.nullable()).refine((positions) => Object.keys(positions).length <= 5e3, { message: "Too many positions" }).optional()
|
|
16732
|
-
});
|
|
16733
|
-
|
|
16734
16842
|
// ../../packages/contracts/dist/index.js
|
|
16735
16843
|
var idSchema = external_exports.uuid();
|
|
16736
16844
|
var isoDateSchema = external_exports.iso.datetime();
|
|
@@ -17127,7 +17235,11 @@ var compactionItemSchema = external_exports.object({
|
|
|
17127
17235
|
duration_ms: external_exports.number().int().nonnegative().optional(),
|
|
17128
17236
|
error: external_exports.string().optional(),
|
|
17129
17237
|
covered_through_response_id: idSchema.optional(),
|
|
17130
|
-
before_agent_turn: external_exports.number().int().positive().optional()
|
|
17238
|
+
before_agent_turn: external_exports.number().int().positive().optional(),
|
|
17239
|
+
/** Absent on legacy items, which kept recent turns verbatim instead of user messages. */
|
|
17240
|
+
strategy: external_exports.literal("user_messages").optional(),
|
|
17241
|
+
tokens_after: external_exports.number().int().nonnegative().optional(),
|
|
17242
|
+
token_source: external_exports.enum(["usage", "estimate"]).optional()
|
|
17131
17243
|
});
|
|
17132
17244
|
var recallSourceSchema = external_exports.object({
|
|
17133
17245
|
chat_id: idSchema,
|
|
@@ -17267,6 +17379,9 @@ function applyAgentEventOutput(output, event) {
|
|
|
17267
17379
|
if (event.type === "pulpo.agent.cost_limit" && typeof payload.id === "string") {
|
|
17268
17380
|
return upsertOutputItem(output, (item) => item.type === "pulpo_cost_limit" && item.id === payload.id, payload);
|
|
17269
17381
|
}
|
|
17382
|
+
if (event.type === "pulpo.agent.files.changed") {
|
|
17383
|
+
return upsertOutputItem(output, (item) => item.type === "pulpo_file_changes", payload);
|
|
17384
|
+
}
|
|
17270
17385
|
if (event.type === "pulpo.agent.attachment.created" && typeof payload.attachment_id === "string") {
|
|
17271
17386
|
return upsertOutputItem(output, (item) => item.type === "pulpo_attachment" && item.attachment_id === payload.attachment_id, payload);
|
|
17272
17387
|
}
|
|
@@ -17535,7 +17650,7 @@ var createModelSchema = external_exports.object({
|
|
|
17535
17650
|
minimumOutputReservationTokens: minimumOutputReservationTokensSchema.default(DEFAULT_MINIMUM_OUTPUT_RESERVATION_TOKENS),
|
|
17536
17651
|
compactionEnabled: external_exports.boolean().default(true),
|
|
17537
17652
|
compactionThresholdTokens: external_exports.number().int().min(2e3).max(1e6).default(1e5),
|
|
17538
|
-
|
|
17653
|
+
compactionRetainedUserTokens: external_exports.number().int().min(0).max(1e5).default(2e4),
|
|
17539
17654
|
executionMode: executionModeSchema.default("stream"),
|
|
17540
17655
|
tags: external_exports.array(external_exports.string()).default([]),
|
|
17541
17656
|
allowedParameters: external_exports.array(external_exports.string()).default([]),
|
|
@@ -18118,15 +18233,19 @@ var updateApiKeySchema = external_exports.object({
|
|
|
18118
18233
|
var FILE_SCOPE_ROOT = "root";
|
|
18119
18234
|
var MAX_CHAT_FILE_SCOPES = 20;
|
|
18120
18235
|
var fileScopeIdsSchema = external_exports.array(external_exports.union([external_exports.literal(FILE_SCOPE_ROOT), idSchema])).max(MAX_CHAT_FILE_SCOPES).transform((ids) => [...new Set(ids.map((id) => id.toLowerCase()))]);
|
|
18236
|
+
var fileScopeAccessSchema = external_exports.record(external_exports.union([external_exports.literal(FILE_SCOPE_ROOT), idSchema]), fileAccessModeSchema).refine((access) => Object.keys(access).length <= MAX_CHAT_FILE_SCOPES, { message: "Too many file scope entries" }).transform((access) => Object.fromEntries(Object.entries(access).map(([id, mode]) => [id.toLowerCase(), mode])));
|
|
18121
18237
|
var chatSummarySchema = external_exports.object({
|
|
18122
18238
|
id: idSchema,
|
|
18123
18239
|
title: external_exports.string(),
|
|
18124
18240
|
modelId: external_exports.string(),
|
|
18125
18241
|
pinned: external_exports.boolean(),
|
|
18126
18242
|
folderId: idSchema.nullable(),
|
|
18243
|
+
/** At the top of My files rather than in the Chats folder (folderId is null either way). */
|
|
18244
|
+
inFilesRoot: external_exports.boolean().optional(),
|
|
18127
18245
|
sortOrder: external_exports.number().int().optional(),
|
|
18128
18246
|
temporary: external_exports.boolean(),
|
|
18129
18247
|
fileScopeIds: external_exports.array(external_exports.string()).default([]),
|
|
18248
|
+
fileScopeAccess: external_exports.record(external_exports.string(), fileAccessModeSchema).default({}),
|
|
18130
18249
|
expiresAt: isoDateSchema.nullable().optional(),
|
|
18131
18250
|
updatedAt: isoDateSchema,
|
|
18132
18251
|
activeResponseId: idSchema.nullable(),
|
|
@@ -18143,8 +18262,9 @@ var createChatSchema = external_exports.object({
|
|
|
18143
18262
|
title: external_exports.string().trim().min(1).max(CHAT_TITLE_MAX_LENGTH).optional(),
|
|
18144
18263
|
temporary: external_exports.boolean().default(false),
|
|
18145
18264
|
autoExpire: external_exports.boolean().default(false),
|
|
18146
|
-
/** Files items the agent may
|
|
18147
|
-
fileScopeIds: fileScopeIdsSchema.default([])
|
|
18265
|
+
/** Files items the agent may work with in this chat. */
|
|
18266
|
+
fileScopeIds: fileScopeIdsSchema.default([]),
|
|
18267
|
+
fileScopeAccess: fileScopeAccessSchema.default({})
|
|
18148
18268
|
});
|
|
18149
18269
|
var updateChatSchema = external_exports.object({
|
|
18150
18270
|
title: external_exports.string().trim().min(1).max(CHAT_TITLE_MAX_LENGTH).optional(),
|
|
@@ -18153,7 +18273,8 @@ var updateChatSchema = external_exports.object({
|
|
|
18153
18273
|
modelId: external_exports.string().min(1).optional(),
|
|
18154
18274
|
sortOrder: external_exports.number().int().optional(),
|
|
18155
18275
|
autoExpire: external_exports.boolean().optional(),
|
|
18156
|
-
fileScopeIds: fileScopeIdsSchema.optional()
|
|
18276
|
+
fileScopeIds: fileScopeIdsSchema.optional(),
|
|
18277
|
+
fileScopeAccess: fileScopeAccessSchema.optional()
|
|
18157
18278
|
});
|
|
18158
18279
|
var attachmentIdListSchema = external_exports.array(idSchema).max(MAX_MESSAGE_ATTACHMENTS).refine((ids) => new Set(ids).size === ids.length, { message: "Attachment ids must be unique" });
|
|
18159
18280
|
var timeZoneSchema = external_exports.string().trim().min(1).max(100).refine((value) => {
|
|
@@ -21040,7 +21161,7 @@ async function runModelTest(input) {
|
|
|
21040
21161
|
}
|
|
21041
21162
|
|
|
21042
21163
|
// src/index.ts
|
|
21043
|
-
var CLI_VERSION = true ? "0.
|
|
21164
|
+
var CLI_VERSION = true ? "0.156.2" : "0.1.0";
|
|
21044
21165
|
var CLI_BUNDLED = true;
|
|
21045
21166
|
var commandIo = /* @__PURE__ */ new WeakMap();
|
|
21046
21167
|
var commandClientFactory = /* @__PURE__ */ new WeakMap();
|