@isaacthoman/pulpo 0.183.0 → 0.184.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.
Files changed (2) hide show
  1. package/dist/index.js +66 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -25014,6 +25014,57 @@ var shelfMutationSchema = external_exports.object({
25014
25014
  ])
25015
25015
  });
25016
25016
 
25017
+ // ../../packages/contracts/dist/workspace-screen.js
25018
+ var WORKSPACE_SCREEN_WIDTH = 1280;
25019
+ var WORKSPACE_SCREEN_HEIGHT = 800;
25020
+ var WORKSPACE_SCREEN_FRAME_WAIT_MAX_MS = 1e4;
25021
+ var WORKSPACE_SCREEN_INPUT_MAX_EVENTS = 64;
25022
+ var WORKSPACE_SCREEN_INPUT_MAX_TEXT = 2e3;
25023
+ var workspaceScreenStatusSchema = external_exports.object({
25024
+ /**
25025
+ * `ready`: the chat has a running workspace with a screen. `none`: no workspace is running for
25026
+ * the chat (none was started yet, or it was deleted after sitting idle). `unavailable`: this
25027
+ * instance has the screen turned off, or its workspace image has none.
25028
+ */
25029
+ state: external_exports.enum(["ready", "none", "unavailable"]),
25030
+ width: external_exports.number().int().positive(),
25031
+ height: external_exports.number().int().positive(),
25032
+ /** A viewer holds control right now, in this tab or another. */
25033
+ controlled: external_exports.boolean()
25034
+ });
25035
+ var workspaceScreenFrameQuerySchema = external_exports.object({
25036
+ /** The frame the viewer already shows; the answer waits until the picture differs from it. */
25037
+ after: external_exports.string().regex(/^[a-f0-9]{8,64}$/).optional(),
25038
+ waitMs: external_exports.coerce.number().int().min(0).max(WORKSPACE_SCREEN_FRAME_WAIT_MAX_MS).optional()
25039
+ });
25040
+ var workspaceScreenControlSchema = external_exports.object({
25041
+ /** True takes control or renews it; false gives it back. */
25042
+ held: external_exports.boolean()
25043
+ });
25044
+ var screenX = external_exports.number().finite().min(0).max(WORKSPACE_SCREEN_WIDTH);
25045
+ var screenY = external_exports.number().finite().min(0).max(WORKSPACE_SCREEN_HEIGHT);
25046
+ var screenButton = external_exports.enum(["left", "middle", "right"]).default("left");
25047
+ var workspaceScreenInputEventSchema = external_exports.discriminatedUnion("type", [
25048
+ external_exports.object({ type: external_exports.literal("move"), x: screenX, y: screenY }),
25049
+ external_exports.object({ type: external_exports.literal("down"), x: screenX, y: screenY, button: screenButton }),
25050
+ external_exports.object({ type: external_exports.literal("up"), x: screenX, y: screenY, button: screenButton }),
25051
+ /** A whole click at once, for viewers that only know taps. */
25052
+ external_exports.object({ type: external_exports.literal("click"), x: screenX, y: screenY, button: screenButton, count: external_exports.union([external_exports.literal(1), external_exports.literal(2), external_exports.literal(3)]).default(1) }),
25053
+ /** Wheel notches at a point; positive `dy` moves down the page, positive `dx` to the right. */
25054
+ external_exports.object({
25055
+ type: external_exports.literal("scroll"),
25056
+ x: screenX,
25057
+ y: screenY,
25058
+ dx: external_exports.number().int().min(-20).max(20).default(0),
25059
+ dy: external_exports.number().int().min(-20).max(20).default(0)
25060
+ }).refine((value) => value.dx !== 0 || value.dy !== 0, "Scroll by at least one notch"),
25061
+ external_exports.object({ type: external_exports.literal("text"), text: external_exports.string().min(1).max(WORKSPACE_SCREEN_INPUT_MAX_TEXT) }),
25062
+ external_exports.object({ type: external_exports.literal("key"), keys: external_exports.string().min(1).max(100) })
25063
+ ]);
25064
+ var workspaceScreenInputSchema = external_exports.object({
25065
+ events: external_exports.array(workspaceScreenInputEventSchema).min(1).max(WORKSPACE_SCREEN_INPUT_MAX_EVENTS)
25066
+ });
25067
+
25017
25068
  // ../../packages/contracts/dist/message-reports.js
25018
25069
  var MESSAGE_REPORT_CONTEXT_MAX_LENGTH = 2e3;
