dsh-thoughtdag 0.5.9 → 0.5.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-app/assets/{canonical-BuO7_FJb.js → canonical-wWV9jbzN.js} +2 -2
- package/dist-app/assets/{canvas-record-D3HdLWps.js → canvas-record-BHE3oU8V.js} +1 -1
- package/dist-app/assets/{claude-code-session-DA4UoHlf.js → claude-code-session-DNu1noFg.js} +1 -1
- package/dist-app/assets/{codex-session-CTdwdWhJ.js → codex-session-tfRW8ANZ.js} +1 -1
- package/dist-app/assets/{dsh-session-4Ul6Mxx8.js → dsh-session-B5EgVXLB.js} +1 -1
- package/dist-app/assets/{experiment-loop-t0sYsW2J.js → experiment-loop-Dv6KJPhf.js} +1 -1
- package/dist-app/assets/{http-bridge-DOGmFOH2.js → http-bridge-DOG0Sv0E.js} +1 -1
- package/dist-app/assets/{index-BbbLhjvs.js → index-BRdlgS3c.js} +3 -3
- package/dist-app/assets/{index-DYL_9PJ-.js → index-BrpB22PP.js} +1 -1
- package/dist-app/assets/{index-DpEbRp_J.js → index-CSvW8Pqz.js} +1 -1
- package/dist-app/assets/{index-CGGP8_QX.js → index-Du6_AuUF.js} +16 -16
- package/dist-app/assets/{pi-session-CYGbudh0.js → pi-session-BxEhSP49.js} +1 -1
- package/dist-app/assets/{sensitive-scan-C8VYATus.js → sensitive-scan-CUWgeb_A.js} +1 -1
- package/dist-app/assets/{session-handoff-AggmklDT.js → session-handoff-BPugrCrq.js} +2 -2
- package/dist-app/assets/{shared-DSCz0Bq4.js → shared-BHozYtdN.js} +1 -1
- package/dist-app/assets/{turndown-plugin-gfm.cjs-DwpDMrH3.js → turndown-plugin-gfm.cjs-B39qaw5-.js} +1 -1
- package/dist-app/assets/{update-check-KJ2ZKsng.js → update-check-CLgVgdNf.js} +1 -1
- package/dist-app/index.html +1 -1
- package/lib/why.mjs +5 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{q as x,B as A,n as T}from"./index-
|
|
1
|
+
import{q as x,B as A,n as T}from"./index-Du6_AuUF.js";import{t as w,a as g,f as d,d as b,T as S,A as h,i as m,g as k,s as C,h as L}from"./shared-BHozYtdN.js";const f=i=>typeof i=="string"?i:Array.isArray(i)?i.filter(t=>t&&t.type==="text"&&typeof t.text=="string").map(t=>t.text).join(`
|
|
2
2
|
`):"";function $(i,t){const s=t&&typeof t=="object"?t:{},e=g(i),r=typeof s.path=="string"&&s.path&&(e==="read"||e==="edit"||e==="write")?[s.path]:[];let n;if(e==="read"&&(typeof s.offset=="number"||typeof s.limit=="number")){const o=Math.max(1,typeof s.offset=="number"?s.offset:1),u=typeof s.limit=="number"?o+Math.max(0,s.limit)-1:o;n={lines:[o,Math.max(o,u)]}}if(e==="write"&&typeof s.content=="string")return{...d(`${s.path??""}
|
|
3
3
|
|
|
4
4
|
${s.content}`,h),paths:r};if(e==="edit"){const o=Array.isArray(s.edits)?s.edits:typeof s.newText=="string"?[{oldText:s.oldText,newText:s.newText}]:[];if(o.length){const u=o.map(a=>`${s.path??""}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{f as c,a,v as g}from"./index-
|
|
1
|
+
import{f as c,a,v as g}from"./index-Du6_AuUF.js";const k=[{kind:"sk-… key",re:/\bsk-[A-Za-z0-9_-]{16,}\b/g},{kind:"GitHub token",re:/\bgh[pousr]_[A-Za-z0-9]{20,}\b/g},{kind:"AWS access key",re:/\bAKIA[0-9A-Z]{16}\b/g},{kind:"Slack token",re:/\bxox[baprs]-[A-Za-z0-9-]{10,}\b/g},{kind:"Google API key",re:/\bAIza[0-9A-Za-z_-]{35}\b/g},{kind:"JWT",re:/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{6,}\b/g},{kind:"private key block",re:/-----BEGIN [A-Z ]*PRIVATE KEY-----/g},{kind:"token assignment",re:/\b(?:API_KEY|APIKEY|SECRET|TOKEN|PASSWORD|ACCESS_KEY|AUTH_TOKEN)[A-Z_]*\s*[=:]\s*['"]?[A-Za-z0-9_/+-]{16,}/g},{kind:"HuggingFace token",re:/\bhf_[A-Za-z0-9]{30,}\b/g},{kind:"npm token",re:/\bnpm_[A-Za-z0-9]{30,}\b/g}],f=t=>t.length<=10?`${t.slice(0,4)}…`:`${t.slice(0,6)}…${t.slice(-2)}`;function o(t,e,s){if(t)for(const{kind:i,re:n}of k){n.lastIndex=0;const r=n.exec(t);if(r&&s.push({where:e,kind:i,sample:f(r[0])}),s.length>=20)return}}function l(t){const e=[];for(const s of t){const i=(s.data.question||s.data.summaries?.[0]||s.id).replace(/\s+/g," ").slice(0,28);o(s.data.question,i,e);for(const n of s.data.responses??[])o(n,i,e);for(const n of s.data.attachments??[])n.type.startsWith("image/")||o(n.content,`${i} · ${n.name}`,e);if(e.length>=20)break}return e}async function b(t){const e=l(t);if(e.length===0)return!0;const s=e.slice(0,5).map(n=>`· ${n.where} — ${n.kind}(${n.sample})`).join(`
|
|
2
2
|
`),i=e.length>5?`
|
|
3
3
|
${c(a("sensitive.more"),{n:e.length-5})}`:"";return g({title:a("sensitive.title"),message:`${c(a("sensitive.body"),{n:e.length})}
|
|
4
4
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/canonical-
|
|
2
|
-
import{t as n,a as e,_ as p,f as a,u as h}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/canonical-wWV9jbzN.js","assets/index-Du6_AuUF.js","assets/index-CvcT19An.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{t as n,a as e,_ as p,f as a,u as h}from"./index-Du6_AuUF.js";const l=/^http:\/\/(127\.0\.0\.1|localhost|\[::1\])(:\d+)?\//i;async function w(){const s=window.location.hash,r=s.match(/[#&]import-url=([^&]+)/);if(!r)return;const c=/[#&]mode=harvest\b/.test(s);history.replaceState(null,"",window.location.pathname+window.location.search);const i=decodeURIComponent(r[1]);if(!l.test(i)){n("error",e("handoff.notLoopback"),9e3);return}try{const o=await fetch(i);if(!o.ok)throw new Error(`HTTP ${o.status}`);const d=await o.text(),{importOrAppendSession:f}=await p(async()=>{const{importOrAppendSession:u}=await import("./canonical-wWV9jbzN.js");return{importOrAppendSession:u}},__vite__mapDeps([0,1,2])),t=await f(d);if(!t)throw new Error(e("handoff.notASession"));t.kind==="appended"?n("success",a(e("atlas.appended"),{n:t.turns}),9e3):t.kind==="mounted"?n("success",a(e(t.mode==="continue"?"atlas.mountedChapter":"atlas.mountedBranch"),{n:t.turns}),12e3):t.kind==="opened"?n("info",e("atlas.upToDate"),6e3):n("info",a(e("handoff.saved"),{n:t.nodeCount}),12e3,{label:e("handoff.backupAction"),run:()=>h.getState().setBackupDialogOpen(!0)})}catch(o){n("error",a(e("handoff.failed"),{msg:o instanceof Error?o.message:String(o)}),12e3)}}export{w as consumeSessionHandoff};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{q as d,n as p,B as _,C as y}from"./index-
|
|
1
|
+
import{q as d,n as p,B as _,C as y}from"./index-Du6_AuUF.js";const I=[[/^(Read|NotebookRead|read_file|view_image)$/i,"read"],[/^(Write|write_file)$/i,"write"],[/^(Edit|MultiEdit|NotebookEdit|apply_patch)$/i,"edit"],[/^(Bash|BashOutput|Shell|exec_command|local_shell|write_stdin)$/i,"run"],[/^(Grep|Glob|LS|Search|WebSearch|web_search)$/i,"search"],[/^(WebFetch|Fetch)$/i,"fetch"],[/^(Task|Agent)$/i,"agent"]];function $(e){return I.find(([t])=>t.test(e))?.[1]??"other"}const T=800,k=32e3,O=4e3,x=(e,t)=>e.length>t?{text:`${e.slice(0,t)}
|
|
2
2
|
…[truncated, ${e.length} chars total]`,truncated:!0}:{text:e,truncated:!1},b=["<command-name>/thoughtdag</command-name>","[[thoughtdag:command]]"];function M(e){return e.filter(t=>!b.some(s=>t.question.includes(s)))}function q(e){e.width=460}function m(e){const t=y(e.data.response,90);t&&(e.data.summaries=[t])}function h(e){return e.tools.map(t=>({id:p(),name:`tool: ${t.name}${t.truncated?" (truncated)":""}`,type:"text/plain",size:t.call.length+t.result.length,content:`[call] ${t.call}
|
|
3
3
|
[result]
|
|
4
4
|
${t.result}`,...t.paths?.length?{paths:t.paths}:{},...t.op?{op:t.op}:{}}))}function w(e,t){const s=new Set,i=(n,a)=>{s.add(a);const c=a.turns.flatMap(r=>r.tools);c.length&&(n.tools=c),n.output.trim()||(n.output=a.turns.map(r=>r.response).filter(r=>r.trim()).at(-1)??""),n.itemIds.includes(a.sessionId)||n.itemIds.push(a.sessionId),!n.at&&a.at&&(n.at=a.at)};for(const n of e)for(const a of n.subagents??[]){const c=a.match?.trim();if(!c)continue;const r=t.find(o=>!s.has(o)&&o.firstQuestion.trim()===c);r&&i(a,r)}for(const n of t){if(s.has(n)||!n.at)continue;const c=e.filter(o=>o.at&&o.at<=n.at).at(-1)??e.at(-1);if(!c)continue;const r={agent:n.runner,task:n.firstQuestion,output:"",itemIds:[n.sessionId],at:n.at};i(r,n),(c.subagents??=[]).push(r)}}function S(e,t,s,i,n,a,c){const r=[];for(const o of t.subagents??[]){const f=d(`[${o.agent}] ${o.task}`.trim(),o.output,!1);f.data.isBranch=!0,f.data.importSource={runner:n,sessionId:a,itemIds:o.itemIds,...c?{cwd:c}:{},subagent:{agent:o.agent,of:t.itemIds[0]??""}},f.data.source={question:f.data.question,response:f.data.response},o.tools?.length&&(f.data.attachments=h({question:o.task,response:o.output,itemIds:o.itemIds,tools:o.tools})),m(f),s.push(f),r.push(f),i.push({id:p(),source:e.id,target:f.id,type:"smoothstep",data:{isBranchFromSelection:!0,branchYRatio:.5}})}return r}function A(e,t,s,i,n){if(e.length===0)return null;const a=[],c=[];let r={id:i.id};for(const u of e){const l=d(u.question||"(tool-only turn)",u.response,!1);l.data.importSource={runner:s,sessionId:t,itemIds:u.itemIds,...n?{cwd:n}:{}},l.data.source={question:l.data.question,response:l.data.response},l.data.attachments=h(u),m(l),a.length===0&&(l.data.isBranch=!0),a.push(l),c.push({id:p(),source:r.id,target:l.id,type:"smoothstep"}),S(l,u,a,c,s,t,n),r=l}const o=_(a,c.filter(u=>u.source!==i.id)),f=Math.min(...o.map(u=>u.position.x)),g=Math.min(...o.map(u=>u.position.y));for(const u of o)u.position={x:u.position.x-f+i.x+560,y:u.position.y-g+i.y};return{nodes:o,edges:c,turnCount:e.length}}function B(e){const t=e??{},s={};typeof t.url=="string"&&/^https?:\/\//.test(t.url)&&(s.url=t.url);const i={};if(typeof t.pages=="string"&&t.pages.trim()&&(i.pages=t.pages.trim()),typeof t.offset=="number"||typeof t.limit=="number"){const n=Math.max(1,typeof t.offset=="number"?t.offset:1),a=typeof t.limit=="number"?n+Math.max(0,t.limit)-1:n;i.lines=[n,Math.max(n,a)]}return Object.keys(i).length&&(s.locator=i),s}function C(e){const t=e??{},s=t.file_path??t.notebook_path;return typeof s=="string"&&s?[s]:[]}function R(e,t){const s=t??{},i=$(e);return i==="write"&&typeof s.content=="string"?`${s.file_path??""}
|
package/dist-app/assets/{turndown-plugin-gfm.cjs-DwpDMrH3.js → turndown-plugin-gfm.cjs-B39qaw5-.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{A as W}from"./index-
|
|
1
|
+
import{A as W}from"./index-Du6_AuUF.js";function Y(d,p){for(var g=0;g<p.length;g++){const s=p[g];if(typeof s!="string"&&!Array.isArray(s)){for(const c in s)if(c!=="default"&&!(c in d)){const o=Object.getOwnPropertyDescriptor(s,c);o&&Object.defineProperty(d,c,o.get?o:{enumerable:!0,get:()=>s[c]})}}}return Object.freeze(Object.defineProperty(d,Symbol.toStringTag,{value:"Module"}))}var u={},E;function J(){if(E)return u;E=1,Object.defineProperty(u,"__esModule",{value:!0});var d=/highlight-(?:text|source)-([a-z0-9]+)/;function p(t){t.addRule("highlightedCodeBlock",{filter:function(e){var r=e.firstChild;return e.nodeName==="DIV"&&d.test(e.className)&&r&&r.nodeName==="PRE"},replacement:function(e,r,n){var l=r.className||"",i=(l.match(d)||[null,""])[1];return`
|
|
2
2
|
|
|
3
3
|
`+n.fence+i+`
|
|
4
4
|
`+r.firstChild.textContent+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as s,a as o}from"./index-
|
|
1
|
+
import{t as s,a as o}from"./index-Du6_AuUF.js";const r=15*6e4;let i=!1;const c=new URLSearchParams(window.location.search),u=c.get("dv");c.get("su");async function n(){}function l(){for(const e of document.querySelectorAll("script[src]")){const t=e.src.match(/assets\/index-[^/?#]+\.js/);if(t)return t[0]}return null}async function d(){try{const e=await fetch(`${window.location.pathname}?u=${Date.now()}`,{cache:"no-store"});if(!e.ok)return null;const t=(await e.text()).match(/assets\/index-[^"'?#]+\.js/);return t?t[0]:null}catch{return null}}async function a(){if(i)return;const e=l();if(!e)return;const t=await d();t&&t!==e&&(i=!0,s("info",o("update.available"),0,{label:o("update.refresh"),run:()=>window.location.reload()}))}function v(){document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&(a(),n())}),setInterval(()=>{a(),n()},r),u&&setTimeout(()=>{n()},5e3)}export{v as bootUpdateCheck};
|
package/dist-app/index.html
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
<meta name="twitter:title" content="ThoughtDAG — Your thinking deserves a map" />
|
|
23
23
|
<meta name="twitter:description" content="Wires are the context: an infinite canvas where LLM conversations grow into an editable thought graph. No signup; the example canvas needs no key." />
|
|
24
24
|
<meta name="twitter:image" content="https://app.thoughtdag.workers.dev/og-twitter.jpg" />
|
|
25
|
-
<script type="module" crossorigin src="/thoughtdag/assets/index-
|
|
25
|
+
<script type="module" crossorigin src="/thoughtdag/assets/index-Du6_AuUF.js"></script>
|
|
26
26
|
<link rel="stylesheet" crossorigin href="/thoughtdag/assets/index-CvcT19An.css">
|
|
27
27
|
</head>
|
|
28
28
|
<body>
|
package/lib/why.mjs
CHANGED
|
@@ -3096,7 +3096,11 @@ async function findJson(phrase, opts = {}) {
|
|
|
3096
3096
|
}
|
|
3097
3097
|
async function turnsJson(opts = {}) {
|
|
3098
3098
|
if (opts.limit === 0) {
|
|
3099
|
-
|
|
3099
|
+
let text = await loadText();
|
|
3100
|
+
if (!Object.keys(text.sessions).length) {
|
|
3101
|
+
await ensureFresh();
|
|
3102
|
+
text = await loadText();
|
|
3103
|
+
}
|
|
3100
3104
|
return { total: Object.values(text.sessions).reduce((a, b) => a + b, 0), turns: [] };
|
|
3101
3105
|
}
|
|
3102
3106
|
const facts = await ensureFresh();
|
package/package.json
CHANGED