@pstdio/pocketcoder-remote 0.2.1 → 0.2.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/extension.js +29 -17
- package/package.json +47 -47
package/dist/extension.js
CHANGED
|
@@ -14887,7 +14887,8 @@ var PreserveRequestSchema = exports_external.object({
|
|
|
14887
14887
|
});
|
|
14888
14888
|
var RestoreRequestSchema = exports_external.object({
|
|
14889
14889
|
external_id: exports_external.string().min(1).max(256),
|
|
14890
|
-
metadata: exports_external.record(exports_external.string().max(64), exports_external.string().max(512)).optional()
|
|
14890
|
+
metadata: exports_external.record(exports_external.string().max(64), exports_external.string().max(512)).optional(),
|
|
14891
|
+
launch_input: exports_external.record(exports_external.string(), exports_external.unknown()).optional()
|
|
14891
14892
|
});
|
|
14892
14893
|
var CheckpointManifestEntrySchema = exports_external.object({
|
|
14893
14894
|
path: exports_external.string(),
|
|
@@ -15403,7 +15404,8 @@ var HarnessSchema = exports_external.object({
|
|
|
15403
15404
|
});
|
|
15404
15405
|
var AgentSchema = HarnessSchema.extend({
|
|
15405
15406
|
type: exports_external.string().regex(/^[a-z0-9][a-z0-9-]{0,63}$/).default("custom"),
|
|
15406
|
-
transport: exports_external.enum(["pty", "acp"]).default("pty")
|
|
15407
|
+
transport: exports_external.enum(["pty", "acp"]).default("pty"),
|
|
15408
|
+
termWidth: exports_external.number().int().min(10).max(65535).optional()
|
|
15407
15409
|
});
|
|
15408
15410
|
var TerminalSchema = exports_external.object({
|
|
15409
15411
|
command: CommandSchema,
|
|
@@ -15483,7 +15485,7 @@ var TemplateSpecInputSchema = exports_external.object({
|
|
|
15483
15485
|
message: "image must be digest-pinned (repo@sha256:<64 hex>)"
|
|
15484
15486
|
}),
|
|
15485
15487
|
command: CommandSchema.default([
|
|
15486
|
-
"/usr/local/bin/pocketcoder-
|
|
15488
|
+
"/usr/local/bin/pocketcoder-supervisor",
|
|
15487
15489
|
"supervise",
|
|
15488
15490
|
"--launch-input",
|
|
15489
15491
|
"/run/pocketcoder/input"
|
|
@@ -15517,6 +15519,13 @@ var TemplateSpecInputSchema = exports_external.object({
|
|
|
15517
15519
|
}
|
|
15518
15520
|
if (!spec.agent)
|
|
15519
15521
|
return;
|
|
15522
|
+
if (spec.agent.transport === "acp" && spec.agent.termWidth !== undefined) {
|
|
15523
|
+
ctx.addIssue({
|
|
15524
|
+
code: "custom",
|
|
15525
|
+
path: ["agent", "termWidth"],
|
|
15526
|
+
message: "termWidth is only valid for PTY transport"
|
|
15527
|
+
});
|
|
15528
|
+
}
|
|
15520
15529
|
for (const field of ["harness", "services", "checkpointHook"]) {
|
|
15521
15530
|
if (spec[field] === undefined)
|
|
15522
15531
|
continue;
|
|
@@ -15584,6 +15593,7 @@ function agentApiHarness(spec) {
|
|
|
15584
15593
|
"--type",
|
|
15585
15594
|
spec.agent.type,
|
|
15586
15595
|
...spec.agent.transport === "acp" ? ["--experimental-acp"] : [],
|
|
15596
|
+
...spec.agent.termWidth === undefined ? [] : ["--term-width", String(spec.agent.termWidth)],
|
|
15587
15597
|
"--port",
|
|
15588
15598
|
"3284",
|
|
15589
15599
|
"--",
|
|
@@ -16006,13 +16016,15 @@ var LeaseAssignmentFrameSchema = exports_external.object({
|
|
|
16006
16016
|
|
|
16007
16017
|
// ../contracts/src/protocol.ts
|
|
16008
16018
|
var LEGACY_PROTOCOL_VERSION = 1;
|
|
16009
|
-
var PROTOCOL_VERSION =
|
|
16019
|
+
var PROTOCOL_VERSION = 6;
|
|
16020
|
+
var SOURCE_CREDENTIAL_MAX_BYTES = 65536;
|
|
16010
16021
|
var EnvelopeBase = exports_external.object({
|
|
16011
16022
|
v: exports_external.union([
|
|
16012
16023
|
exports_external.literal(LEGACY_PROTOCOL_VERSION),
|
|
16013
16024
|
exports_external.literal(2),
|
|
16014
16025
|
exports_external.literal(3),
|
|
16015
16026
|
exports_external.literal(4),
|
|
16027
|
+
exports_external.literal(5),
|
|
16016
16028
|
exports_external.literal(PROTOCOL_VERSION)
|
|
16017
16029
|
]),
|
|
16018
16030
|
workspace_id: exports_external.uuid(),
|
|
@@ -16149,7 +16161,7 @@ var ExecSpecSchema = exports_external.object({
|
|
|
16149
16161
|
source: SourceDescriptorSchema.extend({
|
|
16150
16162
|
url: exports_external.url(),
|
|
16151
16163
|
destination: exports_external.string(),
|
|
16152
|
-
|
|
16164
|
+
credential: exports_external.string().min(1).max(SOURCE_CREDENTIAL_MAX_BYTES).refine((value) => !value.includes("\x00"), "credential must not contain NUL bytes").nullable().default(null)
|
|
16153
16165
|
}).nullable().default(null),
|
|
16154
16166
|
restore: exports_external.object({
|
|
16155
16167
|
checkpoint_id: exports_external.uuid(),
|
|
@@ -16229,7 +16241,7 @@ var ServerFrameSchema = exports_external.discriminatedUnion("type", [
|
|
|
16229
16241
|
payload: AttachmentResolvePayload
|
|
16230
16242
|
})
|
|
16231
16243
|
]);
|
|
16232
|
-
// ../
|
|
16244
|
+
// ../sdk/src/admin.ts
|
|
16233
16245
|
class AdministrationApi {
|
|
16234
16246
|
transport;
|
|
16235
16247
|
constructor(transport) {
|
|
@@ -16248,7 +16260,7 @@ class AdministrationApi {
|
|
|
16248
16260
|
});
|
|
16249
16261
|
}
|
|
16250
16262
|
}
|
|
16251
|
-
// ../
|
|
16263
|
+
// ../sdk/src/errors.ts
|
|
16252
16264
|
var ClientErrorCodeSchema = exports_external.enum(["client.non_json_response", "client.invalid_response"]);
|
|
16253
16265
|
|
|
16254
16266
|
class PocketCoderError extends Error {
|
|
@@ -16298,7 +16310,7 @@ function responseError2(response, body) {
|
|
|
16298
16310
|
return new ErrorType({ message, code, status: response.status, requestId, details });
|
|
16299
16311
|
}
|
|
16300
16312
|
|
|
16301
|
-
// ../
|
|
16313
|
+
// ../sdk/src/attachments.ts
|
|
16302
16314
|
function contentDisposition(name) {
|
|
16303
16315
|
const clean = name.replace(/[\r\n]/g, "");
|
|
16304
16316
|
if (/^[ -~]*$/.test(clean)) {
|
|
@@ -16373,7 +16385,7 @@ class AgentApi {
|
|
|
16373
16385
|
throw responseError2(response, body);
|
|
16374
16386
|
}
|
|
16375
16387
|
}
|
|
16376
|
-
// ../
|
|
16388
|
+
// ../sdk/src/common.ts
|
|
16377
16389
|
function queryString(values) {
|
|
16378
16390
|
const params = new URLSearchParams;
|
|
16379
16391
|
for (const [key, value] of Object.entries(values)) {
|
|
@@ -16386,7 +16398,7 @@ function page(body) {
|
|
|
16386
16398
|
return { items: body.items, nextCursor: body.next_cursor };
|
|
16387
16399
|
}
|
|
16388
16400
|
|
|
16389
|
-
// ../
|
|
16401
|
+
// ../sdk/src/checkpoints.ts
|
|
16390
16402
|
class CheckpointsApi {
|
|
16391
16403
|
transport;
|
|
16392
16404
|
constructor(transport) {
|
|
@@ -16431,7 +16443,7 @@ class OperationsApi {
|
|
|
16431
16443
|
return this.transport.request(`/v1/operations/${encodeURIComponent(id)}`, OperationResourceSchema, options);
|
|
16432
16444
|
}
|
|
16433
16445
|
}
|
|
16434
|
-
// ../
|
|
16446
|
+
// ../sdk/src/conversations.ts
|
|
16435
16447
|
class ConversationsApi {
|
|
16436
16448
|
transport;
|
|
16437
16449
|
constructor(transport) {
|
|
@@ -16443,7 +16455,7 @@ class ConversationsApi {
|
|
|
16443
16455
|
}
|
|
16444
16456
|
}
|
|
16445
16457
|
|
|
16446
|
-
// ../
|
|
16458
|
+
// ../sdk/src/diagnostics.ts
|
|
16447
16459
|
class WorkspaceCursorApi {
|
|
16448
16460
|
transport;
|
|
16449
16461
|
resource;
|
|
@@ -16477,7 +16489,7 @@ class OutputsApi extends WorkspaceCursorApi {
|
|
|
16477
16489
|
}
|
|
16478
16490
|
}
|
|
16479
16491
|
|
|
16480
|
-
// ../
|
|
16492
|
+
// ../sdk/src/templates.ts
|
|
16481
16493
|
class TemplatesApi {
|
|
16482
16494
|
transport;
|
|
16483
16495
|
constructor(transport) {
|
|
@@ -16492,7 +16504,7 @@ class TemplatesApi {
|
|
|
16492
16504
|
}
|
|
16493
16505
|
}
|
|
16494
16506
|
|
|
16495
|
-
// ../
|
|
16507
|
+
// ../sdk/src/terminals.ts
|
|
16496
16508
|
class TerminalConnection {
|
|
16497
16509
|
socket;
|
|
16498
16510
|
messageListeners = new Set;
|
|
@@ -16601,7 +16613,7 @@ class TerminalsApi {
|
|
|
16601
16613
|
}
|
|
16602
16614
|
}
|
|
16603
16615
|
|
|
16604
|
-
// ../
|
|
16616
|
+
// ../sdk/src/transport.ts
|
|
16605
16617
|
function baseUrlOf(value) {
|
|
16606
16618
|
let url2;
|
|
16607
16619
|
try {
|
|
@@ -16731,7 +16743,7 @@ async function delay2(milliseconds, signal) {
|
|
|
16731
16743
|
});
|
|
16732
16744
|
}
|
|
16733
16745
|
|
|
16734
|
-
// ../
|
|
16746
|
+
// ../sdk/src/workspaces.ts
|
|
16735
16747
|
var TERMINAL_WORKSPACE_STATES = new Set(TERMINAL_STATES);
|
|
16736
16748
|
|
|
16737
16749
|
class WorkspacesApi {
|
|
@@ -16814,7 +16826,7 @@ class WorkspacesApi {
|
|
|
16814
16826
|
}
|
|
16815
16827
|
}
|
|
16816
16828
|
|
|
16817
|
-
// ../
|
|
16829
|
+
// ../sdk/src/client.ts
|
|
16818
16830
|
class PocketCoderClient {
|
|
16819
16831
|
transport;
|
|
16820
16832
|
templates;
|
package/package.json
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
2
|
+
"name": "@pstdio/pocketcoder-remote",
|
|
3
|
+
"nx": {
|
|
4
|
+
"tags": [
|
|
5
|
+
"scope:remote",
|
|
6
|
+
"type:app"
|
|
7
|
+
]
|
|
8
|
+
},
|
|
9
|
+
"version": "0.2.2",
|
|
10
|
+
"private": false,
|
|
11
|
+
"description": "Pi-based terminal UI for PocketCoder workspaces.",
|
|
12
|
+
"type": "module",
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/pufflyai/pocketcoder.git",
|
|
17
|
+
"directory": "packages/remote"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist",
|
|
21
|
+
"README.md",
|
|
22
|
+
"LICENSE"
|
|
23
|
+
],
|
|
24
|
+
"bin": {
|
|
25
|
+
"pocketcoder-remote": "dist/bin.js"
|
|
26
|
+
},
|
|
27
|
+
"publishConfig": {
|
|
28
|
+
"access": "public"
|
|
29
|
+
},
|
|
30
|
+
"engines": {
|
|
31
|
+
"node": ">=22.19.0"
|
|
32
|
+
},
|
|
33
|
+
"scripts": {
|
|
34
|
+
"build": "bun build ./src/bin.ts ./src/extension.ts --outdir ./dist --target node --external '@earendil-works/*'",
|
|
35
|
+
"start": "bun ./src/bin.ts",
|
|
36
|
+
"test": "bun test",
|
|
37
|
+
"typecheck": "tsc --project ./tsconfig.json --noEmit"
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@earendil-works/pi-ai": "0.83.0",
|
|
41
|
+
"@earendil-works/pi-coding-agent": "0.83.0",
|
|
42
|
+
"@earendil-works/pi-tui": "0.83.0"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@pstdio/pocketcoder-sdk": "workspace:*",
|
|
46
|
+
"@types/bun": "1.3.14",
|
|
47
|
+
"typescript": "5.9.3"
|
|
48
|
+
}
|
|
49
49
|
}
|