25019
25070
  var messageReportInputSchema = external_exports.object({
@@ -26093,6 +26144,12 @@ var agentSettingsSchema = external_exports.object({
26093
26144
  billWorkspaces: external_exports.boolean().default(false),
26094
26145
  /** Lets desktop apps lend the agent the computer they run on ("This computer"). */
26095
26146
  computerAccess: external_exports.boolean().default(true),
26147
+ /**
26148
+ * Gives cloud workspaces a screen: the agent can open a browser and other apps there and work in
26149
+ * their windows with the app tools, and the chat's owner can watch and take over. Needs a
26150
+ * workspace image that includes the desktop; with an older image the tools fail and say so.
26151
+ */
26152
+ workspaceDesktop: external_exports.boolean().default(false),
26096
26153
  workspacePricePerMinuteMicros: external_exports.number().int().min(0).max(1e9).default(1e4)
26097
26154
  });
26098
26155
  var episodicMemoryProfileSchema = external_exports.enum(["embeddinggemma", "qwen3-embedding"]);
@@ -37208,7 +37265,7 @@ async function runModelTest(input2) {
37208
37265
  }
37209
37266
 
37210
37267
  // src/index.ts
37211
- var CLI_VERSION = true ? "0.183.0" : "0.1.0";
37268
+ var CLI_VERSION = true ? "0.184.0" : "0.1.0";
37212
37269
  var CLI_BUNDLED = true;
37213
37270
  var commandIo = /* @__PURE__ */ new WeakMap();
37214
37271
  var commandClientFactory = /* @__PURE__ */ new WeakMap();
@@ -37242,6 +37299,12 @@ var COMMAND_CAPABILITIES = {
37242
37299
  backup: "backups",
37243
37300
  job: "operations"
37244
37301
  };
37302
+ function parseModelCallCursor(cursor) {
37303
+ const [startedAt, id] = cursor.split("|", 2);
37304
+ if (Number.isNaN(Date.parse(startedAt ?? "")) || id !== void 0 && !external_exports.uuid().safeParse(id).success) {
37305
+ throw new Error("--cursor must be the nextCursor from the previous page");
37306
+ }
37307
+ }
37245
37308
  function globalOptions(command) {
37246
37309
  return command.optsWithGlobals();
37247
37310
  }
@@ -37851,9 +37914,9 @@ function createProgram(io = processIo, dependencies = {}) {
37851
37914
  const { client } = await clientFor(command);
37852
37915
  emit(io, command, await client.request("/api/management/v1/usage/summary"));
37853
37916
  });
37854
- usage.command("requests").description("List model calls with request-log IDs and a pagination cursor").addOption(new Option("--range <range>", "time range").choices(["24h", "7d", "30d", "90d", "all"]).default("24h")).option("--limit <count>", "page size (1-100)", "50").option("--cursor <timestamp>", "nextCursor from the previous page").option("--status <statuses>", "comma-separated model-call statuses").option("--origin <origin>", "call source").option("--model <id>", "catalog or upstream model ID").option("--identity <id>", "user or API key ID").action(async (options2, command) => {
37917
+ usage.command("requests").description("List model calls with request-log IDs and a pagination cursor").addOption(new Option("--range <range>", "time range").choices(["24h", "7d", "30d", "90d", "all"]).default("24h")).option("--limit <count>", "page size (1-100)", "50").option("--cursor <cursor>", "nextCursor from the previous page").option("--status <statuses>", "comma-separated model-call statuses").option("--origin <origin>", "call source").option("--model <id>", "catalog or upstream model ID").option("--identity <id>", "user or API key ID").action(async (options2, command) => {
37855
37918
  const limit = external_exports.coerce.number().int().min(1).max(100).parse(options2.limit);
37856
- if (options2.cursor) external_exports.iso.datetime({ offset: true }).parse(options2.cursor);
37919
+ if (options2.cursor) parseModelCallCursor(options2.cursor);
37857
37920
  const query = new URLSearchParams({ range: options2.range, limit: String(limit) });
37858
37921
  for (const key of ["cursor", "status", "origin", "model", "identity"]) {
37859
37922
  if (options2[key]) query.set(key, options2[key]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@isaacthoman/pulpo",
3
- "version": "0.183.0",
3
+ "version": "0.184.0",
4
4
  "description": "Operator-first command-line client for Pulpo",
5
5
  "type": "module",
6
6
  "bin": {