@lucid-agents/taskmarket 1.15.0 → 1.17.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 (117) hide show
  1. package/THIRD_PARTY_NOTICES.md +14 -0
  2. package/dist/THIRD_PARTY_NOTICES.md +3108 -0
  3. package/dist/agent-compatibility.json +54 -0
  4. package/dist/chunk-3XPF2O6L.js +17060 -0
  5. package/dist/chunk-O27J7ZPH.js +14 -0
  6. package/dist/chunk-S7SJMJ2I.js +38 -0
  7. package/dist/compatibility-F3RC2GX7.js +133 -0
  8. package/dist/errors-F3EGNA4F.js +8 -0
  9. package/dist/index.js +1222 -13274
  10. package/dist/launch-EZJGJJ5Y.js +21762 -0
  11. package/dist/pi/CHANGELOG.md +5689 -0
  12. package/dist/pi/README.md +718 -0
  13. package/dist/pi/dist/bundle/chunks/anthropic-messages-VWZZOSJQ.js +6 -0
  14. package/dist/pi/dist/bundle/chunks/anthropic.js +75 -0
  15. package/dist/pi/dist/bundle/chunks/azure-openai-responses-BJLAM6CD.js +2 -0
  16. package/dist/pi/dist/bundle/chunks/bedrock-converse-stream.js +74 -0
  17. package/dist/pi/dist/bundle/chunks/chunk-4L3WN2XY.js +2 -0
  18. package/dist/pi/dist/bundle/chunks/chunk-6CYCI3EJ.js +12 -0
  19. package/dist/pi/dist/bundle/chunks/chunk-6R7UI4IY.js +2 -0
  20. package/dist/pi/dist/bundle/chunks/chunk-7ZC4UXSL.js +2 -0
  21. package/dist/pi/dist/bundle/chunks/chunk-AXIIZGTV.js +2 -0
  22. package/dist/pi/dist/bundle/chunks/chunk-CLNPYIDP.js +42 -0
  23. package/dist/pi/dist/bundle/chunks/chunk-DRQDKNXA.js +2 -0
  24. package/dist/pi/dist/bundle/chunks/chunk-GMWCTUPB.js +2 -0
  25. package/dist/pi/dist/bundle/chunks/chunk-IDDQWTHI.js +2 -0
  26. package/dist/pi/dist/bundle/chunks/chunk-JVUZSMYM.js +1547 -0
  27. package/dist/pi/dist/bundle/chunks/chunk-L2ZPNLYD.js +2 -0
  28. package/dist/pi/dist/bundle/chunks/chunk-NUHFSC37.js +25 -0
  29. package/dist/pi/dist/bundle/chunks/chunk-OUXLLA64.js +11 -0
  30. package/dist/pi/dist/bundle/chunks/chunk-PGXDEOVV.js +2 -0
  31. package/dist/pi/dist/bundle/chunks/chunk-PJACZCIR.js +2 -0
  32. package/dist/pi/dist/bundle/chunks/chunk-PRRNXB7S.js +2 -0
  33. package/dist/pi/dist/bundle/chunks/chunk-TEPMHNKQ.js +2 -0
  34. package/dist/pi/dist/bundle/chunks/chunk-TRDNDS6A.js +4 -0
  35. package/dist/pi/dist/bundle/chunks/chunk-U6ZMQKGD.js +50 -0
  36. package/dist/pi/dist/bundle/chunks/chunk-UAQELI3K.js +2 -0
  37. package/dist/pi/dist/bundle/chunks/chunk-USJZMAIR.js +2 -0
  38. package/dist/pi/dist/bundle/chunks/chunk-XDUWOHPL.js +6 -0
  39. package/dist/pi/dist/bundle/chunks/chunk-XNGRGP62.js +2 -0
  40. package/dist/pi/dist/bundle/chunks/github-copilot.js +2 -0
  41. package/dist/pi/dist/bundle/chunks/google-generative-ai-Q2K7FBDI.js +2 -0
  42. package/dist/pi/dist/bundle/chunks/google-vertex-7UJBF4S7.js +2 -0
  43. package/dist/pi/dist/bundle/chunks/https-proxy-agent-2VXB7436.js +13 -0
  44. package/dist/pi/dist/bundle/chunks/image-resize-worker.js +2 -0
  45. package/dist/pi/dist/bundle/chunks/kimi-coding.js +2 -0
  46. package/dist/pi/dist/bundle/chunks/lib-HGQMNYVT.js +9 -0
  47. package/dist/pi/dist/bundle/chunks/mistral-conversations-4M6BZBX6.js +5 -0
  48. package/dist/pi/dist/bundle/chunks/multipart-parser-SQ6GDJL7.js +3 -0
  49. package/dist/pi/dist/bundle/chunks/node-KG362ECQ.js +16 -0
  50. package/dist/pi/dist/bundle/chunks/node-TWVVAGPO.js +2 -0
  51. package/dist/pi/dist/bundle/chunks/openai-codex-responses-R6VYZTVY.js +10 -0
  52. package/dist/pi/dist/bundle/chunks/openai-codex.js +75 -0
  53. package/dist/pi/dist/bundle/chunks/openai-completions-EKZT2IH2.js +7 -0
  54. package/dist/pi/dist/bundle/chunks/openai-responses-TFDINO6W.js +2 -0
  55. package/dist/pi/dist/bundle/chunks/openrouter-images-N4XVVFSD.js +2 -0
  56. package/dist/pi/dist/bundle/chunks/openrouter.js +75 -0
  57. package/dist/pi/dist/bundle/chunks/pi-messages-PML4SPVJ.js +8 -0
  58. package/dist/pi/dist/bundle/chunks/radius.js +75 -0
  59. package/dist/pi/dist/bundle/chunks/src-UK77SYZE.js +4 -0
  60. package/dist/pi/dist/bundle/chunks/xai.js +2 -0
  61. package/dist/pi/dist/bundle/cli.js +3 -0
  62. package/dist/pi/dist/bundle/index.js +2 -0
  63. package/dist/pi/dist/bundle/rpc-entry.js +3 -0
  64. package/dist/pi/dist/core/export-html/template.css +1066 -0
  65. package/dist/pi/dist/core/export-html/template.html +55 -0
  66. package/dist/pi/dist/core/export-html/template.js +1864 -0
  67. package/dist/pi/dist/core/export-html/vendor/highlight.min.js +1213 -0
  68. package/dist/pi/dist/core/export-html/vendor/marked.min.js +78 -0
  69. package/dist/pi/dist/modes/interactive/assets/clankolas.png +0 -0
  70. package/dist/pi/dist/modes/interactive/theme/dark.json +91 -0
  71. package/dist/pi/dist/modes/interactive/theme/light.json +90 -0
  72. package/dist/pi/dist/modes/interactive/theme/theme-schema.json +356 -0
  73. package/dist/pi/docs/compaction.md +418 -0
  74. package/dist/pi/docs/containerization.md +156 -0
  75. package/dist/pi/docs/custom-provider.md +777 -0
  76. package/dist/pi/docs/development.md +90 -0
  77. package/dist/pi/docs/environment-variables.md +99 -0
  78. package/dist/pi/docs/extensions.md +3023 -0
  79. package/dist/pi/docs/index.md +84 -0
  80. package/dist/pi/docs/json.md +98 -0
  81. package/dist/pi/docs/keybindings.md +239 -0
  82. package/dist/pi/docs/llama-cpp.md +101 -0
  83. package/dist/pi/docs/models.md +574 -0
  84. package/dist/pi/docs/packages.md +228 -0
  85. package/dist/pi/docs/prompt-templates.md +96 -0
  86. package/dist/pi/docs/providers.md +317 -0
  87. package/dist/pi/docs/quickstart.md +167 -0
  88. package/dist/pi/docs/rpc.md +1618 -0
  89. package/dist/pi/docs/sdk.md +1224 -0
  90. package/dist/pi/docs/security.md +59 -0
  91. package/dist/pi/docs/session-format.md +438 -0
  92. package/dist/pi/docs/sessions.md +145 -0
  93. package/dist/pi/docs/settings.md +369 -0
  94. package/dist/pi/docs/shell-aliases.md +13 -0
  95. package/dist/pi/docs/skills.md +232 -0
  96. package/dist/pi/docs/terminal-setup.md +192 -0
  97. package/dist/pi/docs/termux.md +127 -0
  98. package/dist/pi/docs/themes.md +322 -0
  99. package/dist/pi/docs/tmux.md +63 -0
  100. package/dist/pi/docs/tui.md +961 -0
  101. package/dist/pi/docs/usage.md +311 -0
  102. package/dist/pi/docs/windows.md +39 -0
  103. package/dist/pi/package.json +15 -0
  104. package/dist/pi/vendor/chord-context.js +96 -0
  105. package/dist/pi/vendor/jiti/LICENSE +21 -0
  106. package/dist/pi/vendor/jiti/dist/babel.cjs +257 -0
  107. package/dist/pi/vendor/jiti/dist/jiti.cjs +1 -0
  108. package/dist/pi/vendor/jiti/lib/jiti.cjs +30 -0
  109. package/dist/pi/vendor/jiti/package.json +6 -0
  110. package/dist/pi/vendor/photon-node/LICENSE.md +201 -0
  111. package/dist/pi/vendor/photon-node/package.json +6 -0
  112. package/dist/pi/vendor/photon-node/photon_rs.js +4521 -0
  113. package/dist/pi/vendor/photon-node/photon_rs_bg.wasm +0 -0
  114. package/dist/pi-extensions/lockdown.cjs +433 -0
  115. package/dist/pi-extensions/remote-tools.cjs +22320 -0
  116. package/dist/pi-extensions/xgate.cjs +2260 -0
  117. package/package.json +15 -4
