@isaacthoman/pulpo 0.178.1 → 0.179.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +45 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -22433,6 +22433,8 @@ var PROFILE_AVATAR_MAX_BYTES = 5 * 1024 * 1024;
|
|
|
22433
22433
|
|
|
22434
22434
|
// ../../packages/contracts/dist/admin-analytics.js
|
|
22435
22435
|
var clientPlatformSchema = external_exports.enum(["web", "desktop", "ios", "android", "cli", "api", "unknown"]);
|
|
22436
|
+
var CLIENT_FEATURES = ["files-permission"];
|
|
22437
|
+
var CLIENT_FEATURES_HEADER_VALUE = CLIENT_FEATURES.join(",");
|
|
22436
22438
|
var analyticsRangeSchema = external_exports.enum(["1h", "24h", "7d", "30d", "90d", "all", "custom"]);
|
|
22437
22439
|
var analyticsBucketSchema = external_exports.enum(["hour", "day"]);
|
|
22438
22440
|
function validTimeZone(value) {
|
|
@@ -24463,6 +24465,28 @@ var archiveItemsSchema = external_exports.object({
|
|
|
24463
24465
|
}).refine((input2) => input2.chatIds.length + input2.fileIds.length > 0, { message: "Nothing to archive" });
|
|
24464
24466
|
var FILE_ACCESS_MODES = ["read", "suggest", "write"];
|
|
24465
24467
|
var fileAccessModeSchema = external_exports.enum(FILE_ACCESS_MODES);
|
|
24468
|
+
var UUID = "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}";
|
|
24469
|
+
var REFERENCE_LINK = new RegExp(`^\\[((?:\\\\.|[^\\]\\\\])*)\\]\\(/files/([df])/(${UUID})\\)$`);
|
|
24470
|
+
var LINKED_REFERENCE = new RegExp(`(?<!\\\\)\\[(?:\\\\.|[^\\]\\\\])*\\]\\(/files/[df]/(${UUID})\\)`, "g");
|
|
24471
|
+
var filesPermissionItemSchema = external_exports.object({
|
|
24472
|
+
id: external_exports.string().min(1),
|
|
24473
|
+
type: external_exports.literal("pulpo_files_permission"),
|
|
24474
|
+
status: external_exports.enum(["awaiting_decision", "allowed", "always_allowed", "denied", "expired"]),
|
|
24475
|
+
/** The `pulpo files` command that asked, e.g. `ls`. */
|
|
24476
|
+
command: external_exports.string().max(40),
|
|
24477
|
+
/** The path it named; empty for the top of My files. */
|
|
24478
|
+
path: external_exports.string().max(4096),
|
|
24479
|
+
requested_at: external_exports.string(),
|
|
24480
|
+
expires_at: external_exports.string(),
|
|
24481
|
+
decided_at: external_exports.string().optional(),
|
|
24482
|
+
/** The Agent turn whose tool call asked; the item is shown after that turn. */
|
|
24483
|
+
agent_turn: external_exports.number().int().positive().optional()
|
|
24484
|
+
});
|
|
24485
|
+
var filesPermissionDecisionSchema = external_exports.enum(["allow_chat", "allow_always", "deny"]);
|
|
24486
|
+
var filesPermissionAnswerSchema = external_exports.object({
|
|
24487
|
+
itemId: external_exports.string().min(1).max(200),
|
|
24488
|
+
decision: filesPermissionDecisionSchema
|
|
24489
|
+
});
|
|
24466
24490
|
var fileChangeKindSchema = external_exports.enum(["create", "update", "move", "trash"]);
|
|
24467
24491
|
var fileChangeStatusSchema = external_exports.enum(["applied", "undone", "pending", "accepted", "rejected"]);
|
|
24468
24492
|
|
|
@@ -25270,6 +25294,9 @@ function applyAgentEventOutput(output2, event) {
|
|
|
25270
25294
|
if (event.type === "pulpo.agent.cost_limit" && typeof payload.id === "string") {
|
|
25271
25295
|
return upsertOutputItem(output2, (item) => item.type === "pulpo_cost_limit" && item.id === payload.id, payload);
|
|
25272
25296
|
}
|
|
25297
|
+
if (event.type === "pulpo.agent.files_permission" && typeof payload.id === "string") {
|
|
25298
|
+
return upsertOutputItem(output2, (item) => item.type === "pulpo_files_permission" && item.id === payload.id, payload);
|
|
25299
|
+
}
|
|
25273
25300
|
if (event.type === "pulpo.agent.files.changed") {
|
|
25274
25301
|
return upsertOutputItem(output2, (item) => item.type === "pulpo_file_changes", payload);
|
|
25275
25302
|
}
|
|
@@ -25951,6 +25978,10 @@ var managementAccountSettingsSchema = external_exports.object({
|
|
|
25951
25978
|
showResponseCost: external_exports.boolean().default(false),
|
|
25952
25979
|
agentCostLimitEnabled: external_exports.boolean().default(true),
|
|
25953
25980
|
agentCostLimitMicros: agentCostLimitMicrosSchema,
|
|
25981
|
+
/** Ask before an Agent reply browses Files beyond the items mentioned in its chat. */
|
|
25982
|
+
agentFilesAskBeforeBrowsing: external_exports.boolean().default(true),
|
|
25983
|
+
/** What the agent may change in Files in new chats. */
|
|
25984
|
+
agentFileChangeMode: fileAccessModeSchema.default("suggest"),
|
|
25954
25985
|
chatWidth: external_exports.enum(["full", "narrow"]).default("narrow"),
|
|
25955
25986
|
animationSpeed: animationSpeedSchema,
|
|
25956
25987
|
customInstructions: external_exports.string().max(CUSTOM_INSTRUCTIONS_MAX_LENGTH).default(""),
|
|
@@ -26159,7 +26190,7 @@ var updateApiKeySchema = external_exports.object({
|
|
|
26159
26190
|
message: "Provide at least one API key setting"
|
|
26160
26191
|
});
|
|
26161
26192
|
var FILE_SCOPE_ROOT = "root";
|
|
26162
|
-
var MAX_CHAT_FILE_SCOPES =
|
|
26193
|
+
var MAX_CHAT_FILE_SCOPES = 50;
|
|
26163
26194
|
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()))]);
|
|
26164
26195
|
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])));
|
|
26165
26196
|
var chatSummarySchema = external_exports.object({
|
|
@@ -26174,6 +26205,10 @@ var chatSummarySchema = external_exports.object({
|
|
|
26174
26205
|
temporary: external_exports.boolean(),
|
|
26175
26206
|
fileScopeIds: external_exports.array(external_exports.string()).default([]),
|
|
26176
26207
|
fileScopeAccess: external_exports.record(external_exports.string(), fileAccessModeSchema).default({}),
|
|
26208
|
+
/** What the agent may change in Files in this chat; items it only browsed to get at most BROWSED_FILES_MODE_LIMIT. */
|
|
26209
|
+
fileChangeMode: fileAccessModeSchema.default("suggest"),
|
|
26210
|
+
/** The user let the agent browse all of their Files in this chat. */
|
|
26211
|
+
filesBrowseAllowed: external_exports.boolean().default(false),
|
|
26177
26212
|
expiresAt: isoDateSchema.nullable().optional(),
|
|
26178
26213
|
updatedAt: isoDateSchema,
|
|
26179
26214
|
activeResponseId: idSchema.nullable(),
|
|
@@ -26192,7 +26227,9 @@ var createChatSchema = external_exports.object({
|
|
|
26192
26227
|
autoExpire: external_exports.boolean().default(false),
|
|
26193
26228
|
/** Files items the agent may work with in this chat. */
|
|
26194
26229
|
fileScopeIds: fileScopeIdsSchema.default([]),
|
|
26195
|
-
fileScopeAccess: fileScopeAccessSchema.default({})
|
|
26230
|
+
fileScopeAccess: fileScopeAccessSchema.default({}),
|
|
26231
|
+
/** Defaults to the account's `agentFileChangeMode`. */
|
|
26232
|
+
fileChangeMode: fileAccessModeSchema.optional()
|
|
26196
26233
|
});
|
|
26197
26234
|
var updateChatSchema = external_exports.object({
|
|
26198
26235
|
title: external_exports.string().trim().min(1).max(CHAT_TITLE_MAX_LENGTH).optional(),
|
|
@@ -26202,7 +26239,11 @@ var updateChatSchema = external_exports.object({
|
|
|
26202
26239
|
sortOrder: external_exports.number().int().optional(),
|
|
26203
26240
|
autoExpire: external_exports.boolean().optional(),
|
|
26204
26241
|
fileScopeIds: fileScopeIdsSchema.optional(),
|
|
26205
|
-
fileScopeAccess: fileScopeAccessSchema.optional()
|
|
26242
|
+
fileScopeAccess: fileScopeAccessSchema.optional(),
|
|
26243
|
+
/** Applies to every item in the chat's scope: it clears modes older clients set per item. */
|
|
26244
|
+
fileChangeMode: fileAccessModeSchema.optional(),
|
|
26245
|
+
/** Only revoking: browsing is allowed from the agent's permission request. */
|
|
26246
|
+
filesBrowseAllowed: external_exports.literal(false).optional()
|
|
26206
26247
|
});
|
|
26207
26248
|
var attachmentIdListSchema = external_exports.array(idSchema).max(MAX_MESSAGE_ATTACHMENTS).refine((ids) => new Set(ids).size === ids.length, { message: "Attachment ids must be unique" });
|
|
26208
26249
|
var timeZoneSchema = external_exports.string().trim().min(1).max(100).refine((value) => {
|
|
@@ -36712,7 +36753,7 @@ async function runModelTest(input2) {
|
|
|
36712
36753
|
}
|
|
36713
36754
|
|
|
36714
36755
|
// src/index.ts
|
|
36715
|
-
var CLI_VERSION = true ? "0.
|
|
36756
|
+
var CLI_VERSION = true ? "0.179.0" : "0.1.0";
|
|
36716
36757
|
var CLI_BUNDLED = true;
|
|
36717
36758
|
var commandIo = /* @__PURE__ */ new WeakMap();
|
|
36718
36759
|
var commandClientFactory = /* @__PURE__ */ new WeakMap();
|