dal-code 1.0.33 → 1.0.35
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/CHANGELOG.md +18 -0
- package/NOTICE +8 -0
- package/dist/core/agent-session.d.ts +5 -0
- package/dist/core/agent-session.js +8 -8
- package/dist/core/background-processes.d.ts +14 -1
- package/dist/core/background-processes.js +7 -6
- package/dist/core/bash-executor.js +1 -1
- package/dist/core/bug-report.js +4 -4
- package/dist/core/compaction/branch-summarization.js +2 -2
- package/dist/core/compaction/compaction.d.ts +4 -2
- package/dist/core/compaction/compaction.js +13 -13
- package/dist/core/compaction/index.d.ts +1 -0
- package/dist/core/compaction/index.js +1 -1
- package/dist/core/compaction/tool-output-pruning.d.ts +19 -0
- package/dist/core/compaction/tool-output-pruning.js +7 -0
- package/dist/core/compaction/utils.d.ts +1 -0
- package/dist/core/compaction/utils.js +9 -9
- package/dist/core/git-state.js +1 -0
- package/dist/core/model-config.d.ts +30 -0
- package/dist/core/model-config.js +2 -2
- package/dist/core/sandbox/denial.d.ts +1 -0
- package/dist/core/sandbox/denial.js +4 -3
- package/dist/core/sandbox/shell-sandbox.js +5 -5
- package/dist/core/settings-manager.d.ts +11 -2
- package/dist/core/settings-manager.js +1 -1
- package/dist/core/source-info.d.ts +1 -0
- package/dist/core/source-info.js +1 -1
- package/dist/core/system-prompt.d.ts +1 -0
- package/dist/core/system-prompt.js +12 -12
- package/dist/core/tools/bash.d.ts +7 -0
- package/dist/core/tools/bash.js +14 -16
- package/dist/core/tools/output-accumulator.js +2 -2
- package/dist/core/tools/output-condense.js +3 -0
- package/dist/core/tools/powershell.js +1 -1
- package/dist/core/tools/process.d.ts +3 -4
- package/dist/core/tools/process.js +15 -15
- package/dist/core/tools/truncate.d.ts +12 -0
- package/dist/core/tools/truncate.js +12 -5
- package/dist/dal/manifest.js +1 -1
- package/dist/node_modules/@dalcode/dal-bridge/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-gateway/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-gateway/src/index.js +1 -1
- package/dist/node_modules/@dalcode/dal-goal/LICENSE +45 -0
- package/dist/node_modules/@dalcode/dal-goal/package.json +35 -0
- package/dist/node_modules/@dalcode/dal-goal/src/core.js +10 -0
- package/dist/node_modules/@dalcode/dal-goal/src/index.js +7 -0
- package/dist/node_modules/@dalcode/dal-guard/package.json +4 -4
- package/dist/node_modules/@dalcode/dal-halo/package.json +1 -1
- package/dist/node_modules/@dalcode/dal-interactive/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-lang/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-lsp/package.json +4 -3
- package/dist/node_modules/@dalcode/dal-lsp/src/checkers.js +4 -0
- package/dist/node_modules/@dalcode/dal-lsp/src/index.js +8 -6
- package/dist/node_modules/@dalcode/dal-mcp/package.json +5 -5
- package/dist/node_modules/@dalcode/dal-mcp/src/index.js +18 -18
- package/dist/node_modules/@dalcode/dal-office/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-pi-kit/dist/i18n.js +3 -2
- package/dist/node_modules/@dalcode/dal-pi-kit/package.json +1 -1
- package/dist/node_modules/@dalcode/dal-pi-kit/src/i18n.js +3 -2
- package/dist/node_modules/@dalcode/dal-plugins/package.json +4 -2
- package/dist/node_modules/@dalcode/dal-plugins/src/brand.d.ts +17 -0
- package/dist/node_modules/@dalcode/dal-plugins/src/brand.js +1 -1
- package/dist/node_modules/@dalcode/dal-plugins/src/index.js +12 -8
- package/dist/node_modules/@dalcode/dal-plugins/src/manage.js +8 -8
- package/dist/node_modules/@dalcode/dal-plugins/src/market.js +4 -0
- package/dist/node_modules/@dalcode/dal-plugins/src/settings.js +1 -1
- package/dist/node_modules/@dalcode/dal-review/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-rewind/LICENSE +24 -0
- package/dist/node_modules/@dalcode/dal-rewind/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-router/package.json +4 -4
- package/dist/node_modules/@dalcode/dal-router/src/index.js +4 -4
- package/dist/node_modules/@dalcode/dal-skills/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-skills/src/catalog.js +2 -2
- package/dist/node_modules/@dalcode/dal-skills/src/index.js +10 -10
- package/dist/node_modules/@dalcode/dal-subagent/package.json +5 -5
- package/dist/node_modules/@dalcode/dal-subagent/src/index.js +14 -16
- package/dist/node_modules/@dalcode/dal-telemetry/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-terminal/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-tool-catalog/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-tool-catalog/src/groups.js +1 -1
- package/dist/node_modules/@dalcode/dal-tool-catalog/src/index.js +4 -5
- package/dist/node_modules/@dalcode/dal-web/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-workflow/package.json +2 -2
- package/dist/node_modules/@dalcode/deepailab/package.json +3 -3
- package/dist/node_modules/@dalcode/deepailab/src/index.js +3 -3
- package/dist/node_modules/@dalcode/deepailab/src/model-defaults.js +1 -1
- package/dist/node_modules/@earendil-works/chord/package.json +1 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/package.json +2 -2
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.d.ts +2 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +5 -5
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/nvidia.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/types.d.ts +1 -0
- package/dist/node_modules/@earendil-works/pi-ai/package.json +2 -2
- package/dist/node_modules/@earendil-works/pi-client/package.json +3 -3
- package/dist/node_modules/@earendil-works/pi-codemode/package.json +1 -1
- package/dist/node_modules/@earendil-works/pi-coding-agent/package.json +1 -1
- package/dist/node_modules/@earendil-works/pi-mcp/package.json +1 -1
- package/dist/node_modules/@earendil-works/pi-protocol/package.json +2 -2
- package/dist/node_modules/@earendil-works/pi-server/package.json +3 -3
- package/dist/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
- package/dist/node_modules/@earendil-works/pi-tui/package.json +1 -1
- package/dist/sdk/index.d.ts +1 -0
- package/dist/sdk/index.js +1 -1
- package/dist/utils/clipboard-image.js +1 -1
- package/dist/utils/clipboard.js +1 -1
- package/dist/utils/output-files.js +1 -1
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
|
@@ -436,6 +436,7 @@ export interface OpenAICompletionsCompat {
|
|
|
436
436
|
supportsLongCacheRetention?: boolean;
|
|
437
437
|
dsmlToolCallsInContent?: boolean;
|
|
438
438
|
vllmPriority?: number;
|
|
439
|
+
responseModelCosts?: Record<string, ModelCost>;
|
|
439
440
|
}
|
|
440
441
|
export interface OpenAIResponsesCompat {
|
|
441
442
|
supportsDeveloperRole?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@earendil-works/pi-ai",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.35",
|
|
4
4
|
"description": "Unified LLM API with automatic model discovery and provider configuration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@anthropic-ai/sdk": "0.129.0",
|
|
60
60
|
"@aws-sdk/client-bedrock-runtime": "3.1127.0",
|
|
61
|
-
"@earendil-works/pi-telemetry": "^1.0.
|
|
61
|
+
"@earendil-works/pi-telemetry": "^1.0.35",
|
|
62
62
|
"@google/genai": "2.21.0",
|
|
63
63
|
"@opentelemetry/api": "1.9.0",
|
|
64
64
|
"@smithy/node-http-handler": "4.12.1",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@earendil-works/pi-client",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.35",
|
|
4
4
|
"description": "Transport-neutral client for remote pi sessions over framed CBOR bytes",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"node": ">=22.19.0"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@earendil-works/chord": "^1.0.
|
|
44
|
-
"@earendil-works/pi-protocol": "^1.0.
|
|
43
|
+
"@earendil-works/chord": "^1.0.35",
|
|
44
|
+
"@earendil-works/pi-protocol": "^1.0.35"
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@earendil-works/pi-protocol",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.35",
|
|
4
4
|
"description": "Transport-neutral CBOR protocol for remote pi sessions",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"node": ">=22.19.0"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@earendil-works/chord": "^1.0.
|
|
36
|
+
"@earendil-works/chord": "^1.0.35",
|
|
37
37
|
"typebox": "1.3.27"
|
|
38
38
|
}
|
|
39
39
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@earendil-works/pi-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.35",
|
|
4
4
|
"description": "experimental server package for pi",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"node": ">=22.19.0"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@earendil-works/chord": "^1.0.
|
|
43
|
-
"@earendil-works/pi-protocol": "^1.0.
|
|
42
|
+
"@earendil-works/chord": "^1.0.35",
|
|
43
|
+
"@earendil-works/pi-protocol": "^1.0.35"
|
|
44
44
|
}
|
|
45
45
|
}
|
package/dist/sdk/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { brandText } from "@dalcode/dal-plugins/brand";
|
|
1
2
|
export { TERMINAL_CAPABILITY, TERMINAL_CAPABILITY_VERSION, type TerminalInfo, type TerminalListResult, type TerminalReadParams, type TerminalReadResult, } from "@dalcode/dal-terminal/contract";
|
|
2
3
|
export { CONFIG_DIR_NAME, getAgentDir, getExamplesPath, SHARED_SKILL_CONFIG_DIRS, VERSION } from "../config.ts";
|
|
3
4
|
export type { AgentSessionEvent } from "../core/agent-session.ts";
|
package/dist/sdk/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{TERMINAL_CAPABILITY as
|
|
1
|
+
import{brandText as r}from"@dalcode/dal-plugins/brand";import{TERMINAL_CAPABILITY as a,TERMINAL_CAPABILITY_VERSION as i}from"@dalcode/dal-terminal/contract";import{CONFIG_DIR_NAME as p,getAgentDir as E,getExamplesPath as m,SHARED_SKILL_CONFIG_DIRS as n,VERSION as s}from"../config.js";import{HOST_CAPABILITIES_ENV as x,HOST_TOKEN_ENV as f,HOST_TOKEN_HEADER as A,HOST_URL_ENV as S}from"../core/host-capabilities.js";import{ModelRuntime as I}from"../core/model-runtime.js";import{DefaultPackageManager as O}from"../core/package-manager.js";import{buildProjectMap as H,formatProjectMapPrompt as L}from"../core/project-map.js";import{loadProjectContextFiles as R}from"../core/resource-loader.js";import{parseSessionEntries as u,SessionManager as M}from"../core/session-manager.js";import{SettingsManager as C}from"../core/settings-manager.js";import{loadSkills as k}from"../core/skills.js";import{DAL_HOOK_ENTRY_TYPE as b,dalHookActivity as K,isDalHookActivity as V,loadDalHooks as F,runDalHookEvent as Y,runNotificationHooks as j,runUserPromptSubmitHooks as v}from"../dal/hooks/index.js";import{BUNDLED_EXTENSION_PACKAGES as G,DAL_TOOL_NAMES as U,listBundledExtensions as h,listToolCatalog as X,toolDisplayLabel as q}from"../dal/manifest.js";import{RpcClient as z}from"../modes/rpc/rpc-client.js";import{parseFrontmatter as Q}from"../utils/frontmatter.js";import{listBuiltinSubagents as Z}from"./subagents.js";export{G as BUNDLED_EXTENSION_PACKAGES,p as CONFIG_DIR_NAME,b as DAL_HOOK_ENTRY_TYPE,U as DAL_TOOL_NAMES,O as DefaultPackageManager,x as HOST_CAPABILITIES_ENV,f as HOST_TOKEN_ENV,A as HOST_TOKEN_HEADER,S as HOST_URL_ENV,I as ModelRuntime,z as RpcClient,n as SHARED_SKILL_CONFIG_DIRS,M as SessionManager,C as SettingsManager,a as TERMINAL_CAPABILITY,i as TERMINAL_CAPABILITY_VERSION,s as VERSION,r as brandText,H as buildProjectMap,K as dalHookActivity,L as formatProjectMapPrompt,E as getAgentDir,m as getExamplesPath,V as isDalHookActivity,Z as listBuiltinSubagents,h as listBundledExtensions,X as listToolCatalog,F as loadDalHooks,R as loadProjectContextFiles,k as loadSkills,Q as parseFrontmatter,u as parseSessionEntries,Y as runDalHookEvent,j as runNotificationHooks,v as runUserPromptSubmitHooks,q as toolDisplayLabel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var d=Object.defineProperty;var a=(e,n)=>d(e,"name",{value:n,configurable:!0});import{getNativeClipboard as g}from"@earendil-works/pi-tui";import{randomUUID as y}from"crypto";import{readFileSync as w,unlinkSync as S}from"fs";import{tmpdir as b}from"os";import{join as T}from"path";import{t as I}from"../dal/i18n.js";import{runClipboardCommand as o}from"./clipboard-command.js";import{detectSupportedImageMimeType as h}from"./mime.js";import{loadPhoton as P}from"./photon.js";import{isWSL as _}from"./wsl.js";const p=["image/png","image/jpeg","image/webp","image/gif"],u=1e3,M=5e3;function C(e=process.env){return!!e.WAYLAND_DISPLAY||e.XDG_SESSION_TYPE==="wayland"}a(C,"isWaylandSession");function s(e){return e.split(";")[0]?.trim().toLowerCase()??e.toLowerCase()}a(s,"baseMimeType");function G(e){switch(s(e)){case"image/png":return"png";case"image/jpeg":return"jpg";case"image/webp":return"webp";case"image/gif":return"gif";default:return null}}a(G,"extensionForImageMimeType");function f(e){const n=e.map(t=>t.trim()).filter(Boolean).map(t=>({raw:t,base:s(t)}));for(const t of p){const r=n.find(l=>l.base===t);if(r)return r.raw}return n.find(t=>t.base.startsWith("image/"))?.raw??null}a(f,"selectPreferredImageMimeType");function E(e){const n=s(e);return p.some(i=>i===n)}a(E,"isSupportedImageMimeType");async function A(e){const n=await P();if(!n)return null;try{const i=n.PhotonImage.new_from_byteslice(e);try{return i.get_bytes()}finally{i.free()}}catch{return null}}a(A,"convertToPng");async function W(){const e=await o("wl-paste",["--list-types"],{timeoutMs:u});if(e===void 0)return;const n=e.toString("utf-8").split(/\r?\n/).map(r=>r.trim()).filter(Boolean),i=f(n);if(!i)return null;const t=await o("wl-paste",["--type",i,"--no-newline"]);if(t!==void 0)return t.length===0?null:{bytes:t,mimeType:s(i)}}a(W,"readClipboardImageViaWlPaste");async function N(){const e=T(b(),`
|
|
1
|
+
var d=Object.defineProperty;var a=(e,n)=>d(e,"name",{value:n,configurable:!0});import{getNativeClipboard as g}from"@earendil-works/pi-tui";import{randomUUID as y}from"crypto";import{readFileSync as w,unlinkSync as S}from"fs";import{tmpdir as b}from"os";import{join as T}from"path";import{t as I}from"../dal/i18n.js";import{runClipboardCommand as o}from"./clipboard-command.js";import{detectSupportedImageMimeType as h}from"./mime.js";import{loadPhoton as P}from"./photon.js";import{isWSL as _}from"./wsl.js";const p=["image/png","image/jpeg","image/webp","image/gif"],u=1e3,M=5e3;function C(e=process.env){return!!e.WAYLAND_DISPLAY||e.XDG_SESSION_TYPE==="wayland"}a(C,"isWaylandSession");function s(e){return e.split(";")[0]?.trim().toLowerCase()??e.toLowerCase()}a(s,"baseMimeType");function G(e){switch(s(e)){case"image/png":return"png";case"image/jpeg":return"jpg";case"image/webp":return"webp";case"image/gif":return"gif";default:return null}}a(G,"extensionForImageMimeType");function f(e){const n=e.map(t=>t.trim()).filter(Boolean).map(t=>({raw:t,base:s(t)}));for(const t of p){const r=n.find(l=>l.base===t);if(r)return r.raw}return n.find(t=>t.base.startsWith("image/"))?.raw??null}a(f,"selectPreferredImageMimeType");function E(e){const n=s(e);return p.some(i=>i===n)}a(E,"isSupportedImageMimeType");async function A(e){const n=await P();if(!n)return null;try{const i=n.PhotonImage.new_from_byteslice(e);try{return i.get_bytes()}finally{i.free()}}catch{return null}}a(A,"convertToPng");async function W(){const e=await o("wl-paste",["--list-types"],{timeoutMs:u});if(e===void 0)return;const n=e.toString("utf-8").split(/\r?\n/).map(r=>r.trim()).filter(Boolean),i=f(n);if(!i)return null;const t=await o("wl-paste",["--type",i,"--no-newline"]);if(t!==void 0)return t.length===0?null:{bytes:t,mimeType:s(i)}}a(W,"readClipboardImageViaWlPaste");async function N(){const e=T(b(),`dal-wsl-clip-${y()}.png`);try{const n=await o("wslpath",["-w",e],{timeoutMs:u});if(n===void 0)return null;const i=n.toString("utf-8").trim();if(!i)return null;const r=["Add-Type -AssemblyName System.Windows.Forms","Add-Type -AssemblyName System.Drawing",`$path = '${i.replaceAll("'","''")}'`,"$img = [System.Windows.Forms.Clipboard]::GetImage()","if ($img) { $img.Save($path, [System.Drawing.Imaging.ImageFormat]::Png); Write-Output 'ok' } else { Write-Output 'empty' }"].join("; "),l=await o("powershell.exe",["-NoProfile","-Command",r],{timeoutMs:M});if(l===void 0||l.toString("utf-8").trim()!=="ok")return null;const m=w(e);return m.length===0?null:{bytes:new Uint8Array(m),mimeType:"image/png"}}catch{return null}finally{try{S(e)}catch{}}}a(N,"readClipboardImageViaPowerShell");async function L(){const e=await o("xclip",["-selection","clipboard","-t","TARGETS","-o"],{timeoutMs:u});if(e===void 0)return;const n=e.toString("utf-8").split(/\r?\n/).map(r=>r.trim()).filter(Boolean),i=f(n);if(!i)return null;const t=await o("xclip",["-selection","clipboard","-t",i,"-o"]);if(t!==void 0)return t.length===0?null:{bytes:t,mimeType:s(i)}}a(L,"readClipboardImageViaXclip");async function c(){const e=await g()?.getImage();if(e!==void 0)return e?.length?{bytes:e,mimeType:h(e)??"application/octet-stream"}:null}a(c,"readClipboardImageViaNativeClipboard");async function H(e){const n=e?.env??process.env,i=e?.platform??process.platform;if(n.TERMUX_VERSION)return null;let t;if(i==="linux"){const r=_(n);(C(n)||r)&&(t=await W()),t===void 0&&(t=await L()),!t&&r&&(t=await N()??t),t===void 0&&(t=await c())}else t=await c();if(!t)return null;if(!E(t.mimeType)){const r=await A(t.bytes);return r?{bytes:r,mimeType:"image/png"}:null}return t}a(H,"readClipboardImage");function k(e=process.env){if(!(!e.SSH_CONNECTION&&!e.SSH_TTY))return I("\u8FDC\u7A0B\u4F1A\u8BDD\u8BFB\u4E0D\u5230\u672C\u673A\u526A\u8D34\u677F\uFF1A\u628A\u56FE\u7247\u62D6\u8FDB\u7F16\u8F91\u5668\u5DE6\u4FA7\u6587\u4EF6\u680F\u4E0A\u4F20\u5230\u670D\u52A1\u5668\uFF0C\u518D\u8F93\u5165 @ \u9009\u4E2D\u5B83")}a(k,"remoteClipboardHint");export{G as extensionForImageMimeType,C as isWaylandSession,H as readClipboardImage,k as remoteClipboardHint};
|
package/dist/utils/clipboard.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var w=Object.defineProperty;var n=(t,e)=>w(t,"name",{value:e,configurable:!0});import{randomUUID as S}from"node:crypto";import{unlinkSync as b,writeFileSync as h}from"node:fs";import{platform as p,tmpdir as x}from"node:os";import{join as C}from"node:path";import{getNativeClipboard as s}from"@earendil-works/pi-tui";import{runClipboardCommand as l}from"./clipboard-command.js";import{isWSL as E}from"./wsl.js";const y=1e5;function A(t){return!!(t.SSH_CONNECTION||t.SSH_CLIENT||t.MOSH_CONNECTION)}n(A,"isRemoteSession");function u(t){const e=Buffer.from(t).toString("base64");return e.length>y?!1:(process.stdout.write(`\x1B]52;c;${e}\x07`),!0)}n(u,"emitOsc52");async function N(t){const e=C(x(),`
|
|
1
|
+
var w=Object.defineProperty;var n=(t,e)=>w(t,"name",{value:e,configurable:!0});import{randomUUID as S}from"node:crypto";import{unlinkSync as b,writeFileSync as h}from"node:fs";import{platform as p,tmpdir as x}from"node:os";import{join as C}from"node:path";import{getNativeClipboard as s}from"@earendil-works/pi-tui";import{runClipboardCommand as l}from"./clipboard-command.js";import{isWSL as E}from"./wsl.js";const y=1e5;function A(t){return!!(t.SSH_CONNECTION||t.SSH_CLIENT||t.MOSH_CONNECTION)}n(A,"isRemoteSession");function u(t){const e=Buffer.from(t).toString("base64");return e.length>y?!1:(process.stdout.write(`\x1B]52;c;${e}\x07`),!0)}n(u,"emitOsc52");async function N(t){const e=C(x(),`dal-wsl-clip-${S()}.txt`);try{h(e,t,{encoding:"utf8",mode:384});const i=(await l("wslpath",["-w",e],{timeoutMs:1e3}))?.toString("utf8").trim();if(!i)return!1;const r=`Set-Clipboard -Value ([System.IO.File]::ReadAllText('${i.replaceAll("'","''")}', [System.Text.Encoding]::UTF8))`;return await l("powershell.exe",["-NoProfile","-Command",r],{timeoutMs:5e3})!==void 0}catch{return!1}finally{try{b(e)}catch{}}}n(N,"copyViaWindowsClipboard");async function Y(){const t=[];process.env.TERMUX_VERSION&&t.push(["termux-clipboard-get",[]]),p()==="linux"&&(process.env.WAYLAND_DISPLAY&&t.push(["wl-paste",["--no-newline","--type","text"]]),process.env.DISPLAY&&t.push(["xclip",["-selection","clipboard","-out"]],["xsel",["--clipboard","--output"]]));for(const[e,i]of t){const r=await l(e,i,{timeoutMs:5e3});if(r!==void 0)return r.toString("utf8")||null}try{return await s()?.getText()||null}catch{return null}}n(Y,"readClipboardText");async function v(){const t=await s()?.getFilePaths?.();return t?.length?t:null}n(v,"readClipboardFilePaths");async function M(t){const e=p(),i=process.env;let r=!1;if(e!=="linux")try{const o=s();o?.setText&&(await o.setText(t),r=!0)}catch{}if(!r){const o=[];e==="darwin"?o.push(["pbcopy",[]]):e==="win32"?o.push(["clip",[]]):(i.TERMUX_VERSION&&o.push(["termux-clipboard-set",[]]),i.WAYLAND_DISPLAY&&o.push(["wl-copy",[]]),i.DISPLAY&&o.push(["xclip",["-selection","clipboard"]],["xsel",["--clipboard","--input"]]));for(const[d,m]of o)if(await l(d,m,{input:t,timeoutMs:5e3})!==void 0){r=!0;break}}let a=!1;!r&&e==="linux"&&E(i)&&(i.WT_SESSION&&(a=u(t)),r=a||await N(t));const f=e==="linux"&&!i.DISPLAY&&!i.WAYLAND_DISPLAY&&!i.TERMUX_VERSION;let c=!1;if(!a&&(A(i)||!r&&f)&&(u(t)?r=!0:c=!0),!r){if(c)throw new Error("Clipboard unavailable: text exceeds the OSC 52 size limit");if(i.TERMUX_VERSION)throw new Error("Clipboard unavailable: install the Termux:API app and `termux-api` package");if(e==="linux"){if(i.WAYLAND_DISPLAY)throw new Error("Clipboard unavailable: install `wl-clipboard` (`wl-copy`) or check Wayland access");if(i.DISPLAY)throw new Error("Clipboard unavailable: install `xclip` or `xsel`, or check X11 access")}throw new Error("Clipboard unavailable")}}n(M,"copyToClipboard");export{M as copyToClipboard,v as readClipboardFilePaths,Y as readClipboardText};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var p=Object.defineProperty;var e=(t,r)=>p(t,"name",{value:r,configurable:!0});import{randomBytes as a}from"node:crypto";import{createWriteStream as c}from"node:fs";import{writeFile as f}from"node:fs/promises";import{tmpdir as l}from"node:os";import{join as s}from"node:path";const u=384;let i;function y(t){return i=t,()=>{i===t&&(i=void 0)}}e(y,"setOutputFileDirectory");function m(t,r){return s(i?.()??l(),`${t}-${a(8).toString("hex")}${r}`)}e(m,"createOutputFilePath");async function g(t,r,o){const n=m(t,r);return await f(n,o,{mode:u,flag:"wx"}),n}e(g,"writeOutputFile");function D(t,r){const o=m(t,r);return{path:o,stream:c(o,{mode:u,flags:"wx"})}}e(D,"createOutputFileStream");export{D as createOutputFileStream,y as setOutputFileDirectory,g as writeOutputFile};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-custom-provider",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.33",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-custom-provider",
|
|
9
|
-
"version": "0.1.
|
|
9
|
+
"version": "0.1.33",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sdk": "^0.52.0"
|
|
12
12
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-gondolin",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.33",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-gondolin",
|
|
9
|
-
"version": "0.1.
|
|
9
|
+
"version": "0.1.33",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@earendil-works/gondolin": "0.12.0"
|
|
12
12
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-sandbox",
|
|
3
|
-
"version": "1.15.
|
|
3
|
+
"version": "1.15.33",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-sandbox",
|
|
9
|
-
"version": "1.15.
|
|
9
|
+
"version": "1.15.33",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sandbox-runtime": "^0.0.26"
|
|
12
12
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-with-deps",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.33",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-with-deps",
|
|
9
|
-
"version": "0.1.
|
|
9
|
+
"version": "0.1.33",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"ms": "^2.1.3"
|
|
12
12
|
},
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dal-code",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.35",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "dal-code",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.35",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@agentclientprotocol/sdk": "1.3.0",
|