@isaacthoman/pulpo 0.181.0 → 0.182.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/README.md +20 -0
- package/dist/index.js +346 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,6 +16,26 @@ pulpo model test acme-model "Reply with a short greeting" --no-agent --preset re
|
|
|
16
16
|
|
|
17
17
|
Use `pulpo help` or `pulpo <command> --help` for the complete command reference.
|
|
18
18
|
|
|
19
|
+
### Instance color themes
|
|
20
|
+
|
|
21
|
+
Admins can publish palettes from **Admin → Settings → Color themes** or through
|
|
22
|
+
the settings CLI. Published themes appear in the web and desktop appearance
|
|
23
|
+
picker for everyone on the instance.
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
pulpo --json settings get instance.colorThemes
|
|
27
|
+
pulpo settings set instance.colorThemes '[{"id":"lagoon","name":"Lagoon","light":{"colors":{"button.background":"#0e7490"}},"dark":{"colors":{"button.background":"#22d3ee"}}}]'
|
|
28
|
+
pulpo settings set account.colorTheme instance:lagoon
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Setting `instance.colorThemes` replaces the catalog. To edit a larger catalog,
|
|
32
|
+
export the settings document, update its `instance.colorThemes` array, and use
|
|
33
|
+
`pulpo settings diff --file pulpo-settings.json` and
|
|
34
|
+
`pulpo settings apply --file pulpo-settings.json`. Set the catalog to `[]` to
|
|
35
|
+
remove all shared themes. Each theme can include VS Code workbench colors and
|
|
36
|
+
TextMate token rules for light and dark appearances. Custom CSS is available in
|
|
37
|
+
personal themes.
|
|
38
|
+
|
|
19
39
|
Rebuild a restorable archive from an encrypted offsite snapshot with
|
|
20
40
|
`pulpo backup assemble`. It runs entirely on your machine, using the age identity
|
|
21
41
|
that Pulpo never sees, and needs no Pulpo context:
|
package/dist/index.js
CHANGED
|
@@ -22288,6 +22288,216 @@ var imageGenerationInputSchema = external_exports.object({
|
|
|
22288
22288
|
filename: external_exports.string().trim().min(1).max(255).optional()
|
|
22289
22289
|
}).strict();
|
|
22290
22290
|
|
|
22291
|
+
// ../../packages/contracts/dist/computer.js
|
|
22292
|
+
var COMPUTER_ACCESS_MODES = ["full", "read", "suggest", "write"];
|
|
22293
|
+
var computerAccessSchema = external_exports.enum(COMPUTER_ACCESS_MODES);
|
|
22294
|
+
var COMPUTER_PATH_MAX_LENGTH = 4096;
|
|
22295
|
+
var computerSelectionSchema = external_exports.object({
|
|
22296
|
+
sessionId: external_exports.uuid(),
|
|
22297
|
+
access: computerAccessSchema,
|
|
22298
|
+
/** Absolute path of the chosen folder. Null only with full access, which then starts in the default folder. */
|
|
22299
|
+
folder: external_exports.string().min(1).max(COMPUTER_PATH_MAX_LENGTH).nullable()
|
|
22300
|
+
}).refine((value) => value.access === "full" || value.folder !== null, {
|
|
22301
|
+
message: "Choose a folder to use this access mode",
|
|
22302
|
+
path: ["folder"]
|
|
22303
|
+
});
|
|
22304
|
+
var computerDescriptionSchema = external_exports.object({
|
|
22305
|
+
os: external_exports.enum(["macos", "windows", "linux"]),
|
|
22306
|
+
/** Readable, with the system's name: `macOS 15.2`, `Windows 11 (10.0.26100)`, `Linux 6.8.0`. */
|
|
22307
|
+
osVersion: external_exports.string().max(100),
|
|
22308
|
+
arch: external_exports.string().max(40),
|
|
22309
|
+
/** The shell that runs commands, e.g. `zsh`, `bash`, `pwsh`, `powershell`. */
|
|
22310
|
+
shell: external_exports.string().max(40),
|
|
22311
|
+
home: external_exports.string().max(COMPUTER_PATH_MAX_LENGTH),
|
|
22312
|
+
/** Where commands start: the chosen folder, or the default one. */
|
|
22313
|
+
cwd: external_exports.string().max(COMPUTER_PATH_MAX_LENGTH),
|
|
22314
|
+
/** Where files the user sent in the chat are saved for the agent. */
|
|
22315
|
+
attachmentsDir: external_exports.string().max(COMPUTER_PATH_MAX_LENGTH),
|
|
22316
|
+
/**
|
|
22317
|
+
* Where `pulpo files` keeps its copies of the user's Files on this computer (what
|
|
22318
|
+
* `/workspace/files` is in a cloud workspace). Absent when the app cannot run `pulpo files`
|
|
22319
|
+
* for the agent's commands, and then Files are not offered in a full-access reply.
|
|
22320
|
+
*/
|
|
22321
|
+
filesDir: external_exports.string().max(COMPUTER_PATH_MAX_LENGTH).optional()
|
|
22322
|
+
});
|
|
22323
|
+
var COMPUTER_TRANSFER_PATH = "/api/computer/transfers/";
|
|
22324
|
+
var computerTransferSchema = external_exports.object({
|
|
22325
|
+
url: external_exports.string().max(2048).refine((url2) => url2.startsWith(COMPUTER_TRANSFER_PATH) && !url2.includes(".."), "Invalid transfer URL")
|
|
22326
|
+
});
|
|
22327
|
+
var COMPUTER_INLINE_MAX_BYTES = 256 * 1024;
|
|
22328
|
+
var inlineData = external_exports.string().max(Math.ceil(COMPUTER_INLINE_MAX_BYTES / 3) * 4 + 4);
|
|
22329
|
+
var incomingBytes = { data: inlineData.optional(), transfer: computerTransferSchema.optional() };
|
|
22330
|
+
var oneSource = (value) => value.data === void 0 !== (value.transfer === void 0);
|
|
22331
|
+
var oneSourceMessage = "Send the bytes inline or through a transfer, not both";
|
|
22332
|
+
var COMPUTER_OPERATION_TYPES = ["bash", "read", "write", "edit", "list", "find", "grep"];
|
|
22333
|
+
var computerRelayRequestSchema = external_exports.object({
|
|
22334
|
+
id: external_exports.string().min(1).max(200),
|
|
22335
|
+
command: external_exports.string().max(200),
|
|
22336
|
+
args: external_exports.unknown()
|
|
22337
|
+
});
|
|
22338
|
+
var computerRelayResultSchema = external_exports.discriminatedUnion("ok", [
|
|
22339
|
+
external_exports.object({ ok: external_exports.literal(true), output: external_exports.string(), data: external_exports.unknown().optional() }),
|
|
22340
|
+
external_exports.object({ ok: external_exports.literal(false), error: external_exports.string() })
|
|
22341
|
+
]);
|
|
22342
|
+
var computerOperationSchema = external_exports.object({
|
|
22343
|
+
id: external_exports.string().min(1).max(200),
|
|
22344
|
+
status: external_exports.enum(["running", "completed", "failed", "cancelled"]),
|
|
22345
|
+
output: external_exports.string(),
|
|
22346
|
+
exitCode: external_exports.number().int().nullable(),
|
|
22347
|
+
error: external_exports.string().optional(),
|
|
22348
|
+
details: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
22349
|
+
/** Relay requests waiting for an answer. Present (version 1) on apps that relay `pulpo files`; a long-poll returns at once when one arrives. */
|
|
22350
|
+
relay: external_exports.object({ version: external_exports.number().int(), pending: external_exports.array(computerRelayRequestSchema).max(100) }).optional()
|
|
22351
|
+
});
|
|
22352
|
+
var computerFolderPathSchema = external_exports.string().max(COMPUTER_PATH_MAX_LENGTH);
|
|
22353
|
+
var computerFolderEntrySchema = external_exports.object({
|
|
22354
|
+
path: computerFolderPathSchema,
|
|
22355
|
+
kind: external_exports.enum(["file", "folder"]),
|
|
22356
|
+
sizeBytes: external_exports.number().int().nonnegative(),
|
|
22357
|
+
modifiedAt: external_exports.string()
|
|
22358
|
+
});
|
|
22359
|
+
var computerFolderChangeSchema = external_exports.discriminatedUnion("kind", [
|
|
22360
|
+
external_exports.object({
|
|
22361
|
+
kind: external_exports.literal("put"),
|
|
22362
|
+
path: computerFolderPathSchema.min(1),
|
|
22363
|
+
...incomingBytes,
|
|
22364
|
+
sizeBytes: external_exports.number().int().nonnegative(),
|
|
22365
|
+
/** The version the agent pulled, or null when it believes the file is new. */
|
|
22366
|
+
base: external_exports.string().max(200).nullable(),
|
|
22367
|
+
force: external_exports.boolean().optional()
|
|
22368
|
+
}).refine(oneSource, oneSourceMessage),
|
|
22369
|
+
external_exports.object({ kind: external_exports.literal("mkdir"), path: computerFolderPathSchema.min(1), parents: external_exports.boolean().optional() }),
|
|
22370
|
+
external_exports.object({ kind: external_exports.literal("move"), from: computerFolderPathSchema.min(1), to: computerFolderPathSchema.min(1) }),
|
|
22371
|
+
external_exports.object({ kind: external_exports.literal("remove"), path: computerFolderPathSchema.min(1), recursive: external_exports.boolean().optional() })
|
|
22372
|
+
]);
|
|
22373
|
+
var computerFolderChangeResultSchema = external_exports.object({
|
|
22374
|
+
status: external_exports.enum(["created", "updated", "suggested", "unchanged", "conflict", "denied", "error"]),
|
|
22375
|
+
/** For the agent; empty when the status says it all. */
|
|
22376
|
+
message: external_exports.string(),
|
|
22377
|
+
/** The file's version after the change, or the one it now has on a conflict. */
|
|
22378
|
+
version: external_exports.string().optional()
|
|
22379
|
+
});
|
|
22380
|
+
var operationId = external_exports.string().min(1).max(200);
|
|
22381
|
+
var absolutePath = external_exports.string().min(1).max(COMPUTER_PATH_MAX_LENGTH);
|
|
22382
|
+
var computerMethods = {
|
|
22383
|
+
describe: { params: external_exports.object({}), result: computerDescriptionSchema },
|
|
22384
|
+
// Full access only.
|
|
22385
|
+
"operation.start": {
|
|
22386
|
+
params: external_exports.object({ id: operationId, type: external_exports.enum(COMPUTER_OPERATION_TYPES), args: external_exports.record(external_exports.string(), external_exports.unknown()) }),
|
|
22387
|
+
result: computerOperationSchema
|
|
22388
|
+
},
|
|
22389
|
+
/** Returns early when the operation stops or prints something new; otherwise after `waitMs`. */
|
|
22390
|
+
"operation.get": { params: external_exports.object({ id: operationId, waitMs: external_exports.number().int().min(0).max(25e3).optional() }), result: computerOperationSchema },
|
|
22391
|
+
"operation.cancel": { params: external_exports.object({ id: operationId }), result: computerOperationSchema },
|
|
22392
|
+
/** Answers one pending relay request of a running operation. `delivered` is false when the command no longer waits for it. */
|
|
22393
|
+
"operation.relay": {
|
|
22394
|
+
params: external_exports.object({ requestId: external_exports.string().min(1).max(200), result: computerRelayResultSchema }),
|
|
22395
|
+
result: external_exports.object({ delivered: external_exports.boolean() })
|
|
22396
|
+
},
|
|
22397
|
+
/** Sends a file on the computer to the server (attach_file, view_image): inline when it is small, else through the transfer. */
|
|
22398
|
+
"file.send": {
|
|
22399
|
+
params: external_exports.object({ path: absolutePath, transfer: computerTransferSchema, maxBytes: external_exports.number().int().positive() }),
|
|
22400
|
+
result: external_exports.object({ sizeBytes: external_exports.number().int().nonnegative(), data: inlineData.optional() })
|
|
22401
|
+
},
|
|
22402
|
+
/** Saves a file from the server on the computer (chat attachments, generated images). */
|
|
22403
|
+
"file.receive": {
|
|
22404
|
+
params: external_exports.object({
|
|
22405
|
+
path: absolutePath,
|
|
22406
|
+
...incomingBytes,
|
|
22407
|
+
sizeBytes: external_exports.number().int().nonnegative(),
|
|
22408
|
+
/** Hex SHA-256 of the bytes, when known; the desktop app rejects a mismatch. */
|
|
22409
|
+
sha256: external_exports.string().regex(/^[a-f0-9]{64}$/).optional()
|
|
22410
|
+
}).refine(oneSource, oneSourceMessage),
|
|
22411
|
+
result: external_exports.object({ path: external_exports.string() })
|
|
22412
|
+
},
|
|
22413
|
+
/** Which of these files are absent or differ, so only those are sent. */
|
|
22414
|
+
"file.missing": {
|
|
22415
|
+
params: external_exports.object({ files: external_exports.array(external_exports.object({ path: absolutePath, sizeBytes: external_exports.number().int().nonnegative(), sha256: external_exports.string().nullable() })).max(500) }),
|
|
22416
|
+
result: external_exports.object({ missing: external_exports.array(external_exports.string()) })
|
|
22417
|
+
},
|
|
22418
|
+
// Folder modes only. Paths are relative to the session's folder.
|
|
22419
|
+
/** Entries below `path`, depth-first in name order, `depth` levels deep (1: direct children). */
|
|
22420
|
+
"folder.list": {
|
|
22421
|
+
params: external_exports.object({
|
|
22422
|
+
path: computerFolderPathSchema,
|
|
22423
|
+
depth: external_exports.number().int().min(1).max(64),
|
|
22424
|
+
limit: external_exports.number().int().min(1).max(1e4),
|
|
22425
|
+
/** Leave out folders (pull planning). */
|
|
22426
|
+
filesOnly: external_exports.boolean().optional()
|
|
22427
|
+
}),
|
|
22428
|
+
result: external_exports.object({
|
|
22429
|
+
/** When `path` is a file, just that file. */
|
|
22430
|
+
entries: external_exports.array(computerFolderEntrySchema),
|
|
22431
|
+
truncated: external_exports.boolean(),
|
|
22432
|
+
/** Folders left out by name (`.git`, `node_modules`), relative to the session's folder. */
|
|
22433
|
+
skipped: external_exports.array(external_exports.string()).optional()
|
|
22434
|
+
})
|
|
22435
|
+
},
|
|
22436
|
+
/** A UTF-8 text file's contents. Fails for anything else. */
|
|
22437
|
+
"folder.read": {
|
|
22438
|
+
params: external_exports.object({ path: computerFolderPathSchema.min(1), maxBytes: external_exports.number().int().positive() }),
|
|
22439
|
+
result: external_exports.object({ text: external_exports.string(), sizeBytes: external_exports.number().int().nonnegative(), truncated: external_exports.boolean() })
|
|
22440
|
+
},
|
|
22441
|
+
"folder.search": {
|
|
22442
|
+
params: external_exports.object({
|
|
22443
|
+
pattern: external_exports.string().min(1).max(1e3),
|
|
22444
|
+
path: computerFolderPathSchema,
|
|
22445
|
+
ignoreCase: external_exports.boolean().optional(),
|
|
22446
|
+
/** Match the pattern as plain text, not a regular expression. */
|
|
22447
|
+
fixed: external_exports.boolean().optional(),
|
|
22448
|
+
limit: external_exports.number().int().min(1).max(5e3)
|
|
22449
|
+
}),
|
|
22450
|
+
result: external_exports.object({
|
|
22451
|
+
matches: external_exports.array(external_exports.object({ path: computerFolderPathSchema, line: external_exports.number().int().positive(), text: external_exports.string() })),
|
|
22452
|
+
truncated: external_exports.boolean()
|
|
22453
|
+
})
|
|
22454
|
+
},
|
|
22455
|
+
/**
|
|
22456
|
+
* Sends one file in the folder to the server (pull): inline when it is small, else through the
|
|
22457
|
+
* transfer. `version` identifies these exact bytes; a later `put` names it as its `base`.
|
|
22458
|
+
*/
|
|
22459
|
+
"folder.send": {
|
|
22460
|
+
params: external_exports.object({ path: computerFolderPathSchema.min(1), transfer: computerTransferSchema, maxBytes: external_exports.number().int().positive() }),
|
|
22461
|
+
result: external_exports.object({ sizeBytes: external_exports.number().int().nonnegative(), version: external_exports.string().max(200), data: inlineData.optional() })
|
|
22462
|
+
},
|
|
22463
|
+
/** Applies a change, or stages it as a suggestion, by the session's mode. `responseId` groups a reply's changes. */
|
|
22464
|
+
"folder.change": {
|
|
22465
|
+
params: external_exports.object({ change: computerFolderChangeSchema, responseId: external_exports.uuid() }),
|
|
22466
|
+
result: computerFolderChangeResultSchema
|
|
22467
|
+
}
|
|
22468
|
+
};
|
|
22469
|
+
var COMPUTER_METHODS = Object.keys(computerMethods);
|
|
22470
|
+
var COMPUTER_ERROR_CODES = [
|
|
22471
|
+
/** The app does not know the session: it was restarted, or the message came from elsewhere. */
|
|
22472
|
+
"unknown_session",
|
|
22473
|
+
/** The session's access mode does not allow the method. */
|
|
22474
|
+
"not_allowed",
|
|
22475
|
+
/** A path left the session's folder. */
|
|
22476
|
+
"outside_folder",
|
|
22477
|
+
"not_found",
|
|
22478
|
+
/** Not UTF-8 text, where text was needed. */
|
|
22479
|
+
"not_text",
|
|
22480
|
+
"too_large",
|
|
22481
|
+
"invalid_request",
|
|
22482
|
+
"failed"
|
|
22483
|
+
];
|
|
22484
|
+
var computerRequestSchema = external_exports.object({
|
|
22485
|
+
id: external_exports.uuid(),
|
|
22486
|
+
sessionId: external_exports.uuid(),
|
|
22487
|
+
method: external_exports.enum(COMPUTER_METHODS),
|
|
22488
|
+
params: external_exports.unknown(),
|
|
22489
|
+
/** How long the server waits for the answer. */
|
|
22490
|
+
timeoutMs: external_exports.number().int().positive()
|
|
22491
|
+
});
|
|
22492
|
+
var computerResponseSchema = external_exports.discriminatedUnion("ok", [
|
|
22493
|
+
external_exports.object({ id: external_exports.uuid(), sessionId: external_exports.uuid(), ok: external_exports.literal(true), result: external_exports.unknown() }),
|
|
22494
|
+
external_exports.object({ id: external_exports.uuid(), sessionId: external_exports.uuid(), ok: external_exports.literal(false), code: external_exports.enum(COMPUTER_ERROR_CODES), message: external_exports.string().max(4e3) })
|
|
22495
|
+
]);
|
|
22496
|
+
var computerHostSchema = external_exports.object({ sessionIds: external_exports.array(external_exports.uuid()).max(200) });
|
|
22497
|
+
var COMPUTER_PULL_MAX_FILE_BYTES = 1e3 * 1024 * 1024;
|
|
22498
|
+
var COMPUTER_PULL_MAX_BYTES = 500 * 1024 * 1024;
|
|
22499
|
+
var COMPUTER_PUSH_MAX_FILE_BYTES = 25 * 1024 * 1024;
|
|
22500
|
+
|
|
22291
22501
|
// ../../packages/contracts/dist/speech.js
|
|
22292
22502
|
var SPEECH_REQUEST_MAX_INPUT_LENGTH = 16384;
|
|
22293
22503
|
var SPEECH_MAX_INSTRUCTIONS_LENGTH = 4096;
|
|
@@ -22400,6 +22610,120 @@ var VOXTRAL_SPEECH_PRESET = {
|
|
|
22400
22610
|
outputPriceMicros: 0
|
|
22401
22611
|
};
|
|
22402
22612
|
|
|
22613
|
+
// ../../packages/contracts/dist/color-themes.js
|
|
22614
|
+
var THEME_COLOR_KEYS = [
|
|
22615
|
+
"editor.background",
|
|
22616
|
+
"editorWidget.background",
|
|
22617
|
+
"button.secondaryBackground",
|
|
22618
|
+
"list.hoverBackground",
|
|
22619
|
+
"foreground",
|
|
22620
|
+
"descriptionForeground",
|
|
22621
|
+
"panel.border",
|
|
22622
|
+
"input.border",
|
|
22623
|
+
"button.background",
|
|
22624
|
+
"button.foreground",
|
|
22625
|
+
"focusBorder",
|
|
22626
|
+
"chat.requestBackground",
|
|
22627
|
+
"textCodeBlock.background",
|
|
22628
|
+
"sideBar.background",
|
|
22629
|
+
"list.activeSelectionBackground",
|
|
22630
|
+
"sideBar.border",
|
|
22631
|
+
"errorForeground",
|
|
22632
|
+
"diffEditor.insertedTextBackground",
|
|
22633
|
+
"diffEditor.removedTextBackground",
|
|
22634
|
+
"pulpo.temporaryChatBackground",
|
|
22635
|
+
"pulpo.temporaryChatSurface",
|
|
22636
|
+
"pulpo.temporaryChatBorder",
|
|
22637
|
+
"pulpo.temporaryChatForeground",
|
|
22638
|
+
"pulpo.temporaryChatToggleForeground",
|
|
22639
|
+
"pulpo.expiringChatForeground",
|
|
22640
|
+
"pulpo.planForeground"
|
|
22641
|
+
];
|
|
22642
|
+
var THEME_NAME_MAX_LENGTH = 60;
|
|
22643
|
+
var THEME_CSS_MAX_LENGTH = 16e3;
|
|
22644
|
+
var THEME_TOKEN_RULES_MAX = 40;
|
|
22645
|
+
var CUSTOM_THEMES_MAX = 20;
|
|
22646
|
+
var DEFAULT_COLOR_THEME_ID = "pulpo";
|
|
22647
|
+
var themeIdSchema = external_exports.string().regex(/^[a-z0-9][a-z0-9-]{0,63}$/);
|
|
22648
|
+
var themeColorValueSchema = external_exports.string().regex(/^#([0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/).transform((value) => value.toLowerCase());
|
|
22649
|
+
var themeColorKeySchema = external_exports.enum(THEME_COLOR_KEYS);
|
|
22650
|
+
var themeColorsSchema = external_exports.preprocess((value) => value && typeof value === "object" && !Array.isArray(value) ? Object.fromEntries(Object.entries(value).filter(([key]) => themeColorKeySchema.safeParse(key).success)) : value, external_exports.partialRecord(themeColorKeySchema, themeColorValueSchema));
|
|
22651
|
+
var scopeSchema = external_exports.string().trim().min(1).max(200);
|
|
22652
|
+
var themeTokenRuleSchema = external_exports.object({
|
|
22653
|
+
name: external_exports.string().max(100).optional(),
|
|
22654
|
+
scope: external_exports.union([scopeSchema, external_exports.array(scopeSchema).min(1).max(30)]),
|
|
22655
|
+
settings: external_exports.object({
|
|
22656
|
+
foreground: themeColorValueSchema.optional(),
|
|
22657
|
+
fontStyle: external_exports.string().max(40).optional()
|
|
22658
|
+
})
|
|
22659
|
+
});
|
|
22660
|
+
var themeVariantSchema = external_exports.object({
|
|
22661
|
+
colors: themeColorsSchema.default({}),
|
|
22662
|
+
tokenColors: external_exports.array(themeTokenRuleSchema).max(THEME_TOKEN_RULES_MAX).default([])
|
|
22663
|
+
});
|
|
22664
|
+
function decodeCss(css) {
|
|
22665
|
+
return css.replace(/\r\n|[\r\f]/g, "\n").replaceAll("\0", "\uFFFD").replace(/\\(?:([0-9a-fA-F]{1,6})[ \t\n]?|([^\n]))/g, (_, code, char) => {
|
|
22666
|
+
if (char !== void 0)
|
|
22667
|
+
return char;
|
|
22668
|
+
const point = parseInt(code, 16);
|
|
22669
|
+
return point > 0 && point <= 1114111 && (point < 55296 || point > 57343) ? String.fromCodePoint(point) : "\uFFFD";
|
|
22670
|
+
});
|
|
22671
|
+
}
|
|
22672
|
+
function unsafeCssRule(source) {
|
|
22673
|
+
if (/@import\b/.test(source))
|
|
22674
|
+
return "Theme CSS cannot use @import.";
|
|
22675
|
+
if (/(^|[^\w-])(-webkit-)?image-set\s*\(|(^|[^\w-])(image|src)\s*\(/.test(source)) {
|
|
22676
|
+
return "Theme CSS cannot use image(), image-set(), or src().";
|
|
22677
|
+
}
|
|
22678
|
+
for (const match of source.matchAll(/url\s*\(/g)) {
|
|
22679
|
+
const target = source.slice(match.index + match[0].length).replace(/^\s*['"]?\s*/, "");
|
|
22680
|
+
if (!target.startsWith("data:") && !target.startsWith("#")) {
|
|
22681
|
+
return "Theme CSS can only use url() with data: or #id targets.";
|
|
22682
|
+
}
|
|
22683
|
+
}
|
|
22684
|
+
return null;
|
|
22685
|
+
}
|
|
22686
|
+
function unsafeThemeCssReason(css) {
|
|
22687
|
+
const source = decodeCss(css).toLowerCase();
|
|
22688
|
+
return unsafeCssRule(source) ?? unsafeCssRule(source.replace(/[\s\\]/g, ""));
|
|
22689
|
+
}
|
|
22690
|
+
var themeCssSchema = external_exports.string().max(THEME_CSS_MAX_LENGTH).default("").superRefine((css, context) => {
|
|
22691
|
+
const reason = unsafeThemeCssReason(css);
|
|
22692
|
+
if (reason)
|
|
22693
|
+
context.addIssue({ code: "custom", message: reason });
|
|
22694
|
+
});
|
|
22695
|
+
var customThemeSchema = external_exports.object({
|
|
22696
|
+
id: themeIdSchema,
|
|
22697
|
+
name: external_exports.string().trim().min(1).max(THEME_NAME_MAX_LENGTH),
|
|
22698
|
+
light: themeVariantSchema.default(() => ({ colors: {}, tokenColors: [] })),
|
|
22699
|
+
dark: themeVariantSchema.default(() => ({ colors: {}, tokenColors: [] })),
|
|
22700
|
+
css: themeCssSchema
|
|
22701
|
+
});
|
|
22702
|
+
function uniqueThemeIds(themes, context) {
|
|
22703
|
+
const seen = /* @__PURE__ */ new Set();
|
|
22704
|
+
themes.forEach((theme, index) => {
|
|
22705
|
+
if (seen.has(theme.id))
|
|
22706
|
+
context.addIssue({ code: "custom", message: "Theme ids must be unique", path: [index, "id"] });
|
|
22707
|
+
seen.add(theme.id);
|
|
22708
|
+
});
|
|
22709
|
+
}
|
|
22710
|
+
var customThemesSchema = external_exports.array(customThemeSchema).max(CUSTOM_THEMES_MAX).superRefine(uniqueThemeIds);
|
|
22711
|
+
var instanceColorThemeSchema = customThemeSchema.extend({
|
|
22712
|
+
css: external_exports.literal("", { error: "Instance themes cannot include custom CSS." }).default("")
|
|
22713
|
+
});
|
|
22714
|
+
var instanceColorThemesSchema = external_exports.array(instanceColorThemeSchema).max(CUSTOM_THEMES_MAX).superRefine(uniqueThemeIds);
|
|
22715
|
+
var instanceColorThemesSnapshotSchema = external_exports.object({
|
|
22716
|
+
themes: instanceColorThemesSchema,
|
|
22717
|
+
revision: external_exports.string().min(1)
|
|
22718
|
+
});
|
|
22719
|
+
var colorThemeIdSchema = external_exports.string().regex(/^(?:instance:)?[a-z0-9][a-z0-9-]{0,63}$/);
|
|
22720
|
+
var pulpoThemeExtensionSchema = external_exports.object({
|
|
22721
|
+
version: external_exports.literal(1),
|
|
22722
|
+
light: themeVariantSchema.optional(),
|
|
22723
|
+
dark: themeVariantSchema.optional(),
|
|
22724
|
+
css: themeCssSchema.optional()
|
|
22725
|
+
});
|
|
22726
|
+
|
|
22403
22727
|
// ../../packages/contracts/dist/response-timing.js
|
|
22404
22728
|
function record2(value) {
|
|
22405
22729
|
return value !== null && typeof value === "object" ? value : void 0;
|
|
@@ -22445,8 +22769,8 @@ var PROFILE_AVATAR_MAX_BYTES = 5 * 1024 * 1024;
|
|
|
22445
22769
|
|
|
22446
22770
|
// ../../packages/contracts/dist/admin-analytics.js
|
|
22447
22771
|
var clientPlatformSchema = external_exports.enum(["web", "desktop", "ios", "android", "cli", "api", "unknown"]);
|
|
22448
|
-
var
|
|
22449
|
-
var CLIENT_FEATURES_HEADER_VALUE =
|
|
22772
|
+
var COMMON_CLIENT_FEATURES = ["files-permission"];
|
|
22773
|
+
var CLIENT_FEATURES_HEADER_VALUE = COMMON_CLIENT_FEATURES.join(",");
|
|
22450
22774
|
var analyticsRangeSchema = external_exports.enum(["1h", "24h", "7d", "30d", "90d", "all", "custom"]);
|
|
22451
22775
|
var analyticsBucketSchema = external_exports.enum(["hour", "day"]);
|
|
22452
22776
|
function validTimeZone(value) {
|
|
@@ -25315,6 +25639,9 @@ function applyAgentEventOutput(output2, event) {
|
|
|
25315
25639
|
if (event.type === "pulpo.agent.files.changed") {
|
|
25316
25640
|
return upsertOutputItem(output2, (item) => item.type === "pulpo_file_changes", payload);
|
|
25317
25641
|
}
|
|
25642
|
+
if (event.type === "pulpo.agent.computer.changed") {
|
|
25643
|
+
return upsertOutputItem(output2, (item) => item.type === "pulpo_computer_changes", payload);
|
|
25644
|
+
}
|
|
25318
25645
|
if (event.type === "pulpo.agent.attachment.created" && typeof payload.attachment_id === "string") {
|
|
25319
25646
|
return upsertOutputItem(output2, (item) => item.type === "pulpo_attachment" && item.attachment_id === payload.attachment_id, payload);
|
|
25320
25647
|
}
|
|
@@ -25665,6 +25992,8 @@ var agentSettingsSchema = external_exports.object({
|
|
|
25665
25992
|
commandTimeoutSeconds: external_exports.number().int().min(1).max(3600).default(600),
|
|
25666
25993
|
maxToolOutputBytes: external_exports.number().int().min(1024).max(1e7).default(1e5),
|
|
25667
25994
|
billWorkspaces: external_exports.boolean().default(false),
|
|
25995
|
+
/** Lets desktop apps lend the agent the computer they run on ("This computer"). */
|
|
25996
|
+
computerAccess: external_exports.boolean().default(true),
|
|
25668
25997
|
workspacePricePerMinuteMicros: external_exports.number().int().min(0).max(1e9).default(1e4)
|
|
25669
25998
|
});
|
|
25670
25999
|
var episodicMemoryProfileSchema = external_exports.enum(["embeddinggemma", "qwen3-embedding"]);
|
|
@@ -25982,6 +26311,9 @@ var managementAccountSettingsSchema = external_exports.object({
|
|
|
25982
26311
|
imageGeneration: imageGenerationPreferencesSchema,
|
|
25983
26312
|
speech: speechPreferencesSchema,
|
|
25984
26313
|
theme: external_exports.enum(["light", "dark", "system"]).default("system"),
|
|
26314
|
+
/** The selected color theme: a built-in theme id or one of `customThemes`. */
|
|
26315
|
+
colorTheme: colorThemeIdSchema.default(DEFAULT_COLOR_THEME_ID),
|
|
26316
|
+
customThemes: customThemesSchema.default([]),
|
|
25985
26317
|
language: external_exports.string().min(1).max(32).default("en-US"),
|
|
25986
26318
|
composerSyncEnabled: external_exports.boolean().default(true),
|
|
25987
26319
|
sendWithEnter: external_exports.boolean().default(true),
|
|
@@ -26040,6 +26372,7 @@ var managementWebToolsSettingsSchema = webToolsSettingsSchema.extend({
|
|
|
26040
26372
|
]).optional()
|
|
26041
26373
|
});
|
|
26042
26374
|
var managementInstanceSettingsSchema = external_exports.object({
|
|
26375
|
+
colorThemes: instanceColorThemesSchema.optional(),
|
|
26043
26376
|
auth: authSettingsSchema.default(() => authSettingsSchema.parse({})),
|
|
26044
26377
|
interface: interfaceSettingsSchema.default(() => interfaceSettingsSchema.parse({})),
|
|
26045
26378
|
personalization: personalizationSettingsSchema.default(() => personalizationSettingsSchema.parse({})),
|
|
@@ -26282,6 +26615,8 @@ var createChatResponseSchema = external_exports.object({
|
|
|
26282
26615
|
presetSelections: external_exports.record(external_exports.string(), external_exports.string()).default({}),
|
|
26283
26616
|
attachmentIds: attachmentIdListSchema.default([]),
|
|
26284
26617
|
agentMode: external_exports.boolean().default(false),
|
|
26618
|
+
/** The sender's computer, when the desktop app lends it to the agent for this message. */
|
|
26619
|
+
computer: computerSelectionSchema.optional(),
|
|
26285
26620
|
/** Analytics only: whether dictation produced any of the message text. */
|
|
26286
26621
|
usedDictation: external_exports.boolean().optional()
|
|
26287
26622
|
}).refine((value) => value.input.length > 0 || value.attachmentIds.length > 0, {
|
|
@@ -26295,7 +26630,8 @@ var editMessageSchema = external_exports.object({
|
|
|
26295
26630
|
modelId: external_exports.string().trim().min(1).optional(),
|
|
26296
26631
|
presetSelections: external_exports.record(external_exports.string(), external_exports.string()).optional(),
|
|
26297
26632
|
attachmentIds: attachmentIdListSchema.optional(),
|
|
26298
|
-
agentMode: external_exports.boolean().optional()
|
|
26633
|
+
agentMode: external_exports.boolean().optional(),
|
|
26634
|
+
computer: computerSelectionSchema.optional()
|
|
26299
26635
|
});
|
|
26300
26636
|
var queuedMessageStatusSchema = external_exports.enum(["pending", "editing", "dispatching", "failed"]);
|
|
26301
26637
|
var queuedMessageAttachmentSchema = external_exports.object({
|
|
@@ -26311,6 +26647,8 @@ var queuedMessageSchema = external_exports.object({
|
|
|
26311
26647
|
modelId: external_exports.string(),
|
|
26312
26648
|
presetSelections: external_exports.record(external_exports.string(), external_exports.string()),
|
|
26313
26649
|
agentMode: external_exports.boolean(),
|
|
26650
|
+
/** Absent from servers that predate it. */
|
|
26651
|
+
computer: computerSelectionSchema.nullable().optional(),
|
|
26314
26652
|
position: external_exports.number().int().nonnegative(),
|
|
26315
26653
|
status: queuedMessageStatusSchema,
|
|
26316
26654
|
error: external_exports.string().nullable(),
|
|
@@ -26326,6 +26664,8 @@ var createQueuedMessageSchema = external_exports.object({
|
|
|
26326
26664
|
presetSelections: external_exports.record(external_exports.string(), external_exports.string()).default({}),
|
|
26327
26665
|
attachmentIds: attachmentIdListSchema.default([]),
|
|
26328
26666
|
agentMode: external_exports.boolean().default(false),
|
|
26667
|
+
/** The sender's computer, when the desktop app lends it to the agent for this message. */
|
|
26668
|
+
computer: computerSelectionSchema.optional(),
|
|
26329
26669
|
/** Analytics only: whether dictation produced any of the message text. */
|
|
26330
26670
|
usedDictation: external_exports.boolean().optional()
|
|
26331
26671
|
}).refine((value) => value.input.length > 0 || value.attachmentIds.length > 0, {
|
|
@@ -26342,7 +26682,8 @@ var updateQueuedMessageSchema = external_exports.discriminatedUnion("action", [
|
|
|
26342
26682
|
modelId: external_exports.string().min(1),
|
|
26343
26683
|
presetSelections: external_exports.record(external_exports.string(), external_exports.string()).default({}),
|
|
26344
26684
|
attachmentIds: attachmentIdListSchema.default([]),
|
|
26345
|
-
agentMode: external_exports.boolean().default(false)
|
|
26685
|
+
agentMode: external_exports.boolean().default(false),
|
|
26686
|
+
computer: computerSelectionSchema.optional()
|
|
26346
26687
|
}).refine((value) => value.input.length > 0 || value.attachmentIds.length > 0, {
|
|
26347
26688
|
message: "Message must include text or attachments",
|
|
26348
26689
|
path: ["input"]
|
|
@@ -36768,7 +37109,7 @@ async function runModelTest(input2) {
|
|
|
36768
37109
|
}
|
|
36769
37110
|
|
|
36770
37111
|
// src/index.ts
|
|
36771
|
-
var CLI_VERSION = true ? "0.
|
|
37112
|
+
var CLI_VERSION = true ? "0.182.0" : "0.1.0";
|
|
36772
37113
|
var CLI_BUNDLED = true;
|
|
36773
37114
|
var commandIo = /* @__PURE__ */ new WeakMap();
|
|
36774
37115
|
var commandClientFactory = /* @__PURE__ */ new WeakMap();
|