pando-ai 0.6.5 → 0.7.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.
- package/README.md +143 -31
- package/dist/cli.js +255 -200
- package/dist/watcher-process.js +414 -405
- package/dist/workers/{chunk-KXR6VCP4.mjs → chunk-5PZD6HGD.mjs} +1 -1
- package/dist/workers/chunk-WHHZYOEJ.mjs +4 -0
- package/dist/workers/indexer-worker.mjs +1 -1
- package/dist/workers/snapshot-worker.mjs +15 -8
- package/dist/workers/sqlite-writer-worker.mjs +4 -1
- package/package.json +1 -1
- package/resources/tools/generated_pando-tools.json +47 -94
- package/tools/clojure-editor/lib/pando-clojure-editor-standalone.jar +0 -0
- package/tools/clojure-indexer/lib/pando-clojure-indexer-standalone.jar +0 -0
- package/dist/workers/chunk-JWVMGEXN.mjs +0 -4
|
@@ -22,8 +22,9 @@
|
|
|
22
22
|
"signatures": [
|
|
23
23
|
"read-this-first()",
|
|
24
24
|
"get-project-root()",
|
|
25
|
+
"add-root(root)",
|
|
26
|
+
"remove-root(root)",
|
|
25
27
|
"set-enabled-languages(languages)",
|
|
26
|
-
"set-project-root(root)",
|
|
27
28
|
"find-nodes(lang, snapshot, scope, datalog, prefilter, include, page)",
|
|
28
29
|
"find-references(to, expectedHash, boundary, includeDeclaration, includeStrings, includeComments, limit, offset, relType, sort, reachabilityDepth, reachabilityOptions, asOf)",
|
|
29
30
|
"find-callers(of, expectedHash, depth, aggregate, boundary, asOf, offset, limit, relType, sort, reachabilityDepth, reachabilityOptions)",
|
|
@@ -51,10 +52,8 @@
|
|
|
51
52
|
"list-snapshots(offset, limit)",
|
|
52
53
|
"diff-snapshots(head, base, page)",
|
|
53
54
|
"get-snapshot-trailers(snapshotId, keys)",
|
|
54
|
-
"snapshot-worktree(message, trailers)",
|
|
55
55
|
"restore-snapshot(snapshotId, trailers, page, shouldCreateNewSnapshot, deleteSnapshotId)",
|
|
56
56
|
"restore-files(snapshotId, files, page, trailers)",
|
|
57
|
-
"repair-history()",
|
|
58
57
|
"add-exclude-dir(directory)",
|
|
59
58
|
"remove-exclude-dir(directory)"
|
|
60
59
|
],
|
|
@@ -90,45 +89,40 @@
|
|
|
90
89
|
]
|
|
91
90
|
},
|
|
92
91
|
{
|
|
93
|
-
"name": "
|
|
92
|
+
"name": "add-root",
|
|
94
93
|
"category": "pando",
|
|
95
|
-
"signature": "
|
|
96
|
-
"description": "
|
|
94
|
+
"signature": "add-root(root)",
|
|
95
|
+
"description": "Persist an additional project folder for the next Pando launch. This does not switch the live root; restart the MCP client after adding the folder so the sandbox can bind it.",
|
|
97
96
|
"parameters": {
|
|
98
97
|
"type": "object",
|
|
99
98
|
"properties": {
|
|
100
|
-
"
|
|
101
|
-
"type": "
|
|
102
|
-
"
|
|
103
|
-
"type": "string"
|
|
104
|
-
},
|
|
105
|
-
"description": "Language ids to enable. Valid values are returned in availableLanguages when this tool is called with no languages or invalid languages. Current valid values: ts, js, python, c, cpp, csharp, dart, java, clojure."
|
|
99
|
+
"root": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"description": "Project folder to add for the next launch."
|
|
106
102
|
}
|
|
107
103
|
},
|
|
108
|
-
"required": [
|
|
104
|
+
"required": [
|
|
105
|
+
"root"
|
|
106
|
+
],
|
|
109
107
|
"additionalProperties": false
|
|
110
108
|
},
|
|
111
109
|
"examples": [
|
|
112
110
|
{
|
|
113
|
-
"
|
|
114
|
-
"ts",
|
|
115
|
-
"js",
|
|
116
|
-
"python"
|
|
117
|
-
]
|
|
111
|
+
"root": "/path/to/project"
|
|
118
112
|
}
|
|
119
113
|
]
|
|
120
114
|
},
|
|
121
115
|
{
|
|
122
|
-
"name": "
|
|
116
|
+
"name": "remove-root",
|
|
123
117
|
"category": "pando",
|
|
124
|
-
"signature": "
|
|
125
|
-
"description": "
|
|
118
|
+
"signature": "remove-root(root)",
|
|
119
|
+
"description": "Remove a persisted additional project folder for the next Pando launch. This does not change the current sandbox bindings; restart the MCP client after removing the folder.",
|
|
126
120
|
"parameters": {
|
|
127
121
|
"type": "object",
|
|
128
122
|
"properties": {
|
|
129
123
|
"root": {
|
|
130
124
|
"type": "string",
|
|
131
|
-
"description": "
|
|
125
|
+
"description": "Persisted project folder to remove for the next launch."
|
|
132
126
|
}
|
|
133
127
|
},
|
|
134
128
|
"required": [
|
|
@@ -138,7 +132,36 @@
|
|
|
138
132
|
},
|
|
139
133
|
"examples": [
|
|
140
134
|
{
|
|
141
|
-
"root": "
|
|
135
|
+
"root": "/path/to/project"
|
|
136
|
+
}
|
|
137
|
+
]
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"name": "set-enabled-languages",
|
|
141
|
+
"category": "pando",
|
|
142
|
+
"signature": "set-enabled-languages(languages)",
|
|
143
|
+
"description": "Set or inspect the enabled indexing languages for the selected root. Call with languages omitted to return the current enabledLanguages plus availableLanguages without changing config. Call with an array of language ids to update config, purge indexed files for disabled languages, restart indexing, and return the resulting enabledLanguages plus availableLanguages. If any value is invalid, no config is changed and the response includes invalidLanguages plus availableLanguages. Example: { languages:['ts','js','python'] }",
|
|
144
|
+
"parameters": {
|
|
145
|
+
"type": "object",
|
|
146
|
+
"properties": {
|
|
147
|
+
"languages": {
|
|
148
|
+
"type": "array",
|
|
149
|
+
"items": {
|
|
150
|
+
"type": "string"
|
|
151
|
+
},
|
|
152
|
+
"description": "Language ids to enable. Valid values are returned in availableLanguages when this tool is called with no languages or invalid languages. Current valid values: ts, js, python, c, cpp, csharp, dart, java, clojure."
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"required": [],
|
|
156
|
+
"additionalProperties": false
|
|
157
|
+
},
|
|
158
|
+
"examples": [
|
|
159
|
+
{
|
|
160
|
+
"languages": [
|
|
161
|
+
"ts",
|
|
162
|
+
"js",
|
|
163
|
+
"python"
|
|
164
|
+
]
|
|
142
165
|
}
|
|
143
166
|
]
|
|
144
167
|
},
|
|
@@ -877,7 +900,7 @@
|
|
|
877
900
|
"name": "workspace-overview",
|
|
878
901
|
"category": "pando",
|
|
879
902
|
"signature": "workspace-overview()",
|
|
880
|
-
"description": "Summarize workspace files, node counts, modules, artifacts, and indexing status.
|
|
903
|
+
"description": "Summarize workspace files, node counts, modules, artifacts, and indexing status. All modifying pando operations (insert, replace, delete, rename, filter-map-reduce, shell-command, etc.) automatically create snapshots before and after execution, so snapshots are captured for you with no manual step. Example: {}",
|
|
881
904
|
"parameters": {
|
|
882
905
|
"type": "object",
|
|
883
906
|
"properties": {},
|
|
@@ -2187,61 +2210,6 @@
|
|
|
2187
2210
|
}
|
|
2188
2211
|
]
|
|
2189
2212
|
},
|
|
2190
|
-
{
|
|
2191
|
-
"name": "snapshot-worktree",
|
|
2192
|
-
"category": "pando",
|
|
2193
|
-
"signature": "snapshot-worktree(message, trailers)",
|
|
2194
|
-
"description": "Manually snapshot current git worktree changes. Use ONLY for non-pando file modifications (e.g., when using Write, Edit, or Bash tools). DO NOT use before pando operations (insert, replace, delete, rename, filter-map-reduce) - they automatically create snapshots before and after. If no changes, returns snapshotSkipped=true. message and trailers are optional. Example: { message:'checkpoint', trailers:{ ticket:'ABC-123' } }",
|
|
2195
|
-
"parameters": {
|
|
2196
|
-
"type": "object",
|
|
2197
|
-
"properties": {
|
|
2198
|
-
"message": {
|
|
2199
|
-
"type": "string",
|
|
2200
|
-
"description": "Optional snapshot message."
|
|
2201
|
-
},
|
|
2202
|
-
"trailers": {
|
|
2203
|
-
"type": "object",
|
|
2204
|
-
"description": "Optional trailer metadata (stringified).",
|
|
2205
|
-
"properties": {},
|
|
2206
|
-
"patternProperties": {
|
|
2207
|
-
".*": {
|
|
2208
|
-
"anyOf": [
|
|
2209
|
-
{
|
|
2210
|
-
"type": "string"
|
|
2211
|
-
},
|
|
2212
|
-
{
|
|
2213
|
-
"type": "number"
|
|
2214
|
-
},
|
|
2215
|
-
{
|
|
2216
|
-
"type": "boolean"
|
|
2217
|
-
},
|
|
2218
|
-
{
|
|
2219
|
-
"type": "object"
|
|
2220
|
-
},
|
|
2221
|
-
{
|
|
2222
|
-
"type": "array"
|
|
2223
|
-
},
|
|
2224
|
-
{
|
|
2225
|
-
"type": "null"
|
|
2226
|
-
}
|
|
2227
|
-
]
|
|
2228
|
-
}
|
|
2229
|
-
},
|
|
2230
|
-
"additionalProperties": false
|
|
2231
|
-
}
|
|
2232
|
-
},
|
|
2233
|
-
"required": [],
|
|
2234
|
-
"additionalProperties": false
|
|
2235
|
-
},
|
|
2236
|
-
"examples": [
|
|
2237
|
-
{
|
|
2238
|
-
"message": "checkpoint",
|
|
2239
|
-
"trailers": {
|
|
2240
|
-
"ticket": "ABC-123"
|
|
2241
|
-
}
|
|
2242
|
-
}
|
|
2243
|
-
]
|
|
2244
|
-
},
|
|
2245
2213
|
{
|
|
2246
2214
|
"name": "restore-snapshot",
|
|
2247
2215
|
"category": "pando",
|
|
@@ -2385,21 +2353,6 @@
|
|
|
2385
2353
|
}
|
|
2386
2354
|
]
|
|
2387
2355
|
},
|
|
2388
|
-
{
|
|
2389
|
-
"name": "repair-history",
|
|
2390
|
-
"category": "pando",
|
|
2391
|
-
"signature": "repair-history()",
|
|
2392
|
-
"description": "Repair missing blobs in the snapshot history repo and housekeeping artifacts. Example: {}",
|
|
2393
|
-
"parameters": {
|
|
2394
|
-
"type": "object",
|
|
2395
|
-
"properties": {},
|
|
2396
|
-
"required": [],
|
|
2397
|
-
"additionalProperties": false
|
|
2398
|
-
},
|
|
2399
|
-
"examples": [
|
|
2400
|
-
{}
|
|
2401
|
-
]
|
|
2402
|
-
},
|
|
2403
2356
|
{
|
|
2404
2357
|
"name": "add-exclude-dir",
|
|
2405
2358
|
"category": "pando",
|
|
Binary file
|
|
Binary file
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{b as E}from"./chunk-RRIZV7YJ.mjs";import s from"path";import w from"os";import l from"fs";import x from"crypto";function D(){return process.env.PANDO_DATA_DIR||s.join(w.homedir(),h)}function N(n){let t=n,r=s.parse(t);for(;t.length>r.root.length&&/[\\/]+$/.test(t);)t=t.replace(/[\\/]+$/,"");return t}function g(n){let t=s.resolve(n),r=t;try{let e=l.realpathSync.native;r=typeof e=="function"?e(t):l.realpathSync(t)}catch{}return N(r)}function v(n){let t=n.trim().replace(/\.git$/,"");if(!t)return null;let r=t.match(/^git@([^:]+):(.+)$/);if(r){let e=r[1],i=r[2].replace(/^\/+/,"").split("/");if(i.length>=2)return`${e}/${i[0]}/${i[1]}`}try{let e=new URL(t),o=e.hostname,c=e.pathname.replace(/^\/+/,"").split("/");if(o&&c.length>=2)return`${o}/${c[0]}/${c[1]}`}catch{}return null}function m(n){return x.createHash("sha1").update(n).digest("hex").slice(0,12)}function G(n){return n.normalize("NFKD").replace(/[\u0300-\u036f]/g,"").replace(/[^A-Za-z0-9._-]+/g,"-").replace(/-+/g,"-").replace(/^[-._]+|[-._]+$/g,"").slice(0,64).replace(/^[-._]+|[-._]+$/g,"")||"workspace"}function C(n,t){let r=s.basename(N(n));return`${G(r)}-${t}`}function P(){return s.join(D(),"workspace-registry.json")}function p(n){try{return l.readFileSync(n,"utf8").trim()}catch{return null}}function O(n){let t=s.join(n,".git");try{let r=l.statSync(t);if(r.isDirectory())return t;if(r.isFile()){let o=p(t)?.match(/^gitdir:\s*(.+)$/i);if(o){let i=o[1].trim();return s.isAbsolute(i)?i:s.resolve(n,i)}}}catch{return null}return null}function L(n){let t=s.join(n,"commondir"),r=p(t);if(!r)return g(n);let e=s.isAbsolute(r)?r:s.resolve(n,r);return g(e)}function T(n){return g(s.join(n,"objects"))}function W(n){let t=g(n);for(;;){let r=s.join(t,".git");if(l.existsSync(r))return t;let e=s.dirname(t);if(e===t)break;t=e}return null}function M(n){let t=g(n),r=W(t);return r?g(r):null}function H(n){let t=s.join(n,"config"),r=p(t);if(!r)return null;let e=r.split(/\r?\n/),o=!1,i=null;for(let c of e){if(c.match(/^\s*\[remote\s+"([^"]+)"\]\s*$/)){o=!0;continue}if(c.startsWith("[")&&(o=!1),o){let a=c.match(/^\s*url\s*=\s*(.+)$/);if(a&&(i=a[1].trim(),i))return i}}return i}function F(n){let t=s.join(n,"HEAD"),r=p(t);if(!r)return{branch:null,commit:null};if(r.startsWith("ref:")){let e=r.replace("ref:","").trim(),o=e.split("/").slice(-1)[0]||null,i=s.join(n,e),c=p(i);if(!c){let u=p(s.join(n,"packed-refs"));if(u){let a=u.split(/\r?\n/).find(f=>f.endsWith(` ${e}`));a&&(c=a.split(" ")[0])}}return{branch:o,commit:c||null}}return{branch:"HEAD",commit:r||null}}function z(){try{let n=l.readFileSync(P(),"utf8"),t=JSON.parse(n);if(t&&t.version===1&&t.entries&&typeof t.entries=="object")return{version:1,entries:t.entries}}catch{}return{version:1,entries:{}}}function J(n){let t=P(),r=s.dirname(t);l.mkdirSync(r,{recursive:!0});let e=`${t}.${process.pid}.${Date.now()}.tmp`;l.writeFileSync(e,`${JSON.stringify(n,null,2)}
|
|
2
|
-
`,"utf8"),l.renameSync(e,t)}function U(n,t){if(!t)return{canonicalRepoRoot:n,gitCommonDir:null,gitObjectDir:null,fingerprint:`non-git:path:${n}`};let r=O(t),e=r?L(r):null,o=e?T(e):null;return{canonicalRepoRoot:t,gitCommonDir:e,gitObjectDir:o,fingerprint:["git",`root:${t}`,`common:${e??""}`,`objects:${o??""}`].join("|")}}function B(n){try{let t=z();t.entries[n.storageRoot]={workspaceId:n.id,workspaceDirName:n.dirName,locationId:n.locationId,incarnationId:n.incarnationId,canonicalProjectRoot:n.canonicalProjectRoot,canonicalRepoRoot:n.canonicalRepoRoot,storageRoot:n.storageRoot,repoIdentity:n.repoIdentity??null,gitCommonDir:n.gitCommonDir??null,gitObjectDir:n.gitObjectDir??null,remote:n.remote??null,branch:n.branch??null,commit:n.commit??null,updatedAt:new Date().toISOString()},J(t)}catch{}}function X(n){let t=g(n),r=M(t),e=r??t,o=r,i=m(e),c=U(e,o),u=m(c.fingerprint),a=`ws-${m(`${i}:${u}`)}`,f=C(e,a);if(!o)return{id:a,dirName:f,locationId:i,incarnationId:u,canonicalProjectRoot:t,canonicalRepoRoot:e,storageRoot:e,gitCommonDir:c.gitCommonDir,gitObjectDir:c.gitObjectDir,repoIdentity:null,remote:null,branch:null,commit:null};let d=O(o),b=d?H(d):null,$=b?v(b):null,_=d?F(d):{branch:null,commit:null};return{id:a,dirName:f,locationId:i,incarnationId:u,canonicalProjectRoot:t,canonicalRepoRoot:o,storageRoot:e,gitCommonDir:c.gitCommonDir,gitObjectDir:c.gitObjectDir,repoIdentity:$??`local:${m(e)}`,remote:b,branch:_.branch,commit:_.commit}}function K(n){let t=X(n);return B(t),s.join(D(),"workspaces",t.dirName)}function mn(n){return s.join(K(n),".pando-snapshots.db")}var h,k=E(()=>{"use strict";h=".pando-data"});k();import j from"fs";import S from"os";import R from"path";import{inspect as V}from"util";function A(){let n=process.env.PANDO_LOG_DIR||process.env.PANDO_WORKSPACE_DATA_DIR;if(n)return n;try{return D()}catch{let r=typeof S.homedir=="function"?S.homedir():process.env.HOME;if(r)return R.join(r,h)}let t=process.env.HOME||process.cwd();return R.join(t,h)}function q(){return R.join(A(),"pando.log")}var I=n=>{if(n==null)return!1;let t=n.trim().toLowerCase();return t!=="0"&&t!=="false"&&t!=="off"&&t!=="no"},Q=I(process.env.PANDO_LOG_DISABLED),y=!Q&&(process.env.PANDO_DEBUG==null||I(process.env.PANDO_DEBUG)),Z=y&&(process.env.PANDO_INDEX_HOT_LOG==null||I(process.env.PANDO_INDEX_HOT_LOG)),Y=y&&(process.env.PANDO_INDEX_TIMING==null||I(process.env.PANDO_INDEX_TIMING)),nn=new Set(["BatchAnalysisScheduler","ClojureIndex","ClojureIndexer","ThreadedIndexer"]),tn=new Set(["IndexTiming"]);function rn(){try{j.mkdirSync(A(),{recursive:!0})}catch{}}function en(n){if(n!==void 0)try{return typeof n=="string"?n:V(n,{depth:null,breakLength:1/0,maxArrayLength:1/0})}catch{try{return JSON.stringify(n)}catch{return String(n)}}}var on=!1;function _n(){return y}function sn(n){return y?tn.has(n)?Y:!(!Z&&nn.has(n)):!1}function Nn(n,t,r){if(!sn(n))return;let e=new Date().toISOString(),o=en(r),i=o?`[${e}] [${n}] ${t} :: ${o}`:`[${e}] [${n}] ${t}`;if(!on&&!process.env.PANDO_QUIET)try{process.stderr.write(i+`
|
|
3
|
-
`)}catch{}try{rn(),j.appendFileSync(q(),i+`
|
|
4
|
-
`,"utf8")}catch{}}import{createHash as cn}from"crypto";var an=/^-?\d+$/,ln=(1n<<63n)-1n;function un(n){let t=cn("sha1").update(n).digest(),r=0n;for(let e=0;e<8;e+=1)r=r<<8n|BigInt(t[e]);return r&ln}function kn(n){if(n==null)return null;if(typeof n=="bigint")return n;if(typeof n=="number"&&Number.isFinite(n))return BigInt(Math.trunc(n));if(typeof n=="string"){let t=n.trim();if(!t)return null;if(an.test(t))try{return BigInt(t)}catch{return null}return un(t)}return null}export{K as a,mn as b,k as c,_n as d,Nn as e,kn as f};
|