@anhlp/alp-paseo 0.0.0-beta.1 → 0.0.0-beta.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/README.md +15 -4
- package/client/task-pills.ts +5 -1
- package/package.json +6 -12
- package/server/dist/alpd.js +1867 -741
- package/server/dist/index.js +1954 -800
- package/server/dist/library.js +4 -2
- package/server/dist/main.js +36 -5
- package/server/dist/mapping.js +25 -16
- package/server/dist/panel/library.js +4 -2
- package/server/dist/panel/mapping.js +25 -16
- package/server/dist/panel/tasks.js +4 -2
- package/server/dist/panel/usage.js +4 -2
- package/server/dist/paseo/agents.js +47 -17
- package/server/dist/paseo/index.js +34 -4
- package/server/dist/paseo/plugins.js +4 -2
- package/server/dist/paseo/timeline-items.js +25 -2
- package/server/dist/provider-core.js +23 -1
- package/server/dist/provider.js +1804 -656
- package/server/dist/remote/index.js +27 -3
- package/server/dist/remote/link.js +4 -2
- package/server/dist/remote/panels.js +4 -2
- package/server/dist/remote/provider.js +27 -3
- package/server/dist/tasks.js +4 -2
- package/server/dist/tool-detail.js +26 -0
- package/server/dist/usage.js +4 -2
- package/server/dist/web-app/_expo/static/js/web/{index-185bf24e94a45852b2cfa53666d1cb86.js → index-c01174e6924afca25f226efae0b2a3ae.js} +2 -2
- package/server/dist/web-app/_expo/static/js/web/{index-185bf24e94a45852b2cfa53666d1cb86.js.br → index-c01174e6924afca25f226efae0b2a3ae.js.br} +0 -0
- package/server/dist/web-app/_expo/static/js/web/{index-185bf24e94a45852b2cfa53666d1cb86.js.gz → index-c01174e6924afca25f226efae0b2a3ae.js.gz} +0 -0
- package/server/dist/web-app/alp-web-app.json +2 -1
- package/server/dist/web-app/index.html +1 -1
- package/server/dist/web-app/index.html.br +0 -0
- package/server/dist/web-app/index.html.gz +0 -0
- package/server/dist/web.js +4 -2
- package/server/dist/alp-templates.d.ts +0 -9
- package/server/dist/compat.d.ts +0 -3
- package/server/dist/index.d.ts +0 -10
- package/server/dist/library.d.ts +0 -1
- package/server/dist/main.d.ts +0 -2
- package/server/dist/mapping-wire.d.ts +0 -58
- package/server/dist/mapping.d.ts +0 -99
- package/server/dist/panel/compat.d.ts +0 -3
- package/server/dist/panel/library.d.ts +0 -6
- package/server/dist/panel/mapping.d.ts +0 -1
- package/server/dist/panel/session-tasks.d.ts +0 -6
- package/server/dist/panel/tasks.d.ts +0 -8
- package/server/dist/panel/usage.d.ts +0 -3
- package/server/dist/paseo/agents.d.ts +0 -65
- package/server/dist/paseo/chat-search.d.ts +0 -18
- package/server/dist/paseo/checkout.d.ts +0 -71
- package/server/dist/paseo/files.d.ts +0 -19
- package/server/dist/paseo/gateway.d.ts +0 -61
- package/server/dist/paseo/git.d.ts +0 -21
- package/server/dist/paseo/index.d.ts +0 -56
- package/server/dist/paseo/plugins.d.ts +0 -17
- package/server/dist/paseo/providers.d.ts +0 -19
- package/server/dist/paseo/quiet.d.ts +0 -2
- package/server/dist/paseo/relay-transport.d.ts +0 -43
- package/server/dist/paseo/relay.d.ts +0 -84
- package/server/dist/paseo/timeline-items.d.ts +0 -13
- package/server/dist/paseo/timeline-projection.d.ts +0 -96
- package/server/dist/paseo/timeline-store.d.ts +0 -60
- package/server/dist/paseo/usage.d.ts +0 -12
- package/server/dist/paseo/workspaces.d.ts +0 -58
- package/server/dist/provider-core.d.ts +0 -68
- package/server/dist/provider.d.ts +0 -28
- package/server/dist/remote/index.d.ts +0 -10
- package/server/dist/remote/link.d.ts +0 -58
- package/server/dist/remote/panels.d.ts +0 -29
- package/server/dist/remote/provider.d.ts +0 -25
- package/server/dist/session-tasks.d.ts +0 -1
- package/server/dist/shared/library.d.ts +0 -258
- package/server/dist/shared/tasks.d.ts +0 -128
- package/server/dist/shared/team-models.d.ts +0 -14
- package/server/dist/shared/usage.d.ts +0 -27
- package/server/dist/tasks.d.ts +0 -1
- package/server/dist/usage.d.ts +0 -1
- package/server/dist/web.d.ts +0 -42
|
@@ -3741,8 +3741,10 @@ var AlpRpcError = class extends Error {
|
|
|
3741
3741
|
};
|
|
3742
3742
|
var ERROR = Object.freeze({ failed: 1e3, notFound: 1001, forbidden: 1003, conflict: 1004, unavailable: 1005, protocol: 1006 });
|
|
3743
3743
|
var RPC_ERROR = Object.freeze({ parseError: -32700, invalidRequest: -32600, methodNotFound: -32601, invalidParams: -32602 });
|
|
3744
|
-
var CAPABILITY = Object.freeze({ attachAfter: "attach.after", promptReceipts: "prompt.receipts", extensionMethods: "extension.methods", team: "team", task: "task", library: "library", settingsLanguage: "settings.language" });
|
|
3745
|
-
var
|
|
3744
|
+
var CAPABILITY = Object.freeze({ attachAfter: "attach.after", promptReceipts: "prompt.receipts", extensionMethods: "extension.methods", team: "team", task: "task", library: "library", settingsLanguage: "settings.language", sessionListPage: "session.list.page", questionWatch: "question.watch", questionWatchTurns: "question.watch.turns", workspaceFiles: "workspace.files", workspaceFilesRead: "workspace.files.read", promptImages: "prompt.images" });
|
|
3745
|
+
var PROMPT_IMAGES = Object.freeze({ mimeTypes: Object.freeze(["image/png", "image/jpeg", "image/gif", "image/webp"]), maxCount: 8, maxBytes: 5 * 1024 * 1024, maxTotalBytes: 11 * 1024 * 1024 });
|
|
3746
|
+
var RPC_METHODS = Object.freeze(["assignment.recall", "board.list", "catalog.get", "daemon.hello", "daemon.pause", "daemon.pauses", "daemon.resume", "daemon.shutdown", "daemon.status", "daemon.usage", "extension.register", "extension.unregister", "library.delete", "library.duplicate", "library.get", "library.list", "library.models", "library.rename", "library.save", "library.skills.set", "question.answer", "question.list", "question.watch", "session.archive", "session.attach", "session.close", "session.configure", "session.create", "session.get", "session.interrupt", "session.list", "session.log", "session.message", "session.preview", "session.prompt", "session.release", "session.rename", "session.status", "settings.language.get", "settings.language.set", "task.create", "task.gate.resolve", "task.list", "task.update", "team.list", "workspace.files.list", "workspace.files.read", "workspace.files.search"]);
|
|
3747
|
+
var WORKSPACE_FILES = Object.freeze({ maxReadBytes: 1024 * 1024, maxListEntries: 1e3, maxPathLength: 4096 });
|
|
3746
3748
|
|
|
3747
3749
|
// packages/client/src/rpc/errors.js
|
|
3748
3750
|
var BRAND = Symbol.for("@anhlp/alp-client/AlpClientError");
|
|
@@ -4361,6 +4363,28 @@ import { randomUUID } from "node:crypto";
|
|
|
4361
4363
|
// integrations/paseo/server/panel/session-tasks.ts
|
|
4362
4364
|
var sessionTasks = /* @__PURE__ */ new Map();
|
|
4363
4365
|
|
|
4366
|
+
// integrations/paseo/server/tool-detail.ts
|
|
4367
|
+
function paseoDetail(detail) {
|
|
4368
|
+
switch (detail.type) {
|
|
4369
|
+
case "shell":
|
|
4370
|
+
return { type: "shell", command: detail.command, ...detail.cwd ? { cwd: detail.cwd } : {}, output: detail.output, ...detail.exitCode !== void 0 ? { exitCode: detail.exitCode } : {} };
|
|
4371
|
+
case "read":
|
|
4372
|
+
case "edit":
|
|
4373
|
+
case "write":
|
|
4374
|
+
case "search":
|
|
4375
|
+
case "fetch":
|
|
4376
|
+
case "plan":
|
|
4377
|
+
case "plain_text":
|
|
4378
|
+
return { ...detail };
|
|
4379
|
+
case "sub_agent":
|
|
4380
|
+
return { ...detail, log: detail.log ?? "", actions: [] };
|
|
4381
|
+
default: {
|
|
4382
|
+
const other = detail;
|
|
4383
|
+
return { type: "unknown", input: other.input ?? null, output: other.output ?? null };
|
|
4384
|
+
}
|
|
4385
|
+
}
|
|
4386
|
+
}
|
|
4387
|
+
|
|
4364
4388
|
// integrations/paseo/server/provider-core.ts
|
|
4365
4389
|
var supported = [
|
|
4366
4390
|
"prompt.message",
|
|
@@ -4405,7 +4429,7 @@ function timelineItem(item) {
|
|
|
4405
4429
|
callId: item.callId,
|
|
4406
4430
|
name: item.name,
|
|
4407
4431
|
...item.status === "failed" ? { status: item.status, error: item.error ?? "Tool call failed" } : { status: item.status, error: null },
|
|
4408
|
-
detail: item.detail
|
|
4432
|
+
detail: paseoDetail(item.detail)
|
|
4409
4433
|
};
|
|
4410
4434
|
}
|
|
4411
4435
|
function createAlpProvider(strategy) {
|
|
@@ -3737,8 +3737,10 @@ var AlpRpcError = class extends Error {
|
|
|
3737
3737
|
};
|
|
3738
3738
|
var ERROR = Object.freeze({ failed: 1e3, notFound: 1001, forbidden: 1003, conflict: 1004, unavailable: 1005, protocol: 1006 });
|
|
3739
3739
|
var RPC_ERROR = Object.freeze({ parseError: -32700, invalidRequest: -32600, methodNotFound: -32601, invalidParams: -32602 });
|
|
3740
|
-
var CAPABILITY = Object.freeze({ attachAfter: "attach.after", promptReceipts: "prompt.receipts", extensionMethods: "extension.methods", team: "team", task: "task", library: "library", settingsLanguage: "settings.language" });
|
|
3741
|
-
var
|
|
3740
|
+
var CAPABILITY = Object.freeze({ attachAfter: "attach.after", promptReceipts: "prompt.receipts", extensionMethods: "extension.methods", team: "team", task: "task", library: "library", settingsLanguage: "settings.language", sessionListPage: "session.list.page", questionWatch: "question.watch", questionWatchTurns: "question.watch.turns", workspaceFiles: "workspace.files", workspaceFilesRead: "workspace.files.read", promptImages: "prompt.images" });
|
|
3741
|
+
var PROMPT_IMAGES = Object.freeze({ mimeTypes: Object.freeze(["image/png", "image/jpeg", "image/gif", "image/webp"]), maxCount: 8, maxBytes: 5 * 1024 * 1024, maxTotalBytes: 11 * 1024 * 1024 });
|
|
3742
|
+
var RPC_METHODS = Object.freeze(["assignment.recall", "board.list", "catalog.get", "daemon.hello", "daemon.pause", "daemon.pauses", "daemon.resume", "daemon.shutdown", "daemon.status", "daemon.usage", "extension.register", "extension.unregister", "library.delete", "library.duplicate", "library.get", "library.list", "library.models", "library.rename", "library.save", "library.skills.set", "question.answer", "question.list", "question.watch", "session.archive", "session.attach", "session.close", "session.configure", "session.create", "session.get", "session.interrupt", "session.list", "session.log", "session.message", "session.preview", "session.prompt", "session.release", "session.rename", "session.status", "settings.language.get", "settings.language.set", "task.create", "task.gate.resolve", "task.list", "task.update", "team.list", "workspace.files.list", "workspace.files.read", "workspace.files.search"]);
|
|
3743
|
+
var WORKSPACE_FILES = Object.freeze({ maxReadBytes: 1024 * 1024, maxListEntries: 1e3, maxPathLength: 4096 });
|
|
3742
3744
|
|
|
3743
3745
|
// packages/client/src/rpc/errors.js
|
|
3744
3746
|
var BRAND = Symbol.for("@anhlp/alp-client/AlpClientError");
|
|
@@ -18466,8 +18466,10 @@ var AlpRpcError = class extends Error {
|
|
|
18466
18466
|
};
|
|
18467
18467
|
var ERROR = Object.freeze({ failed: 1e3, notFound: 1001, forbidden: 1003, conflict: 1004, unavailable: 1005, protocol: 1006 });
|
|
18468
18468
|
var RPC_ERROR = Object.freeze({ parseError: -32700, invalidRequest: -32600, methodNotFound: -32601, invalidParams: -32602 });
|
|
18469
|
-
var CAPABILITY = Object.freeze({ attachAfter: "attach.after", promptReceipts: "prompt.receipts", extensionMethods: "extension.methods", team: "team", task: "task", library: "library", settingsLanguage: "settings.language" });
|
|
18470
|
-
var
|
|
18469
|
+
var CAPABILITY = Object.freeze({ attachAfter: "attach.after", promptReceipts: "prompt.receipts", extensionMethods: "extension.methods", team: "team", task: "task", library: "library", settingsLanguage: "settings.language", sessionListPage: "session.list.page", questionWatch: "question.watch", questionWatchTurns: "question.watch.turns", workspaceFiles: "workspace.files", workspaceFilesRead: "workspace.files.read", promptImages: "prompt.images" });
|
|
18470
|
+
var PROMPT_IMAGES = Object.freeze({ mimeTypes: Object.freeze(["image/png", "image/jpeg", "image/gif", "image/webp"]), maxCount: 8, maxBytes: 5 * 1024 * 1024, maxTotalBytes: 11 * 1024 * 1024 });
|
|
18471
|
+
var RPC_METHODS = Object.freeze(["assignment.recall", "board.list", "catalog.get", "daemon.hello", "daemon.pause", "daemon.pauses", "daemon.resume", "daemon.shutdown", "daemon.status", "daemon.usage", "extension.register", "extension.unregister", "library.delete", "library.duplicate", "library.get", "library.list", "library.models", "library.rename", "library.save", "library.skills.set", "question.answer", "question.list", "question.watch", "session.archive", "session.attach", "session.close", "session.configure", "session.create", "session.get", "session.interrupt", "session.list", "session.log", "session.message", "session.preview", "session.prompt", "session.release", "session.rename", "session.status", "settings.language.get", "settings.language.set", "task.create", "task.gate.resolve", "task.list", "task.update", "team.list", "workspace.files.list", "workspace.files.read", "workspace.files.search"]);
|
|
18472
|
+
var WORKSPACE_FILES = Object.freeze({ maxReadBytes: 1024 * 1024, maxListEntries: 1e3, maxPathLength: 4096 });
|
|
18471
18473
|
|
|
18472
18474
|
// packages/client/src/rpc/errors.js
|
|
18473
18475
|
var BRAND = Symbol.for("@anhlp/alp-client/AlpClientError");
|
|
@@ -3753,6 +3753,28 @@ import { randomUUID } from "node:crypto";
|
|
|
3753
3753
|
// integrations/paseo/server/panel/session-tasks.ts
|
|
3754
3754
|
var sessionTasks = /* @__PURE__ */ new Map();
|
|
3755
3755
|
|
|
3756
|
+
// integrations/paseo/server/tool-detail.ts
|
|
3757
|
+
function paseoDetail(detail) {
|
|
3758
|
+
switch (detail.type) {
|
|
3759
|
+
case "shell":
|
|
3760
|
+
return { type: "shell", command: detail.command, ...detail.cwd ? { cwd: detail.cwd } : {}, output: detail.output, ...detail.exitCode !== void 0 ? { exitCode: detail.exitCode } : {} };
|
|
3761
|
+
case "read":
|
|
3762
|
+
case "edit":
|
|
3763
|
+
case "write":
|
|
3764
|
+
case "search":
|
|
3765
|
+
case "fetch":
|
|
3766
|
+
case "plan":
|
|
3767
|
+
case "plain_text":
|
|
3768
|
+
return { ...detail };
|
|
3769
|
+
case "sub_agent":
|
|
3770
|
+
return { ...detail, log: detail.log ?? "", actions: [] };
|
|
3771
|
+
default: {
|
|
3772
|
+
const other = detail;
|
|
3773
|
+
return { type: "unknown", input: other.input ?? null, output: other.output ?? null };
|
|
3774
|
+
}
|
|
3775
|
+
}
|
|
3776
|
+
}
|
|
3777
|
+
|
|
3756
3778
|
// integrations/paseo/server/provider-core.ts
|
|
3757
3779
|
var supported = [
|
|
3758
3780
|
"prompt.message",
|
|
@@ -3797,7 +3819,7 @@ function timelineItem(item) {
|
|
|
3797
3819
|
callId: item.callId,
|
|
3798
3820
|
name: item.name,
|
|
3799
3821
|
...item.status === "failed" ? { status: item.status, error: item.error ?? "Tool call failed" } : { status: item.status, error: null },
|
|
3800
|
-
detail: item.detail
|
|
3822
|
+
detail: paseoDetail(item.detail)
|
|
3801
3823
|
};
|
|
3802
3824
|
}
|
|
3803
3825
|
function createAlpProvider(strategy) {
|
|
@@ -4262,8 +4284,10 @@ var AlpRpcError = class extends Error {
|
|
|
4262
4284
|
};
|
|
4263
4285
|
var ERROR = Object.freeze({ failed: 1e3, notFound: 1001, forbidden: 1003, conflict: 1004, unavailable: 1005, protocol: 1006 });
|
|
4264
4286
|
var RPC_ERROR = Object.freeze({ parseError: -32700, invalidRequest: -32600, methodNotFound: -32601, invalidParams: -32602 });
|
|
4265
|
-
var CAPABILITY = Object.freeze({ attachAfter: "attach.after", promptReceipts: "prompt.receipts", extensionMethods: "extension.methods", team: "team", task: "task", library: "library", settingsLanguage: "settings.language" });
|
|
4266
|
-
var
|
|
4287
|
+
var CAPABILITY = Object.freeze({ attachAfter: "attach.after", promptReceipts: "prompt.receipts", extensionMethods: "extension.methods", team: "team", task: "task", library: "library", settingsLanguage: "settings.language", sessionListPage: "session.list.page", questionWatch: "question.watch", questionWatchTurns: "question.watch.turns", workspaceFiles: "workspace.files", workspaceFilesRead: "workspace.files.read", promptImages: "prompt.images" });
|
|
4288
|
+
var PROMPT_IMAGES = Object.freeze({ mimeTypes: Object.freeze(["image/png", "image/jpeg", "image/gif", "image/webp"]), maxCount: 8, maxBytes: 5 * 1024 * 1024, maxTotalBytes: 11 * 1024 * 1024 });
|
|
4289
|
+
var RPC_METHODS = Object.freeze(["assignment.recall", "board.list", "catalog.get", "daemon.hello", "daemon.pause", "daemon.pauses", "daemon.resume", "daemon.shutdown", "daemon.status", "daemon.usage", "extension.register", "extension.unregister", "library.delete", "library.duplicate", "library.get", "library.list", "library.models", "library.rename", "library.save", "library.skills.set", "question.answer", "question.list", "question.watch", "session.archive", "session.attach", "session.close", "session.configure", "session.create", "session.get", "session.interrupt", "session.list", "session.log", "session.message", "session.preview", "session.prompt", "session.release", "session.rename", "session.status", "settings.language.get", "settings.language.set", "task.create", "task.gate.resolve", "task.list", "task.update", "team.list", "workspace.files.list", "workspace.files.read", "workspace.files.search"]);
|
|
4290
|
+
var WORKSPACE_FILES = Object.freeze({ maxReadBytes: 1024 * 1024, maxListEntries: 1e3, maxPathLength: 4096 });
|
|
4267
4291
|
|
|
4268
4292
|
// packages/client/src/rpc/errors.js
|
|
4269
4293
|
var BRAND = Symbol.for("@anhlp/alp-client/AlpClientError");
|
package/server/dist/tasks.js
CHANGED
|
@@ -529,8 +529,10 @@ var TAIL_BYTES = 256 * 1024;
|
|
|
529
529
|
var MAX_FRAME = 16 * 1024 * 1024;
|
|
530
530
|
var ERROR = Object.freeze({ failed: 1e3, notFound: 1001, forbidden: 1003, conflict: 1004, unavailable: 1005, protocol: 1006 });
|
|
531
531
|
var RPC_ERROR = Object.freeze({ parseError: -32700, invalidRequest: -32600, methodNotFound: -32601, invalidParams: -32602 });
|
|
532
|
-
var CAPABILITY = Object.freeze({ attachAfter: "attach.after", promptReceipts: "prompt.receipts", extensionMethods: "extension.methods", team: "team", task: "task", library: "library", settingsLanguage: "settings.language" });
|
|
533
|
-
var
|
|
532
|
+
var CAPABILITY = Object.freeze({ attachAfter: "attach.after", promptReceipts: "prompt.receipts", extensionMethods: "extension.methods", team: "team", task: "task", library: "library", settingsLanguage: "settings.language", sessionListPage: "session.list.page", questionWatch: "question.watch", questionWatchTurns: "question.watch.turns", workspaceFiles: "workspace.files", workspaceFilesRead: "workspace.files.read", promptImages: "prompt.images" });
|
|
533
|
+
var PROMPT_IMAGES = Object.freeze({ mimeTypes: Object.freeze(["image/png", "image/jpeg", "image/gif", "image/webp"]), maxCount: 8, maxBytes: 5 * 1024 * 1024, maxTotalBytes: 11 * 1024 * 1024 });
|
|
534
|
+
var RPC_METHODS = Object.freeze(["assignment.recall", "board.list", "catalog.get", "daemon.hello", "daemon.pause", "daemon.pauses", "daemon.resume", "daemon.shutdown", "daemon.status", "daemon.usage", "extension.register", "extension.unregister", "library.delete", "library.duplicate", "library.get", "library.list", "library.models", "library.rename", "library.save", "library.skills.set", "question.answer", "question.list", "question.watch", "session.archive", "session.attach", "session.close", "session.configure", "session.create", "session.get", "session.interrupt", "session.list", "session.log", "session.message", "session.preview", "session.prompt", "session.release", "session.rename", "session.status", "settings.language.get", "settings.language.set", "task.create", "task.gate.resolve", "task.list", "task.update", "team.list", "workspace.files.list", "workspace.files.read", "workspace.files.search"]);
|
|
535
|
+
var WORKSPACE_FILES = Object.freeze({ maxReadBytes: 1024 * 1024, maxListEntries: 1e3, maxPathLength: 4096 });
|
|
534
536
|
|
|
535
537
|
// packages/client/src/rpc/errors.js
|
|
536
538
|
var BRAND = Symbol.for("@anhlp/alp-client/AlpClientError");
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { createRequire as __alpRequire } from 'node:module'; const require = __alpRequire(typeof import.meta.url === 'string' ? import.meta.url : process.cwd() + '/__alp_require__.js');
|
|
2
|
+
|
|
3
|
+
// integrations/paseo/server/tool-detail.ts
|
|
4
|
+
function paseoDetail(detail) {
|
|
5
|
+
switch (detail.type) {
|
|
6
|
+
case "shell":
|
|
7
|
+
return { type: "shell", command: detail.command, ...detail.cwd ? { cwd: detail.cwd } : {}, output: detail.output, ...detail.exitCode !== void 0 ? { exitCode: detail.exitCode } : {} };
|
|
8
|
+
case "read":
|
|
9
|
+
case "edit":
|
|
10
|
+
case "write":
|
|
11
|
+
case "search":
|
|
12
|
+
case "fetch":
|
|
13
|
+
case "plan":
|
|
14
|
+
case "plain_text":
|
|
15
|
+
return { ...detail };
|
|
16
|
+
case "sub_agent":
|
|
17
|
+
return { ...detail, log: detail.log ?? "", actions: [] };
|
|
18
|
+
default: {
|
|
19
|
+
const other = detail;
|
|
20
|
+
return { type: "unknown", input: other.input ?? null, output: other.output ?? null };
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
paseoDetail
|
|
26
|
+
};
|
package/server/dist/usage.js
CHANGED
|
@@ -45,8 +45,10 @@ var AlpRpcError = class extends Error {
|
|
|
45
45
|
};
|
|
46
46
|
var ERROR = Object.freeze({ failed: 1e3, notFound: 1001, forbidden: 1003, conflict: 1004, unavailable: 1005, protocol: 1006 });
|
|
47
47
|
var RPC_ERROR = Object.freeze({ parseError: -32700, invalidRequest: -32600, methodNotFound: -32601, invalidParams: -32602 });
|
|
48
|
-
var CAPABILITY = Object.freeze({ attachAfter: "attach.after", promptReceipts: "prompt.receipts", extensionMethods: "extension.methods", team: "team", task: "task", library: "library", settingsLanguage: "settings.language" });
|
|
49
|
-
var
|
|
48
|
+
var CAPABILITY = Object.freeze({ attachAfter: "attach.after", promptReceipts: "prompt.receipts", extensionMethods: "extension.methods", team: "team", task: "task", library: "library", settingsLanguage: "settings.language", sessionListPage: "session.list.page", questionWatch: "question.watch", questionWatchTurns: "question.watch.turns", workspaceFiles: "workspace.files", workspaceFilesRead: "workspace.files.read", promptImages: "prompt.images" });
|
|
49
|
+
var PROMPT_IMAGES = Object.freeze({ mimeTypes: Object.freeze(["image/png", "image/jpeg", "image/gif", "image/webp"]), maxCount: 8, maxBytes: 5 * 1024 * 1024, maxTotalBytes: 11 * 1024 * 1024 });
|
|
50
|
+
var RPC_METHODS = Object.freeze(["assignment.recall", "board.list", "catalog.get", "daemon.hello", "daemon.pause", "daemon.pauses", "daemon.resume", "daemon.shutdown", "daemon.status", "daemon.usage", "extension.register", "extension.unregister", "library.delete", "library.duplicate", "library.get", "library.list", "library.models", "library.rename", "library.save", "library.skills.set", "question.answer", "question.list", "question.watch", "session.archive", "session.attach", "session.close", "session.configure", "session.create", "session.get", "session.interrupt", "session.list", "session.log", "session.message", "session.preview", "session.prompt", "session.release", "session.rename", "session.status", "settings.language.get", "settings.language.set", "task.create", "task.gate.resolve", "task.list", "task.update", "team.list", "workspace.files.list", "workspace.files.read", "workspace.files.search"]);
|
|
51
|
+
var WORKSPACE_FILES = Object.freeze({ maxReadBytes: 1024 * 1024, maxListEntries: 1e3, maxPathLength: 4096 });
|
|
50
52
|
|
|
51
53
|
// packages/client/src/rpc/errors.js
|
|
52
54
|
var BRAND = Symbol.for("@anhlp/alp-client/AlpClientError");
|
|
@@ -17558,7 +17558,7 @@ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{v
|
|
|
17558
17558
|
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.MarkdownTableCellText=function(n){const o=(0,t.c)(2),{children:u}=n;let s;o[0]!==u?(s=(0,l.jsx)(c,{value:"table-cell",children:u}),o[0]=u,o[1]=s):s=o[1];return s},e.useMarkdownTextSurface=function(){return(0,n.useContext)(c)},e.iosMarkdownTextIsSelectable=function(t){return"table-cell"!==t};var t=r(d[0]),n=r(d[1]),l=r(d[2]);const c=(0,n.createContext)("prose")},4288,[455,36,279]);
|
|
17559
17559
|
__d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.getMarkdownNextSiblingType=_,e.getMarkdownListSpacing=function(t,n){if(k(n))return{marginTop:o,marginBottom:f};const i=_(t,n);if(!i)return{marginTop:o,marginBottom:c};return{marginTop:o,marginBottom:(l=i,"bullet_list"===l||"ordered_list"===l?s:u)};var l},e.getMarkdownListMarker=function(t,o){const u=p(o);if(!u||"ordered_list"!==u.type)return{isOrdered:!1,marker:n};const s=y(t,u),f=b(u),c="string"==typeof t.markup&&t.markup.length>0?t.markup:i;return{isOrdered:!0,marker:`${f+s}${c}`}};var t=r(d[0]);const n="\u2022",i=".",o=t.SPACING[1],u=t.SPACING[4],s=t.SPACING[2],f=0,c=0;function l(t){return Array.isArray(t)?t:t&&"object"==typeof t?[t]:[]}function p(t){return l(t).find(t=>"ordered_list"===t?.type||"bullet_list"===t?.type)}function y(t,n){if("number"==typeof t.index&&Number.isFinite(t.index)&&t.index>=0)return t.index;if(Array.isArray(n.children)){const i=n.children.indexOf(t);if(i>=0)return i}return 0}function b(t){const n=t.attributes?.start;if("number"==typeof n&&Number.isFinite(n))return n;if("string"==typeof n){const t=Number.parseInt(n,10);if(Number.isFinite(t))return t}return 1}function _(t,n){const i=l(n);for(let n=i.length-1;n>=0;n--){const o=i[n];if(!Array.isArray(o?.children))continue;const u=o.children.indexOf(t);if(u>=0)return o.children[u+1]?.type}}function k(t){return l(t).some(t=>"list_item"===t?.type)}},4289,[305]);
|
|
17560
17560
|
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.markdownNodeContainsType=function n(t,o){if(t.type===o)return!0;return t.children.some(t=>n(t,o))}},4290,[]);
|
|
17561
|
-
__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.createMarkdownParser=function({linkify:e}){
|
|
17561
|
+
__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.createMarkdownParser=function({linkify:e}){const n=new t.default({html:!1,linkify:e});return c(n),n},Object.defineProperty(_e,"LINKIFY_MAX_TEXT_LENGTH",{enumerable:!0,get:function(){return l}}),Object.defineProperty(_e,"LINKIFY_MAX_SOURCE_LENGTH",{enumerable:!0,get:function(){return u}}),Object.defineProperty(_e,"LINKIFY_MAX_DIRECT_TEXT_LENGTH",{enumerable:!0,get:function(){return o}});var e,n=r(d[0]),t=(e=n)&&e.__esModule?e:{default:e};const l=2048,u=32768,o=256;function c(e){const n=e.linkify,t=n.test.bind(n),c=n.pretest.bind(n),f=n.match.bind(n);let _=!1,s=!1;const b=e=>!s&&e.length<=(_?l:o);n.test=e=>b(e)&&t(e),n.pretest=e=>!s&&c(e),n.match=e=>b(e)?f(e):null,e.core.ruler.before("linkify","alp_linkify_bound",e=>{_=!0,s=e.src.length>u}),e.core.ruler.after("linkify","alp_linkify_bound_end",()=>{_=!1,s=!1})}},4291,[4194]);
|
|
17562
17562
|
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.createMarkdownStyles=s,e.createCompactMarkdownStyles=function(o){const n=s(o);return Object.assign({},n,{body:Object.assign({},n.body,{fontSize:o.fontSize.content,lineHeight:Math.round(1.4*o.fontSize.content)}),heading1:Object.assign({},n.heading1,{fontSize:t(o.fontSize.content,"2xl"),marginTop:o.spacing[4],marginBottom:o.spacing[2],lineHeight:c(o.fontSize.content,"2xl")}),heading2:Object.assign({},n.heading2,{fontSize:t(o.fontSize.content,"xl"),marginTop:o.spacing[3],marginBottom:o.spacing[2],lineHeight:c(o.fontSize.content,"xl")}),heading3:Object.assign({},n.heading3,{fontSize:t(o.fontSize.content,"lg"),marginTop:o.spacing[3],marginBottom:o.spacing[1],lineHeight:c(o.fontSize.content,"lg")}),paragraph:Object.assign({},n.paragraph,{marginBottom:o.spacing[2]}),code_inline:Object.assign({},n.code_inline,{fontSize:o.fontSize.code}),code_block:Object.assign({},n.code_block,{fontSize:o.fontSize.code,padding:o.spacing[2]}),fence:Object.assign({},n.fence,{fontSize:o.fontSize.code,padding:o.spacing[2]})})};var o=r(d[0]);const n=r(d[1]).isWeb?{userSelect:"text"}:{};function t(n,t){return Math.round(n*(o.FONT_SIZE[t]/o.FONT_SIZE.base))}function c(o,n){return Math.round(1.3*t(o,n))}function s(o){return{body:Object.assign({},n,{color:o.colors.foreground,fontSize:o.fontSize.content,lineHeight:Math.round(1.4*o.fontSize.content),flexShrink:1,minWidth:0,width:"100%"}),text:Object.assign({},n,{flexShrink:1,minWidth:0,overflowWrap:"anywhere"}),paragraph:{marginTop:0,marginBottom:o.spacing[3],flexWrap:"wrap",flexDirection:"row",alignItems:"flex-start",justifyContent:"flex-start",flexShrink:1,minWidth:0,width:"100%"},heading1:Object.assign({},n,{fontSize:t(o.fontSize.content,"4xl"),fontWeight:o.fontWeight.bold,color:o.colors.foreground,marginTop:o.spacing[6],marginBottom:o.spacing[3],lineHeight:c(o.fontSize.content,"4xl"),borderBottomWidth:1,borderBottomColor:o.colors.border,paddingBottom:o.spacing[2]}),heading2:Object.assign({},n,{fontSize:t(o.fontSize.content,"3xl"),fontWeight:o.fontWeight.bold,color:o.colors.foreground,marginTop:o.spacing[6],marginBottom:o.spacing[3],lineHeight:c(o.fontSize.content,"3xl"),borderBottomWidth:1,borderBottomColor:o.colors.border,paddingBottom:o.spacing[2]}),heading3:Object.assign({},n,{fontSize:t(o.fontSize.content,"2xl"),fontWeight:o.fontWeight.semibold,color:o.colors.foreground,marginTop:o.spacing[4],marginBottom:o.spacing[2],lineHeight:c(o.fontSize.content,"2xl")}),heading4:Object.assign({},n,{fontSize:t(o.fontSize.content,"xl"),fontWeight:o.fontWeight.semibold,color:o.colors.foreground,marginTop:o.spacing[4],marginBottom:o.spacing[2],lineHeight:c(o.fontSize.content,"xl")}),heading5:Object.assign({},n,{fontSize:t(o.fontSize.content,"lg"),fontWeight:o.fontWeight.semibold,color:o.colors.foreground,marginTop:o.spacing[3],marginBottom:o.spacing[1],lineHeight:c(o.fontSize.content,"lg")}),heading6:Object.assign({},n,{fontSize:t(o.fontSize.content,"lg"),fontWeight:o.fontWeight.semibold,color:o.colors.foregroundMuted,marginTop:o.spacing[3],marginBottom:o.spacing[1],lineHeight:c(o.fontSize.content,"lg"),textTransform:"uppercase",letterSpacing:.5}),strong:Object.assign({},n,{fontWeight:o.fontWeight.medium}),em:Object.assign({},n,{fontStyle:"italic"}),s:Object.assign({},n,{textDecorationLine:"line-through",color:o.colors.foregroundMuted}),link:Object.assign({},n,{color:o.colors.accentBright,textDecorationLine:"none",flexShrink:1,minWidth:0,overflowWrap:"anywhere"}),blocklink:Object.assign({},n,{color:o.colors.accentBright,textDecorationLine:"none",flexShrink:1,minWidth:0,overflowWrap:"anywhere"}),code_inline:Object.assign({},n,{backgroundColor:o.colors.surface2,color:o.colors.foreground,paddingHorizontal:o.spacing[1],paddingVertical:2,borderRadius:o.borderRadius.md,borderWidth:0,fontFamily:o.fontFamily.mono,fontSize:o.fontSize.code}),code_block:Object.assign({},n,{backgroundColor:o.colors.surface2,color:o.colors.foreground,padding:o.spacing[3],borderRadius:o.borderRadius.md,fontFamily:o.fontFamily.mono,fontSize:o.fontSize.code,marginVertical:o.spacing[2]}),fence:Object.assign({},n,{backgroundColor:o.colors.surface2,color:o.colors.foreground,padding:o.spacing[3],borderRadius:o.borderRadius.md,borderWidth:1,borderColor:o.colors.border,fontFamily:o.fontFamily.mono,fontSize:o.fontSize.code,marginVertical:o.spacing[3]}),pre:{marginVertical:o.spacing[2]},table:{borderWidth:1,borderColor:o.colors.border,borderRadius:o.borderRadius.md,marginVertical:o.spacing[3]},thead:{backgroundColor:o.colors.surface2},tbody:{},th:Object.assign({},n,{padding:o.spacing[2],borderBottomWidth:1,borderRightWidth:1,borderColor:o.colors.border,backgroundColor:o.colors.surface2,fontWeight:o.fontWeight.semibold,color:o.colors.foreground,fontSize:o.fontSize.content,textAlign:"left"}),tr:{borderBottomWidth:1,borderColor:o.colors.border,flexDirection:"row"},td:Object.assign({},n,{padding:o.spacing[2],borderRightWidth:1,borderColor:o.colors.border,color:o.colors.foreground,fontSize:o.fontSize.content,flex:1}),bullet_list:{paddingLeft:0,width:"100%"},ordered_list:{paddingLeft:0,width:"100%"},list_item:{marginBottom:o.spacing[1],flexDirection:"row",alignItems:"flex-start",flexShrink:1},bullet_list_content:{flex:1,flexShrink:1},ordered_list_content:{flex:1,flexShrink:1},bullet_list_icon:Object.assign({},n,{color:o.colors.foregroundMuted,marginRight:4,fontSize:o.fontSize.content,lineHeight:Math.round(1.4*o.fontSize.content)}),ordered_list_icon:Object.assign({},n,{color:o.colors.foregroundMuted,marginRight:4,fontSize:o.fontSize.content,fontWeight:o.fontWeight.normal,lineHeight:Math.round(1.4*o.fontSize.content),minWidth:12}),blockquote:{backgroundColor:o.colors.surface1,color:`${o.colors.foreground}cc`,borderLeftWidth:4,borderLeftColor:o.colors.surface2,paddingHorizontal:o.spacing[4],paddingTop:o.spacing[3],paddingBottom:0,marginVertical:o.spacing[3],borderRadius:o.borderRadius.md,borderTopLeftRadius:0,borderBottomLeftRadius:0},hr:{backgroundColor:o.colors.border,height:1,marginVertical:10},image:{borderRadius:o.borderRadius.md,marginVertical:o.spacing[2]},hardbreak:{height:o.spacing[2]},softbreak:{}}}},4292,[305,882]);
|
|
17563
17563
|
__d(function(g,r,i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.splitHtmlishMarkdown=function(n){return a(B(n))},e.normalizeHtmlishMarkdown=function(n){return j(B(n))};var n=r(d[0]);const t=/^ {0,3}([`~]{3,})[^\n\r]*(?:\r?\n|$)/gm,s=/`+/g,u=/^(https?:\/\/|data:image\/(?:png|gif|jpe?g);base64,)/i,o=/^(https?:\/\/|#(?:$|[\w-]))/i,l=new Set(["br","img","source"]),c={b:["**","**"],del:["~~","~~"],em:["*","*"],i:["*","*"],s:["~~","~~"],strike:["~~","~~"],strong:["**","**"]};function a(n){const t=[];let s=0;for(;s<n.length;){if(H(n[s],"details")){const u=z(n,s,"details");if(null!==u){const o=b(n.slice(s+1,u));if(o){t.push(o),s=u+1;continue}}}const u=f(n,s);if(u){t.push(x(n,s,u.end)?Object.assign({},u.part,{flowsWithText:!0}):u.part),s=u.end;continue}const o=S(n,s+1,"details"),l=k(n,s+1),c=Math.min(o??n.length,l??n.length);$(t,j(n.slice(s,c))),s=c}return t}function f(n,t){const s=n[t];if("tag"!==s?.kind||s.closing)return null;if("img"===s.name){const n=_(s,void 0);return n?{part:n,end:t+1}:null}return"a"===s.name||"picture"===s.name||p(s)?h(n,t):null}function h(n,t){const s=[];let u,o=null,l=!1;for(let c=t;c<n.length;c+=1){const t=n[c];if("comment"!==t.kind&&!R(t)){if("tag"!==t.kind)return null;if(t.closing){if(!o||s.pop()!==t.name)return null;if(0===s.length)return{part:o,end:c+1}}else if("source"!==t.name||"picture"!==s.at(-1)){if(o)return null;if("img"!==t.name){if("a"!==t.name&&"picture"!==t.name&&!p(t))return null;"a"!==t.name||l||(u=E(t.attributes.href),l=!0),s.push(t.name)}else if(o=_(t,u),!o)return null}}}return null}function p(n){return q(n)||H(n,"p")||H(n,"div")}function x(n,t,s){if(p(n[t]))return!1;const u=n[t-1];if(!(void 0===u||"text"===u.kind&&/(?:^|[\n\r])[ \t]*$/.test(u.value)))return!1;let o=s;for(;o<n.length;){const t=n[o];if(void 0===t)break;if("text"===t.kind){if((t.value.split(/\r?\n/,1)[0]??"").trim().length>0)return!0;if(t.value.includes("\n")||t.value.includes("\r"))return!1;o+=1;continue}if("tag"===t.kind){if(p(t))return!1;const s=f(n,o);if(s){o=s.end;continue}}break}return!1}function k(n,t){for(let s=t;s<n.length;s+=1)if(f(n,s))return s;return null}function $(n,t){if(!t)return;const s=n.at(-1);"markdown"!==s?.kind?n.push({kind:"markdown",text:t}):s.text+=t}function b(n){const t=S(n,0,"summary");if(null===t)return null;const s=z(n,t,"summary");if(null===s)return null;const u=n.slice(t+1,s),o=[...n.slice(0,t),...n.slice(s+1)],l=v(u).trim();if(!l)return null;const c=a(o),f=c.map(n=>"markdown"===n.kind?n.text:"").join("");return Object.assign({kind:"details",summary:l,body:f.trim()},c.some(n=>"markdown"!==n.kind)?{bodyParts:w(c)}:{})}function w(n){const t=[...n],s=t[0];"markdown"===s?.kind&&(s.text=s.text.trimStart());const u=t.at(-1);return"markdown"===u?.kind&&(u.text=u.text.trimEnd()),t.filter(n=>"markdown"!==n.kind||n.text.length>0)}function v(n){return I(j(n))}function I(n){const t=B(n.trim());if(t.length<3)return n;const s=t[0],u=t.at(-1);return q(s)&&T(u,s.name)?j(t.slice(1,-1)):n}function j(n){let t="";for(let s=0;s<n.length;s+=1){const u=n[s];if(!u)continue;if("text"===u.kind){t+=u.value;continue}if("comment"===u.kind||u.closing)continue;if("br"===u.name){t+="\n";continue}if("img"===u.name){t+=W(u);continue}const o=u.selfClosing?null:z(n,s,u.name);if(null===o){t+=P(u);continue}t+=y(u,n.slice(s+1,o)),s=o}return t}function y(n,t){if("a"===n.name)return M(n,t);if("sub"===n.name||F(n.name))return j(t);if("code"===n.name&&t.every(n=>"text"===n.kind))return`\`${j(t)}\``;const s=c[n.name];return s?`${s[0]}${j(t)}${s[1]}`:"table"===n.name?C(t):"p"===n.name||"div"===n.name?`\n\n${j(t).trim()}\n\n`:`${n.raw}${j(t)}</${n.name}>`}function C(n){const t=[];for(let s=0;s<n.length;s+=1){if(!H(n[s],"tr"))continue;const u=z(n,s,"tr");if(null===u)continue;const o=O(n.slice(s+1,u));if(1===o.length)t.push(`- ${o[0]}`);else if(o.length>1){const n=o[0].startsWith("**")&&o[0].endsWith("**")?o[0]:`**${o[0]}**`;t.push(`- ${n}: ${o.slice(1).join(" ")}`)}s=u}return t.length>0?`\n${t.join("\n")}\n`:""}function O(n){const t=[];for(let s=0;s<n.length;s+=1){const u=n[s];if(!H(u,"td")&&!H(u,"th"))continue;const o=z(n,s,u.name);if(null===o)continue;const l=j(n.slice(s+1,o)).trim();l&&t.push(l),s=o}return t}function W(n){const t=_(n,void 0);return t?`![${s=t.alt,s.replace(/]/g,"\\]")}](${t.src})`:n.raw;var s}function M(n,t){const s=N(t);if(s)return W(s);const u=j(t),l=n.attributes.href??"";return u&&o.test(l)&&"#"!==l?`[${u}](${l})`:u}function _(n,t){const s=n.attributes.src??"";return u.test(s)?Object.assign({kind:"inlineImage",alt:n.attributes.alt??"",src:s},t?{href:t}:{},(o=n.attributes,Object.assign({},A("width",o.width),A("height",o.height)))):null;var o}function A(n,t){if(!t||!/^\d+(?:\.\d+)?$/.test(t))return{};const s=Number(t);return Number.isFinite(s)&&s>0?{[n]:s}:{}}function E(n){if(n&&"#"!==n&&o.test(n))return n}function N(n){const t=n.filter(n=>"comment"!==n.kind&&!R(n));return 1===t.length&&H(t[0],"img")?t[0]:null}function P(n){return"script"===n.name||"style"===n.name?"":n.raw}function S(n,t,s){for(let u=t;u<n.length;u+=1)if(H(n[u],s))return u;return null}function z(n,t,s){let u=1;for(let o=t+1;o<n.length;o+=1){const t=n[o];if(!H(t,s)||t.selfClosing){if(T(t,s)&&(u-=1,0===u))return o}else u+=1}return null}function H(n,t){return"tag"===n?.kind&&n.name===t&&!n.closing}function T(n,t){return"tag"===n?.kind&&n.name===t&&n.closing}function q(n){return"tag"===n?.kind&&F(n.name)&&!n.closing}function F(n){return"h1"===n||"h2"===n||"h3"===n||"h4"===n||"h5"===n||"h6"===n}function R(n){return"text"===n.kind&&""===n.value.trim()}function B(n){const t=Q(n),s=[],u=D(n,s);let o=0;for(const l of t)u.write(n.slice(o,l.start)),s.push({kind:"text",value:n.slice(l.start,l.end)}),u.skip(l.end-l.start),o=l.end;return u.write(n.slice(o)),u.end(),s}function D(t,s){let u,o=!1,c=0;return u=new n.Parser({onopentag(n,t,u){if(u)return;const o=l.has(n);s.push({kind:"tag",name:n,closing:!1,selfClosing:o,attributes:t,raw:K(n,t)})},onclosetag(n,t){t||l.has(n)||s.push({kind:"tag",name:n,closing:!0,selfClosing:!1,attributes:{},raw:`</${n}>`})},ontext(n){o&&(o=!1,n=J(n)),n&&s.push({kind:"text",value:n})},oncomment(){o=G(t,u.startIndex+c),s.push({kind:"comment"})}},{decodeEntities:!1,lowerCaseAttributeNames:!0,lowerCaseTags:!0,recognizeSelfClosing:!0}),{write(n){u.write(n)},skip(n){c+=n},end(){u.end()}}}function G(n,t){return 0===t||"\n"===n[t-1]||"\r"===n[t-1]}function J(n){return n.startsWith("\r\n")?n.slice(2):n.startsWith("\n")||n.startsWith("\r")?n.slice(1):n}function K(n,t){return`<${n}${Object.entries(t).map(([n,t])=>""===t?` ${n}`:` ${n}="${L(t)}"`).join("")}>`}function L(n){return n.replaceAll("&","&").replaceAll('"',""")}function Q(n){const t=U(n);return Z([...t,...X(n,t)])}function U(n){const s=[];for(t.lastIndex=0;;){const u=t.exec(n);if(!u)return s;const o=u[1];if(!o)continue;const l=V(n,t.lastIndex,o);if(!l)return s.push({start:u.index,end:n.length}),s;s.push({start:u.index,end:l.end}),t.lastIndex=l.end}}function V(n,t,s){const u=new RegExp(`^ {0,3}[${s[0]}]{${s.length},}[^\\n\\r]*(?:\\r?\\n|$)`,"gm");u.lastIndex=t;const o=u.exec(n);return o?{index:o.index,end:u.lastIndex}:null}function X(n,t){const u=[];for(s.lastIndex=0;;){const o=s.exec(n);if(!o)return u;if(nn(o.index,t))continue;const l=o[0],c=s.lastIndex,a=Y(n,c,l,t);a?(u.push({start:o.index,end:a.end}),s.lastIndex=a.end):s.lastIndex=c}}function Y(n,t,u,o){for(s.lastIndex=t;;){const t=s.exec(n);if(!t)return null;if(t[0]===u&&!nn(t.index,o))return{index:t.index,end:s.lastIndex}}}function Z(n){const t=[...n].sort((n,t)=>n.start-t.start),s=[];for(const n of t){const t=s.at(-1);!t||n.start>t.end?s.push(Object.assign({},n)):t.end=Math.max(t.end,n.end)}return s}function nn(n,t){return t.some(t=>n>=t.start&&n<t.end)}},4293,[4294]);
|
|
17564
17564
|
__d(function(g,r,i,a,m,_e,_d){"use strict";function e(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"Parser",{enumerable:!0,get:function(){return n.Parser}}),Object.defineProperty(_e,"DomHandler",{enumerable:!0,get:function(){return o.DomHandler}}),Object.defineProperty(_e,"DefaultHandler",{enumerable:!0,get:function(){return o.DomHandler}}),Object.defineProperty(_e,"Tokenizer",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(_e,"QuoteType",{enumerable:!0,get:function(){return c.QuoteType}}),Object.defineProperty(_e,"getFeed",{enumerable:!0,get:function(){return f.getFeed}}),_e.parseDocument=b,_e.createDocumentStream=function(e,t,u){const c=new o.DomHandler(t=>e(t,c.root),t,u);return new n.Parser(c,t)},Object.defineProperty(_e,"ElementType",{enumerable:!0,get:function(){return u}}),_e.parseFeed=function(e,t=p){return(0,f.getFeed)(b(e,t).children)},Object.defineProperty(_e,"DomUtils",{enumerable:!0,get:function(){return l}});var t,n=r(_d[0]),o=r(_d[1]),u=e(r(_d[2])),c=r(_d[3]),d=(t=c)&&t.__esModule?t:{default:t},f=r(_d[4]),l=e(f);function b(e,t){const u=new o.DomHandler(void 0,t);return new n.Parser(u,t).end(e),u.root}const p={xmlMode:!0}},4294,[4295,4303,4304,4296,4306]);
|
|
@@ -18739,4 +18739,4 @@ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{v
|
|
|
18739
18739
|
__r(363);
|
|
18740
18740
|
__r(356);
|
|
18741
18741
|
__r(0);
|
|
18742
|
-
//# debugId=
|
|
18742
|
+
//# debugId=958805a4-1b24-4690-93e1-7c37236136b8
|
|
Binary file
|
|
Binary file
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"0016-ALP-host-categories-after-pair-device.patch",
|
|
21
21
|
"0017-ALP-host-machine-name-and-team-runtime.patch",
|
|
22
22
|
"0018-ALP-chat-select-team-label.patch",
|
|
23
|
-
"0019-ALP-hide-team-picker-provider-header.patch"
|
|
23
|
+
"0019-ALP-hide-team-picker-provider-header.patch",
|
|
24
|
+
"0020-ALP-bound-linkify-on-long-messages.patch"
|
|
24
25
|
]
|
|
25
26
|
}
|
|
@@ -96,6 +96,6 @@
|
|
|
96
96
|
<body>
|
|
97
97
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
98
98
|
<div id="root"></div>
|
|
99
|
-
<script src="/_expo/static/js/web/index-
|
|
99
|
+
<script src="/_expo/static/js/web/index-c01174e6924afca25f226efae0b2a3ae.js" defer></script>
|
|
100
100
|
</body>
|
|
101
101
|
</html>
|
|
Binary file
|
|
Binary file
|
package/server/dist/web.js
CHANGED
|
@@ -3760,8 +3760,10 @@ var TAIL_BYTES = 256 * 1024;
|
|
|
3760
3760
|
var MAX_FRAME = 16 * 1024 * 1024;
|
|
3761
3761
|
var ERROR = Object.freeze({ failed: 1e3, notFound: 1001, forbidden: 1003, conflict: 1004, unavailable: 1005, protocol: 1006 });
|
|
3762
3762
|
var RPC_ERROR = Object.freeze({ parseError: -32700, invalidRequest: -32600, methodNotFound: -32601, invalidParams: -32602 });
|
|
3763
|
-
var CAPABILITY = Object.freeze({ attachAfter: "attach.after", promptReceipts: "prompt.receipts", extensionMethods: "extension.methods", team: "team", task: "task", library: "library", settingsLanguage: "settings.language" });
|
|
3764
|
-
var
|
|
3763
|
+
var CAPABILITY = Object.freeze({ attachAfter: "attach.after", promptReceipts: "prompt.receipts", extensionMethods: "extension.methods", team: "team", task: "task", library: "library", settingsLanguage: "settings.language", sessionListPage: "session.list.page", questionWatch: "question.watch", questionWatchTurns: "question.watch.turns", workspaceFiles: "workspace.files", workspaceFilesRead: "workspace.files.read", promptImages: "prompt.images" });
|
|
3764
|
+
var PROMPT_IMAGES = Object.freeze({ mimeTypes: Object.freeze(["image/png", "image/jpeg", "image/gif", "image/webp"]), maxCount: 8, maxBytes: 5 * 1024 * 1024, maxTotalBytes: 11 * 1024 * 1024 });
|
|
3765
|
+
var RPC_METHODS = Object.freeze(["assignment.recall", "board.list", "catalog.get", "daemon.hello", "daemon.pause", "daemon.pauses", "daemon.resume", "daemon.shutdown", "daemon.status", "daemon.usage", "extension.register", "extension.unregister", "library.delete", "library.duplicate", "library.get", "library.list", "library.models", "library.rename", "library.save", "library.skills.set", "question.answer", "question.list", "question.watch", "session.archive", "session.attach", "session.close", "session.configure", "session.create", "session.get", "session.interrupt", "session.list", "session.log", "session.message", "session.preview", "session.prompt", "session.release", "session.rename", "session.status", "settings.language.get", "settings.language.set", "task.create", "task.gate.resolve", "task.list", "task.update", "team.list", "workspace.files.list", "workspace.files.read", "workspace.files.search"]);
|
|
3766
|
+
var WORKSPACE_FILES = Object.freeze({ maxReadBytes: 1024 * 1024, maxListEntries: 1e3, maxPathLength: 4096 });
|
|
3765
3767
|
|
|
3766
3768
|
// packages/client/src/rpc/errors.js
|
|
3767
3769
|
var BRAND = Symbol.for("@anhlp/alp-client/AlpClientError");
|
package/server/dist/compat.d.ts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { PROVIDER_PROTOCOL_VERSION, negotiateProviderCapabilities, requireProviderCapabilities, ProviderInputSchema, ProviderEventSchema, } from '@getpaseo/plugin/server/provider';
|
|
2
|
-
export type { ProviderRegistration, ProviderConnection, ProviderInput, ProviderEvent, ProviderSessionConfig, ProviderPersistence, ProviderCatalog, ProviderTimelineItem, } from '@getpaseo/plugin/server/provider';
|
|
3
|
-
export type { PluginServerContext } from '@getpaseo/plugin/server';
|
package/server/dist/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { PluginServerContext } from './compat.js';
|
|
2
|
-
export { createProvider } from './provider.js';
|
|
3
|
-
export { createPaseoBridge, NOT_IMPLEMENTED, PASEO_PROTOCOL_VERSION, webAppDir } from './paseo/index.js';
|
|
4
|
-
export { createWebServer, DEFAULT_WEB_PORT, webFile } from './web.js';
|
|
5
|
-
export type { PaseoGateway } from './paseo/gateway.js';
|
|
6
|
-
export { sessionTasks } from './session-tasks.js';
|
|
7
|
-
export { mapSession, toSessionSpec, PaseoAdapter } from './mapping.js';
|
|
8
|
-
export { ClaudeTransport, claudePermissions, CodexTransport } from '@anhlp/alp-runtime/index';
|
|
9
|
-
export { contributeRemote, createRemoteProvider, gatewayConfig } from './remote/index.js';
|
|
10
|
-
export default function contribute(server: PluginServerContext): () => void;
|
package/server/dist/library.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './panel/library.js';
|
package/server/dist/main.d.ts
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import type { ProviderSessionConfig, ProviderPersistence } from './compat.js';
|
|
2
|
-
/**
|
|
3
|
-
* The parts of the Paseo ↔ ALP mapping that need nothing but the wire: no core, no runtime, no
|
|
4
|
-
* filesystem. The provider (provider.ts) and the remote entry (remote/) share them; mapping.ts adds
|
|
5
|
-
* what reads the library and runtime catalogue for the local and embedded modes.
|
|
6
|
-
*/
|
|
7
|
-
export declare const DEFAULT_TEAM = "pho";
|
|
8
|
-
/** The permission modes ALP sessions run in (packages/runtime/src/catalog.ts), as Paseo lists them. */
|
|
9
|
-
export declare const MODES: {
|
|
10
|
-
id: string;
|
|
11
|
-
label: string;
|
|
12
|
-
}[];
|
|
13
|
-
/** A Paseo model selection that names a team: an id without a runtime prefix. */
|
|
14
|
-
export declare const teamName: (model: string | null | undefined) => string | undefined;
|
|
15
|
-
/**
|
|
16
|
-
* The model list a session's config shows: its team for a root, its own model for a child or a
|
|
17
|
-
* custom root. `labelOf` names a model id when the catalogue knows it.
|
|
18
|
-
*/
|
|
19
|
-
export declare function configModels(session: {
|
|
20
|
-
parentId?: string;
|
|
21
|
-
runtime: string;
|
|
22
|
-
model: string;
|
|
23
|
-
workflow: {
|
|
24
|
-
mode: string;
|
|
25
|
-
};
|
|
26
|
-
teamLabel?: string;
|
|
27
|
-
}, labelOf?: (id: string) => {
|
|
28
|
-
label: string;
|
|
29
|
-
description?: string;
|
|
30
|
-
} | undefined): {
|
|
31
|
-
model: string;
|
|
32
|
-
models: {
|
|
33
|
-
thinkingOptions: never[];
|
|
34
|
-
description?: string | undefined;
|
|
35
|
-
id: string;
|
|
36
|
-
label: string;
|
|
37
|
-
}[];
|
|
38
|
-
};
|
|
39
|
-
/**
|
|
40
|
-
* Version 2 names a session in alpd, which keeps its native thread and history.
|
|
41
|
-
* Version 1 (plugin 0.2) carried the native thread itself; alpd adopts it on open.
|
|
42
|
-
*/
|
|
43
|
-
export type AlpdHandle = {
|
|
44
|
-
alpdSessionId: string;
|
|
45
|
-
agent: string;
|
|
46
|
-
cwd: string;
|
|
47
|
-
};
|
|
48
|
-
export declare const handleFor: (session: {
|
|
49
|
-
id: string;
|
|
50
|
-
agent: string;
|
|
51
|
-
projectRoot: string;
|
|
52
|
-
}) => ProviderPersistence;
|
|
53
|
-
/**
|
|
54
|
-
* The alpd session a version 2 handle names, after checking it belongs to this project. `sameProject`
|
|
55
|
-
* says whether the handle's directory (alpd's projectRoot) is the session's; locally that is the
|
|
56
|
-
* resolved path, remotely the workspace the credential names it by.
|
|
57
|
-
*/
|
|
58
|
-
export declare function alpdSessionOf(config: ProviderSessionConfig, persistence?: ProviderPersistence, sameProject?: (stored: string, cwd: string) => boolean): string | undefined;
|
package/server/dist/mapping.d.ts
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import type { SessionSpec } from '@anhlp/alp-protocol/session';
|
|
2
|
-
import type { ProviderSessionConfig, ProviderPersistence } from './compat.js';
|
|
3
|
-
import { configModels as wireConfigModels } from './mapping-wire.js';
|
|
4
|
-
export { alpdSessionOf, DEFAULT_TEAM, handleFor, type AlpdHandle } from './mapping-wire.js';
|
|
5
|
-
export { DEFAULT_MODEL, DEFAULT_CLAUDE_MODEL, models, modes, thinkingOptions, thinkingOptionsFor, InstructionsAdapter as PaseoAdapter } from '@anhlp/alp-runtime/index';
|
|
6
|
-
export declare const templates: Record<string, string>;
|
|
7
|
-
/**
|
|
8
|
-
* Paseo shows teams in place of models (ALPD §42): the built-ins Phở and Cafe, then
|
|
9
|
-
* the library's, then the project's. A team fixes its members' models and effort, so a
|
|
10
|
-
* session picks a team and nothing else. A team that fails to load is left out.
|
|
11
|
-
*/
|
|
12
|
-
export declare function teamModels(cwd?: string): Promise<{
|
|
13
|
-
thinkingOptions: never[];
|
|
14
|
-
description?: string | undefined;
|
|
15
|
-
id: string;
|
|
16
|
-
label: string;
|
|
17
|
-
}[]>;
|
|
18
|
-
/** The team a Paseo model selection names: an id without a runtime prefix, accepting Phở and Cafe's old names. */
|
|
19
|
-
export declare const teamFor: (model: string | null | undefined) => any;
|
|
20
|
-
/** The model list a session's config shows: its team for a root, its own model for a child or a custom root. */
|
|
21
|
-
export declare const configModels: (session: Parameters<typeof wireConfigModels>[0]) => {
|
|
22
|
-
model: string;
|
|
23
|
-
models: {
|
|
24
|
-
thinkingOptions: never[];
|
|
25
|
-
description?: string | undefined;
|
|
26
|
-
id: string;
|
|
27
|
-
label: string;
|
|
28
|
-
}[];
|
|
29
|
-
};
|
|
30
|
-
/** Validates Paseo's session config and persistence and translates them to a runtime spec. */
|
|
31
|
-
export declare function toSessionSpec(config: ProviderSessionConfig, persistence?: ProviderPersistence): SessionSpec;
|
|
32
|
-
export declare function mapSession(config: ProviderSessionConfig, persistence?: ProviderPersistence): Promise<{
|
|
33
|
-
autocompact: number | undefined;
|
|
34
|
-
language: string;
|
|
35
|
-
context?: number | undefined;
|
|
36
|
-
instructions: string;
|
|
37
|
-
mcp: Record<string, unknown>;
|
|
38
|
-
env: {
|
|
39
|
-
[x: string]: string;
|
|
40
|
-
};
|
|
41
|
-
persist: boolean;
|
|
42
|
-
keepThread: boolean;
|
|
43
|
-
copyOf?: string | undefined;
|
|
44
|
-
mode: string;
|
|
45
|
-
permissions: import("@anhlp/alp-core/permissions").PermissionProfile | null;
|
|
46
|
-
thinking: string;
|
|
47
|
-
threadId: string | undefined;
|
|
48
|
-
workdir: string;
|
|
49
|
-
copy: boolean;
|
|
50
|
-
antigravity?: import("@anhlp/alp-runtime/antigravity-transport").AntigravityProvider | undefined;
|
|
51
|
-
acp?: import("@anhlp/alp-runtime/acp-transport").AcpProvider | undefined;
|
|
52
|
-
agent: import("@anhlp/alp-core/types").ResolvedAgent;
|
|
53
|
-
workflow: {
|
|
54
|
-
mode: string;
|
|
55
|
-
maxPeers: number;
|
|
56
|
-
supervisor: boolean;
|
|
57
|
-
};
|
|
58
|
-
team: {
|
|
59
|
-
id: string;
|
|
60
|
-
source: "builtin" | "library" | "project";
|
|
61
|
-
label: string;
|
|
62
|
-
description?: string;
|
|
63
|
-
main: string;
|
|
64
|
-
members: Record<string, {
|
|
65
|
-
role?: string;
|
|
66
|
-
model?: string;
|
|
67
|
-
thinking?: string;
|
|
68
|
-
}>;
|
|
69
|
-
delegation: Record<string, string[]>;
|
|
70
|
-
oracleThinking?: Record<string, string>;
|
|
71
|
-
oracleModels?: string[];
|
|
72
|
-
maxPeers?: number;
|
|
73
|
-
supervisor: false | {
|
|
74
|
-
agent: string;
|
|
75
|
-
model?: string;
|
|
76
|
-
thinking?: string;
|
|
77
|
-
};
|
|
78
|
-
houseRules: string;
|
|
79
|
-
} | undefined;
|
|
80
|
-
oracleModels: string[];
|
|
81
|
-
modelProfiles: Record<string, import("@anhlp/alp-core/types").AgentModelConfig[]>;
|
|
82
|
-
houseRules: string;
|
|
83
|
-
hooks: {
|
|
84
|
-
name: string;
|
|
85
|
-
path: string;
|
|
86
|
-
project: boolean;
|
|
87
|
-
event: string;
|
|
88
|
-
command: string;
|
|
89
|
-
blocking?: boolean;
|
|
90
|
-
timeoutSec?: number;
|
|
91
|
-
match?: {
|
|
92
|
-
agent?: string;
|
|
93
|
-
label?: string;
|
|
94
|
-
};
|
|
95
|
-
description?: string;
|
|
96
|
-
}[];
|
|
97
|
-
runtimeKind: import("@anhlp/alp-protocol/dto").RuntimeKind;
|
|
98
|
-
model: any;
|
|
99
|
-
}>;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { PROVIDER_PROTOCOL_VERSION, negotiateProviderCapabilities, requireProviderCapabilities, ProviderInputSchema, ProviderEventSchema, } from '@getpaseo/plugin/server/provider';
|
|
2
|
-
export type { ProviderRegistration, ProviderConnection, ProviderInput, ProviderEvent, ProviderSessionConfig, ProviderPersistence, ProviderCatalog, ProviderTimelineItem, } from '@getpaseo/plugin/server/provider';
|
|
3
|
-
export type { PluginServerContext } from '@getpaseo/plugin/server';
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { PluginServerContext } from './compat.js';
|
|
2
|
-
/** The library Save also updates known project snapshots before acknowledging success. */
|
|
3
|
-
export declare function registerLibraryRpc(server: PluginServerContext, { home, projectDirectories }?: {
|
|
4
|
-
home?: string;
|
|
5
|
-
projectDirectories?: () => Promise<string[]>;
|
|
6
|
-
}): void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '../mapping.js';
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The tasks each root session's tree worked on, by the session id Paseo knows (ALPD §55).
|
|
3
|
-
* ALP reports them as a todo list; Paseo would show that as a second tasks pill that
|
|
4
|
-
* opens nothing, so the provider keeps them here and the Tasks pill shows them first.
|
|
5
|
-
*/
|
|
6
|
-
export declare const sessionTasks: Map<string, string[]>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { PluginServerContext } from './compat.js';
|
|
2
|
-
/**
|
|
3
|
-
* The nearest directory at or above `directory` that holds an ALP project. The user's library,
|
|
4
|
-
* `~/.alp` by default, is not one: otherwise every folder under the home would be a project.
|
|
5
|
-
*/
|
|
6
|
-
export declare function projectOf(directory: string): Promise<string | null>;
|
|
7
|
-
/** The Tasks panel's server side: reads and changes .alp/tasks as the user, without alpd. */
|
|
8
|
-
export declare function registerTaskRpc(server: PluginServerContext): void;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { PluginServerContext } from './compat.js';
|
|
2
|
-
/** In Paseo desktop read alpd over its socket; the ALP web host supplies its own connection. */
|
|
3
|
-
export declare function registerUsageRpc(server: PluginServerContext, read?: (refresh?: boolean) => Promise<any>): void;
|