@@ -0,0 +1,14 @@
1
+ import { createRequire as __tmCreateRequire } from 'node:module'; import { fileURLToPath as __tmFileURLToPath } from 'node:url'; import { dirname as __tmDirname } from 'node:path'; const require = __tmCreateRequire(import.meta.url); const __tmFilename = __tmFileURLToPath(import.meta.url); const __tmDirnameValue = __tmDirname(__tmFilename);
2
+
3
+ // src/lib/agent/errors.ts
4
+ var AgentLaunchError = class extends Error {
5
+ constructor(code, message) {
6
+ super(message);
7
+ this.code = code;
8
+ this.name = "AgentLaunchError";
9
+ }
10
+ };
11
+
12
+ export {
13
+ AgentLaunchError
14
+ };
@@ -0,0 +1,38 @@
1
+ import { createRequire as __tmCreateRequire } from 'node:module'; import { fileURLToPath as __tmFileURLToPath } from 'node:url'; import { dirname as __tmDirname } from 'node:path'; const require = __tmCreateRequire(import.meta.url); const __tmFilename = __tmFileURLToPath(import.meta.url); const __tmDirnameValue = __tmDirname(__tmFilename);
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
9
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
10
+ }) : x)(function(x) {
11
+ if (typeof require !== "undefined") return require.apply(this, arguments);
12
+ throw Error('Dynamic require of "' + x + '" is not supported');
13
+ });
14
+ var __commonJS = (cb, mod) => function __require2() {
15
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
16
+ };
17
+ var __copyProps = (to, from, except, desc) => {
18
+ if (from && typeof from === "object" || typeof from === "function") {
19
+ for (let key of __getOwnPropNames(from))
20
+ if (!__hasOwnProp.call(to, key) && key !== except)
21
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
22
+ }
23
+ return to;
24
+ };
25
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
26
+ // If the importer is in node compatibility mode or this is not an ESM
27
+ // file that has been converted to a CommonJS file using a Babel-
28
+ // compatible transform (i.e. "__esModule" has not been set), then set
29
+ // "default" to the CommonJS "module.exports" for node compatibility.
30
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
31
+ mod
32
+ ));
33
+
34
+ export {
35
+ __require,
36
+ __commonJS,
37
+ __toESM
38
+ };
@@ -0,0 +1,133 @@
1
+ import { createRequire as __tmCreateRequire } from 'node:module'; import { fileURLToPath as __tmFileURLToPath } from 'node:url'; import { dirname as __tmDirname } from 'node:path'; const require = __tmCreateRequire(import.meta.url); const __tmFilename = __tmFileURLToPath(import.meta.url); const __tmDirnameValue = __tmDirname(__tmFilename);
2
+ import {
3
+ AgentLaunchError
4
+ } from "./chunk-O27J7ZPH.js";
5
+ import "./chunk-S7SJMJ2I.js";
6
+
7
+ // src/lib/agent/compatibility.ts
8
+ import { existsSync, readFileSync } from "fs";
9
+ import path from "path";
10
+ import { fileURLToPath } from "url";
11
+ var AGENT_COMPATIBILITY = {
12
+ manifestVersion: 1,
13
+ pi: { package: "@earendil-works/pi-coding-agent", version: "0.85.1" },
14
+ piAi: { package: "@earendil-works/pi-ai", version: "0.85.1" },
15
+ piXgate: { package: "@lucid-agents/pi-xgate", version: "0.1.6" },
16
+ xgateClient: { package: "@lucid-agents/xgate-client", version: "0.1.6" },
17
+ /**
18
+ * Pi 0.85.1 takes these (and pi-ai) at `^0.85.1`, so a later 0.85.x could otherwise be installed
19
+ * under the pinned Pi without anyone verifying it. Checked as Pi itself resolves them, with
20
+ * pi-ai.
21
+ */
22
+ piPackages: [
23
+ { package: "@earendil-works/pi-agent-core", version: "0.85.1" },
24
+ { package: "@earendil-works/pi-tui", version: "0.85.1" },
25
+ { package: "@earendil-works/chord", version: "0.85.1" },
26
+ { package: "@earendil-works/pi-telemetry", version: "0.85.1" }
27
+ ],
28
+ /** What the remote tool extension and the broker connector are built with besides Pi. */
29
+ support: [{ package: "ssh2", version: "1.17.0" }],
30
+ /**
31
+ * pi-xgate 0.1.6 and xgate-client 0.1.6 declare `>=24.19 <25`. The lower bound is enforced at
32
+ * launch; no upper bound is, since nothing the agent runs is known to break on a later Node.
33
+ */
34
+ node: { minimum: "24.19.0" },
35
+ protocol: {
36
+ /** `@taskmarket/x402-payer` request/status/reconcile API. */
37
+ payerApi: 1,
38
+ /** The router's channel profile the payer speaks to xgate. */
39
+ paymentProfile: "base-batch-channel-v1",
40
+ /** JSON lines between pi-xgate inside Pi and the controller's payer (fds 6 and 7). */
41
+ inferenceChannel: 1,
42
+ /** JSON lines between the remote tools inside Pi and the controller's broker (fds 4 and 5). */
43
+ sandboxChannel: 1,
44
+ /** The redaction values the controller hands the Pi guard (fd 3). */
45
+ secretsChannel: 1
46
+ }
47
+ };
48
+ function agentCompatibility(taskmarketVersion) {
49
+ return { taskmarket: taskmarketVersion, ...AGENT_COMPATIBILITY };
50
+ }
51
+ function parseVersion(version) {
52
+ const match = /^v?(\d+)\.(\d+)\.(\d+)/.exec(version.trim());
53
+ return match ? [Number(match[1]), Number(match[2]), Number(match[3])] : void 0;
54
+ }
55
+ function compare(a, b) {
56
+ for (let i = 0; i < 3; i++) if (a[i] !== b[i]) return a[i] - b[i];
57
+ return 0;
58
+ }
59
+ function nodeVersionSupported(version) {
60
+ const parsed = parseVersion(version);
61
+ return !!parsed && compare(parsed, parseVersion(AGENT_COMPATIBILITY.node.minimum)) >= 0;
62
+ }
63
+ function findInstalledPackage(name, fromDir) {
64
+ let dir = fromDir;
65
+ for (; ; ) {
66
+ const manifest = path.join(dir, "node_modules", ...name.split("/"), "package.json");
67
+ if (existsSync(manifest)) {
68
+ const pkg = JSON.parse(readFileSync(manifest, "utf8"));
69
+ return {
70
+ dir: path.dirname(manifest),
71
+ version: typeof pkg.version === "string" ? pkg.version : ""
72
+ };
73
+ }
74
+ const parent = path.dirname(dir);
75
+ if (parent === dir) return void 0;
76
+ dir = parent;
77
+ }
78
+ }
79
+ var here = path.dirname(fileURLToPath(import.meta.url));
80
+ function piRuntime(fromDir = here) {
81
+ const staged = path.join(fromDir, "pi");
82
+ const packageDir = existsSync(path.join(staged, "package.json")) ? staged : findInstalledPackage(AGENT_COMPATIBILITY.pi.package, fromDir)?.dir;
83
+ if (!packageDir) return void 0;
84
+ return { packageDir, cliPath: path.join(packageDir, "dist", "bundle", "cli.js") };
85
+ }
86
+ var reinstall = "reinstall @lucid-agents/taskmarket";
87
+ function assertAgentCompatibility(options = {}) {
88
+ const nodeVersion = options.nodeVersion ?? process.versions.node;
89
+ if (!nodeVersionSupported(nodeVersion)) {
90
+ throw new AgentLaunchError(
91
+ "unsupported_node",
92
+ `taskmarket agent needs Node ${AGENT_COMPATIBILITY.node.minimum} or later; this is Node ${nodeVersion}. Other taskmarket commands work on this Node.`
93
+ );
94
+ }
95
+ const fromDir = options.fromDir ?? here;
96
+ const runtime = piRuntime(fromDir);
97
+ if (!runtime || !existsSync(runtime.cliPath)) {
98
+ throw new AgentLaunchError(
99
+ "incompatible_install",
100
+ `Pi, which taskmarket agent runs, is missing from this install; ${reinstall}`
101
+ );
102
+ }
103
+ const pi = JSON.parse(readFileSync(path.join(runtime.packageDir, "package.json"), "utf8"));
104
+ const expected = AGENT_COMPATIBILITY.pi;
105
+ if (pi.name !== expected.package || pi.version !== expected.version) {
106
+ throw new AgentLaunchError(
107
+ "incompatible_install",
108
+ `This install has ${String(pi.name)} ${String(pi.version)}; taskmarket agent requires ${expected.package} ${expected.version}. ${reinstall}`
109
+ );
110
+ }
111
+ const shipped = path.join(fromDir, "agent-compatibility.json");
112
+ if (existsSync(shipped)) {
113
+ const manifest = JSON.parse(readFileSync(shipped, "utf8"));
114
+ const mismatched = ["pi", "piAi", "piXgate", "xgateClient"].filter(
115
+ (key) => manifest[key]?.version !== AGENT_COMPATIBILITY[key].version
116
+ );
117
+ if (mismatched.length > 0 || manifest.protocol?.inferenceChannel !== AGENT_COMPATIBILITY.protocol.inferenceChannel) {
118
+ throw new AgentLaunchError(
119
+ "incompatible_install",
120
+ `dist/agent-compatibility.json does not match this build of taskmarket agent; ${reinstall}`
121
+ );
122
+ }
123
+ }
124
+ return runtime;
125
+ }
126
+ export {
127
+ AGENT_COMPATIBILITY,
128
+ agentCompatibility,
129
+ assertAgentCompatibility,
130
+ findInstalledPackage,
131
+ nodeVersionSupported,
132
+ piRuntime
133
+ };
@@ -0,0 +1,8 @@
1
+ import { createRequire as __tmCreateRequire } from 'node:module'; import { fileURLToPath as __tmFileURLToPath } from 'node:url'; import { dirname as __tmDirname } from 'node:path'; const require = __tmCreateRequire(import.meta.url); const __tmFilename = __tmFileURLToPath(import.meta.url); const __tmDirnameValue = __tmDirname(__tmFilename);
2
+ import {
3
+ AgentLaunchError
4
+ } from "./chunk-O27J7ZPH.js";
5
+ import "./chunk-S7SJMJ2I.js";
6
+ export {
7
+ AgentLaunchError
8
+ };