@weavecode/weave 0.1.1 → 0.1.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/node_modules/@weavecode/cli/dist/cli.js +4 -4
- package/node_modules/@weavecode/cli/dist/commands/chpass.js +1 -1
- package/node_modules/@weavecode/cli/dist/commands/daemon-auth.js +1 -1
- package/node_modules/@weavecode/cli/dist/commands/daemon.d.ts +7 -0
- package/node_modules/@weavecode/cli/dist/commands/daemon.js +2 -2
- package/node_modules/@weavecode/cli/dist/commands/dashboard.js +2 -2
- package/node_modules/@weavecode/cli/dist/commands/doctor.js +1 -1
- package/node_modules/@weavecode/cli/dist/commands/init.js +1 -1
- package/node_modules/@weavecode/cli/dist/commands/scan.js +1 -1
- package/node_modules/@weavecode/cli/dist/commands/status.js +2 -2
- package/node_modules/@weavecode/cli/dist/commands/uninstall.js +1 -1
- package/node_modules/@weavecode/cli/dist/i18n/dict/en.js +1 -9
- package/node_modules/@weavecode/cli/dist/i18n/dict/zh.d.ts +0 -1
- package/node_modules/@weavecode/cli/dist/i18n/dict/zh.js +2 -10
- package/node_modules/@weavecode/cli/dist/i18n/index.js +1 -1
- package/node_modules/@weavecode/cli/dist/i18n/t.js +1 -1
- package/node_modules/@weavecode/cli/dist/init/claudemd-gen.d.ts +2 -3
- package/node_modules/@weavecode/cli/dist/init/claudemd-gen.js +4 -4
- package/node_modules/@weavecode/cli/dist/init/executor.js +3 -3
- package/node_modules/@weavecode/cli/dist/init/git-commit.js +2 -2
- package/node_modules/@weavecode/cli/dist/init/harnesses/claude.js +7 -7
- package/node_modules/@weavecode/cli/dist/init/harnesses/codex.js +1 -1
- package/node_modules/@weavecode/cli/dist/init/harnesses/zcode.d.ts +29 -0
- package/node_modules/@weavecode/cli/dist/init/harnesses/zcode.js +1 -0
- package/node_modules/@weavecode/cli/dist/init/instruction-link.js +1 -1
- package/node_modules/@weavecode/cli/dist/init/plugin-templates.js +1 -1
- package/node_modules/@weavecode/cli/dist/init/prompt.js +4 -4
- package/node_modules/@weavecode/cli/dist/init/uninstall.js +6 -6
- package/node_modules/@weavecode/cli/dist/init/wiring.js +1 -1
- package/node_modules/@weavecode/cli/dist/parser.js +1 -1
- package/node_modules/@weavecode/cli/dist/statusline/ansi.js +1 -1
- package/node_modules/@weavecode/cli/dist/statusline/mock-input.js +1 -1
- package/node_modules/@weavecode/cli/dist/statusline/preview.js +2 -2
- package/node_modules/@weavecode/cli/package.json +5 -5
- package/node_modules/@weavecode/core/dist/harness-checks.js +1 -1
- package/node_modules/@weavecode/core/dist/index.d.ts +1 -1
- package/node_modules/@weavecode/core/dist/index.js +1 -1
- package/node_modules/@weavecode/core/dist/platform.js +1 -1
- package/node_modules/@weavecode/core/dist/types.d.ts +0 -8
- package/node_modules/@weavecode/core/dist/types.js +1 -1
- package/node_modules/@weavecode/core/dist/utils/fs.js +1 -1
- package/node_modules/@weavecode/core/dist/utils/logger.js +1 -1
- package/node_modules/@weavecode/core/package.json +1 -1
- package/node_modules/@weavecode/harness/dist/claude/assets.d.ts +10 -0
- package/node_modules/@weavecode/harness/dist/claude/assets.js +4 -1
- package/node_modules/@weavecode/harness/dist/claude/capture.d.ts +4 -2
- package/node_modules/@weavecode/harness/dist/claude/capture.js +15 -9
- package/node_modules/@weavecode/harness/dist/claude/detect.js +1 -1
- package/node_modules/@weavecode/harness/dist/claude/event-source.js +1 -1
- package/node_modules/@weavecode/harness/dist/claude/index.d.ts +6 -1
- package/node_modules/@weavecode/harness/dist/claude/index.js +1 -1
- package/node_modules/@weavecode/harness/dist/claude/mcp-gen.js +1 -1
- package/node_modules/@weavecode/harness/dist/claude/messaging.js +2 -2
- package/node_modules/@weavecode/harness/dist/claude/model-aliases.d.ts +14 -0
- package/node_modules/@weavecode/harness/dist/claude/model-aliases.js +1 -1
- package/node_modules/@weavecode/harness/dist/claude/peers.js +1 -1
- package/node_modules/@weavecode/harness/dist/claude/plan.d.ts +2 -0
- package/node_modules/@weavecode/harness/dist/claude/plan.js +1 -0
- package/node_modules/@weavecode/harness/dist/claude/plugins.js +4 -4
- package/node_modules/@weavecode/harness/dist/claude/prompt-inbox.js +1 -1
- package/node_modules/@weavecode/harness/dist/claude/prompt.js +3 -3
- package/node_modules/@weavecode/harness/dist/claude/questions.js +2 -2
- package/node_modules/@weavecode/harness/dist/claude/settings-gen.js +1 -1
- package/node_modules/@weavecode/harness/dist/claude/side-question.d.ts +12 -0
- package/node_modules/@weavecode/harness/dist/claude/side-question.js +1 -0
- package/node_modules/@weavecode/harness/dist/claude/statusline/config.d.ts +200 -0
- package/node_modules/@weavecode/harness/dist/claude/statusline/config.js +1 -0
- package/node_modules/@weavecode/harness/dist/claude/statusline/generator.d.ts +12 -0
- package/node_modules/@weavecode/harness/dist/claude/statusline/generator.js +745 -0
- package/node_modules/@weavecode/harness/dist/claude/statusline/git-cache.d.ts +10 -0
- package/node_modules/@weavecode/harness/dist/claude/statusline/git-cache.js +1 -0
- package/node_modules/@weavecode/harness/dist/claude/statusline/surface.d.ts +20 -0
- package/node_modules/@weavecode/harness/dist/claude/statusline/surface.js +2 -0
- package/node_modules/@weavecode/harness/dist/claude/transcript.js +3 -3
- package/node_modules/@weavecode/harness/dist/codex/assets.js +1 -1
- package/node_modules/@weavecode/harness/dist/codex/detect.js +1 -1
- package/node_modules/@weavecode/harness/dist/codex/index.d.ts +1 -0
- package/node_modules/@weavecode/harness/dist/codex/index.js +1 -1
- package/node_modules/@weavecode/harness/dist/codex/mcp.d.ts +30 -0
- package/node_modules/@weavecode/harness/dist/codex/mcp.js +1 -0
- package/node_modules/@weavecode/harness/dist/codex/messaging.js +1 -1
- package/node_modules/@weavecode/harness/dist/codex/plugin-state.js +1 -1
- package/node_modules/@weavecode/harness/dist/codex/toml.js +9 -9
- package/node_modules/@weavecode/harness/dist/driver.d.ts +110 -2
- package/node_modules/@weavecode/harness/dist/driver.js +1 -1
- package/node_modules/@weavecode/harness/dist/init/generated.js +2 -2
- package/node_modules/@weavecode/harness/dist/init/pipeline.js +1 -1
- package/node_modules/@weavecode/harness/dist/registry-wiring.js +1 -1
- package/node_modules/@weavecode/harness/dist/shared/install-link.js +1 -1
- package/node_modules/@weavecode/harness/dist/zcode/assets.d.ts +8 -0
- package/node_modules/@weavecode/harness/dist/zcode/assets.js +1 -0
- package/node_modules/@weavecode/harness/dist/zcode/capture.d.ts +36 -0
- package/node_modules/@weavecode/harness/dist/zcode/capture.js +3 -0
- package/node_modules/@weavecode/harness/dist/zcode/detect.d.ts +2 -0
- package/node_modules/@weavecode/harness/dist/zcode/detect.js +1 -0
- package/node_modules/@weavecode/harness/dist/zcode/event-source.d.ts +8 -0
- package/node_modules/@weavecode/harness/dist/zcode/event-source.js +1 -0
- package/node_modules/@weavecode/harness/dist/zcode/index.d.ts +13 -0
- package/node_modules/@weavecode/harness/dist/zcode/index.js +1 -0
- package/node_modules/@weavecode/harness/dist/zcode/mcp.d.ts +6 -0
- package/node_modules/@weavecode/harness/dist/zcode/mcp.js +2 -0
- package/node_modules/@weavecode/harness/dist/zcode/messaging.d.ts +13 -0
- package/node_modules/@weavecode/harness/dist/zcode/messaging.js +1 -0
- package/node_modules/@weavecode/harness/dist/zcode/resume.d.ts +7 -0
- package/node_modules/@weavecode/harness/dist/zcode/resume.js +1 -0
- package/node_modules/@weavecode/harness/package.json +2 -2
- package/node_modules/@weavecode/server/dist/daemon/dev-entry.js +1 -1
- package/node_modules/@weavecode/server/dist/daemon/hook-pipeline.d.ts +8 -1
- package/node_modules/@weavecode/server/dist/daemon/hook-pipeline.js +1 -1
- package/node_modules/@weavecode/server/dist/daemon/hooks-routes.js +1 -1
- package/node_modules/@weavecode/server/dist/daemon/server.d.ts +7 -0
- package/node_modules/@weavecode/server/dist/daemon/server.js +8 -6
- package/node_modules/@weavecode/server/dist/daemon/session-probe.d.ts +13 -0
- package/node_modules/@weavecode/server/dist/daemon/session-probe.js +1 -1
- package/node_modules/@weavecode/server/dist/daemon/snapshot-refresher.d.ts +7 -1
- package/node_modules/@weavecode/server/dist/daemon/snapshot-refresher.js +1 -1
- package/node_modules/@weavecode/server/dist/daemon/sse-hub.d.ts +40 -0
- package/node_modules/@weavecode/server/dist/daemon/sse-hub.js +1 -0
- package/node_modules/@weavecode/server/dist/daemon/start.js +1 -1
- package/node_modules/@weavecode/server/dist/db/db.js +20 -2
- package/node_modules/@weavecode/server/dist/hooks/bus.d.ts +5 -0
- package/node_modules/@weavecode/server/dist/hooks/inbox-worker.d.ts +8 -1
- package/node_modules/@weavecode/server/dist/hooks/inbox-worker.js +3 -3
- package/node_modules/@weavecode/server/dist/hooks/message-deliverer.d.ts +29 -0
- package/node_modules/@weavecode/server/dist/hooks/message-deliverer.js +2 -2
- package/node_modules/@weavecode/server/dist/hooks/mirror.d.ts +9 -4
- package/node_modules/@weavecode/server/dist/hooks/mirror.js +4 -4
- package/node_modules/@weavecode/server/dist/hooks/session-purge.d.ts +3 -0
- package/node_modules/@weavecode/server/dist/hooks/session-purge.js +1 -1
- package/node_modules/@weavecode/server/dist/hooks/side-questions.d.ts +41 -0
- package/node_modules/@weavecode/server/dist/hooks/side-questions.js +1 -0
- package/node_modules/@weavecode/server/dist/hooks/toolkit.js +5 -5
- package/node_modules/@weavecode/server/dist/install/apply-update.js +1 -1
- package/node_modules/@weavecode/server/dist/install/capabilities.d.ts +10 -0
- package/node_modules/@weavecode/server/dist/install/capabilities.js +1 -1
- package/node_modules/@weavecode/server/dist/install/codex-toml.d.ts +8 -26
- package/node_modules/@weavecode/server/dist/install/codex-toml.js +1 -1
- package/node_modules/@weavecode/server/dist/install/global-config.d.ts +2 -4
- package/node_modules/@weavecode/server/dist/install/global-config.js +1 -2
- package/node_modules/@weavecode/server/dist/install/installer.d.ts +3 -5
- package/node_modules/@weavecode/server/dist/install/installer.js +1 -3
- package/node_modules/@weavecode/server/dist/install/mcp-rows.d.ts +5 -5
- package/node_modules/@weavecode/server/dist/install/mcp-rows.js +1 -1
- package/node_modules/@weavecode/server/dist/registry.js +2 -2
- package/node_modules/@weavecode/server/dist/repositories/hook-events.d.ts +7 -0
- package/node_modules/@weavecode/server/dist/repositories/hook-events.js +2 -2
- package/node_modules/@weavecode/server/dist/repositories/sessions.d.ts +15 -4
- package/node_modules/@weavecode/server/dist/repositories/sessions.js +2 -2
- package/node_modules/@weavecode/server/dist/repositories/side-questions.d.ts +50 -0
- package/node_modules/@weavecode/server/dist/repositories/side-questions.js +6 -0
- package/node_modules/@weavecode/server/dist/statusline/config.d.ts +4 -198
- package/node_modules/@weavecode/server/dist/statusline/config.js +1 -1
- package/node_modules/@weavecode/server/dist/statusline/generator.d.ts +5 -0
- package/node_modules/@weavecode/server/dist/statusline/generator.js +1 -717
- package/node_modules/@weavecode/server/dist/statusline/manager.d.ts +5 -5
- package/node_modules/@weavecode/server/dist/statusline/manager.js +3 -4
- package/node_modules/@weavecode/server/dist/surfaces.d.ts +11 -1
- package/node_modules/@weavecode/server/dist/surfaces.js +1 -1
- package/node_modules/@weavecode/server/package.json +4 -4
- package/node_modules/@weavecode/server/web/dist/assets/index-CHWbLAje.js +594 -0
- package/node_modules/@weavecode/server/web/dist/assets/index-D0s5v8QS.css +11 -0
- package/node_modules/@weavecode/server/web/dist/index.html +2 -2
- package/node_modules/@weavecode/templates/package.json +2 -2
- package/package.json +6 -6
- package/node_modules/@weavecode/server/web/dist/assets/index-D5WFh77i.css +0 -11
- package/node_modules/@weavecode/server/web/dist/assets/index-DJibaGnJ.js +0 -585
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type StatuslineConfig } from './config.js';
|
|
2
|
+
import type { StatuslineFacts } from '@weavecode/harness';
|
|
2
3
|
/** 生成脚本的项目根相对落点(posix)——init 文件漂移检测的比对面。 */
|
|
3
4
|
export declare function statuslineScriptRelPath(): string;
|
|
4
5
|
/** Point the global template directory elsewhere (tests use a temp dir). */
|
|
@@ -24,12 +25,11 @@ export declare function writeStatuslineScript(projectPath: string, script: strin
|
|
|
24
25
|
/** Read the generated statusline script (empty string if absent). */
|
|
25
26
|
export declare function readStatuslineScript(projectPath: string): Promise<string>;
|
|
26
27
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* it on a timer during idle periods — updates after each assistant response
|
|
30
|
-
* are event-driven by Claude Code itself and need no weave-side polling.
|
|
31
|
-
* Preserves all other settings. Idempotent.
|
|
28
|
+
* 渲染脚本算好留在缓存里的块事实(今天 = git 三块),供对话页底条摆同款块。
|
|
29
|
+
* 缓存文件名/键形归 harness(surface.facts),这里只递缓存目录与目录路径。
|
|
32
30
|
*/
|
|
31
|
+
export declare function readStatuslineFacts(projectPath: string): StatuslineFacts | null;
|
|
32
|
+
/** settings.json 的 statusLine 键形归 claude(surface.wire),此处只转发。 */
|
|
33
33
|
export declare function ensureSettingsStatusLine(projectPath: string, refreshInterval?: number): Promise<void>;
|
|
34
34
|
/**
|
|
35
35
|
* Apply a statusline config to a project: persist it, regenerate the script
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import{readFile as
|
|
2
|
-
`,"utf-8")}export async function readStatuslineConfig(t){const
|
|
3
|
-
`,"utf-8")}export async function writeStatuslineScript(t,
|
|
4
|
-
`,"utf-8")}export async function applyStatuslineConfig(t,n){await writeStatuslineConfig(t,n);const e=(n.source??"global")==="global"?await readGlobalStatuslineConfig():a(n),r=x(e);await writeStatuslineScript(t,r),await ensureSettingsStatusLine(t,e.refreshInterval)}function $(t){let n,e=!1;if(t.lines?.length)n=t.lines.map(o=>[...o]);else if(t.order?.length){e=!0;const o=t.order;t.layout==="multi"?n=[C.filter(i=>o.includes(i)),L.filter(i=>o.includes(i))].filter(i=>i.length>0):n=[o]}else e=!0,n=s.lines.map(o=>[...o]);const r=new Set;if(n=n.map(o=>o.filter(i=>!w.includes(i)||r.has(i)?!1:(r.add(i),!0))),n.length===0&&(n=[[]]),e){const o=w.filter(i=>{if(r.has(i))return!1;const c=t.segments?.[i];return typeof c?.enabled=="boolean"?c.enabled:s.segments[i].enabled});o.length&&(n[0]=[...n[0],...o])}return n}const j=/^#[0-9a-fA-F]{6}$/,v=/^#([0-9a-fA-F]{3})$/,A=/^ansi256:(\d{1,3})$/;function S(t,n){if(typeof t!="string")return n;if(N.includes(t))return t;const e=A.exec(t);if(e){const o=Number(e[1]);return o>=0&&o<=255?`ansi256:${o}`:n}if(j.test(t))return t.toLowerCase();const r=v.exec(t);if(r){const[,o]=r;return`#${o[0]}${o[0]}${o[1]}${o[1]}${o[2]}${o[2]}`.toLowerCase()}return n}function O(t,n){if(!t||typeof t!="object")return{...n};const e=t,r={...n,...e,color:S(e.color,n.color),backgroundColor:e.backgroundColor==null?null:S(e.backgroundColor,n.backgroundColor??"gray")};return(typeof e.label!="string"||e.label==="")&&delete r.label,(typeof e.format!="string"||e.format==="")&&delete r.format,e.metric!=="session"&&e.metric!=="context"&&delete r.metric,e.window!=="five_hour"&&e.window!=="seven_day"&&e.window!=="spend"&&delete r.window,r}function F(t){const n=s.bar;if(!t||typeof t!="object")return{...n};const e=t,r=Math.round(Number(e.cells));return{cells:Number.isFinite(r)?Math.max(1,Math.min(40,r)):n.cells,fill:typeof e.fill=="string"&&e.fill!==""?e.fill:n.fill,empty:typeof e.empty=="string"&&e.empty!==""?e.empty:n.empty}}function a(t){const n={...s.segments};for(const r of Object.keys(n))n[r]=O(t.segments?.[r],n[r]);const e=t.refreshInterval;return{separator:t.separator??s.separator,align:t.align??s.align,logoText:s.logoText,logoColor:S(t.logoColor,s.logoColor),powerline:{...t.powerline,enabled:t.powerline?.enabled??s.powerline.enabled},lines:$(t),refreshInterval:e!=null&&e>=1?e:s.refreshInterval,source:t.source??s.source,bar:F(t.bar),divider:typeof t.divider=="string"?t.divider:s.divider,labelSeparator:typeof t.labelSeparator=="string"?t.labelSeparator:s.labelSeparator,segments:n}}
|
|
1
|
+
import{readFile as f,writeFile as g,mkdir as m}from"node:fs/promises";import{homedir as h}from"node:os";import s from"node:path";import{DEFAULT_STATUSLINE_CONFIG as i,LEGACY_IDENTITY_LINE as C,LEGACY_METRICS_LINE as E,NAMED_COLORS as L,SEGMENT_ORDER as d}from"./config.js";import{generateStatuslineScript as x,statuslineCacheDir as I}from"./generator.js";import{statuslineSurfaceFor as N}from"../surfaces.js";const b=".weave",w="statusline.json",y="statusline.json",a=N("claude");export function statuslineScriptRelPath(){return a.scriptRelPath}let u=s.join(h(),".weave");export function setGlobalStatuslineDir(t){u=t}export async function readGlobalStatuslineConfig(){try{const t=await f(s.join(u,y),"utf-8");return{...c(JSON.parse(t)),source:"global"}}catch{return i}}export async function writeGlobalStatuslineConfig(t){await m(u,{recursive:!0});const e={...c(t),source:"global"};await g(s.join(u,y),`${JSON.stringify(e,null,2)}
|
|
2
|
+
`,"utf-8")}export async function readStatuslineConfig(t){const e=await readGlobalStatuslineConfig();try{const n=await f(s.join(t,b,w),"utf-8"),r=JSON.parse(n);return r.source==="custom"?c(r):e}catch{return e}}export async function writeStatuslineConfig(t,e){const n=s.join(t,b);await m(n,{recursive:!0});const o=(e.source??"global")==="global"?{source:"global"}:c(e);await g(s.join(n,w),`${JSON.stringify(o,null,2)}
|
|
3
|
+
`,"utf-8")}export async function writeStatuslineScript(t,e){const n=s.join(t,a.scriptRelPath);return await m(s.dirname(n),{recursive:!0}),await g(n,e,"utf-8"),n}export async function readStatuslineScript(t){try{return await f(s.join(t,a.scriptRelPath),"utf-8")}catch{return""}}export function readStatuslineFacts(t){return a.facts?.(I(),t)??null}export async function ensureSettingsStatusLine(t,e=30){await a.wire(t,{scriptPath:s.join(t,a.scriptRelPath),refreshInterval:e})}export async function applyStatuslineConfig(t,e){await writeStatuslineConfig(t,e);const n=(e.source??"global")==="global"?await readGlobalStatuslineConfig():c(e),r=x(n);await writeStatuslineScript(t,r),await ensureSettingsStatusLine(t,n.refreshInterval)}function T(t){let e,n=!1;if(t.lines?.length)e=t.lines.map(o=>[...o]);else if(t.order?.length){n=!0;const o=t.order;t.layout==="multi"?e=[C.filter(l=>o.includes(l)),E.filter(l=>o.includes(l))].filter(l=>l.length>0):e=[o]}else n=!0,e=i.lines.map(o=>[...o]);const r=new Set;if(e=e.map(o=>o.filter(l=>!d.includes(l)||r.has(l)?!1:(r.add(l),!0))),e.length===0&&(e=[[]]),n){const o=d.filter(l=>{if(r.has(l))return!1;const S=t.segments?.[l];return typeof S?.enabled=="boolean"?S.enabled:i.segments[l].enabled});o.length&&(e[0]=[...e[0],...o])}return e}const _=/^#[0-9a-fA-F]{6}$/,A=/^#([0-9a-fA-F]{3})$/,F=/^ansi256:(\d{1,3})$/;function p(t,e){if(typeof t!="string")return e;if(L.includes(t))return t;const n=F.exec(t);if(n){const o=Number(n[1]);return o>=0&&o<=255?`ansi256:${o}`:e}if(_.test(t))return t.toLowerCase();const r=A.exec(t);if(r){const[,o]=r;return`#${o[0]}${o[0]}${o[1]}${o[1]}${o[2]}${o[2]}`.toLowerCase()}return e}function $(t,e){if(!t||typeof t!="object")return{...e};const n=t,r={...e,...n,color:p(n.color,e.color),backgroundColor:n.backgroundColor==null?null:p(n.backgroundColor,e.backgroundColor??"gray")};return(typeof n.label!="string"||n.label==="")&&delete r.label,(typeof n.format!="string"||n.format==="")&&delete r.format,n.metric!=="session"&&n.metric!=="context"&&delete r.metric,n.window!=="five_hour"&&n.window!=="seven_day"&&n.window!=="spend"&&delete r.window,r}function j(t){const e=i.bar;if(!t||typeof t!="object")return{...e};const n=t,r=Math.round(Number(n.cells));return{cells:Number.isFinite(r)?Math.max(1,Math.min(40,r)):e.cells,fill:typeof n.fill=="string"&&n.fill!==""?n.fill:e.fill,empty:typeof n.empty=="string"&&n.empty!==""?n.empty:e.empty}}function c(t){const e={...i.segments};for(const r of Object.keys(e))e[r]=$(t.segments?.[r],e[r]);const n=t.refreshInterval;return{separator:t.separator??i.separator,align:t.align??i.align,logoText:i.logoText,logoColor:p(t.logoColor,i.logoColor),powerline:{...t.powerline,enabled:t.powerline?.enabled??i.powerline.enabled},lines:T(t),refreshInterval:n!=null&&n>=1?n:i.refreshInterval,source:t.source??i.source,bar:j(t.bar),divider:typeof t.divider=="string"?t.divider:i.divider,labelSeparator:typeof t.labelSeparator=="string"?t.labelSeparator:i.labelSeparator,segments:e}}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Harness } from '@weavecode/core';
|
|
2
|
-
import { type AssetSurface, type BlockingPromptSpec, type CaptureSurface, type MessagingSurface, type PluginStateSurface, type PluginSurface } from '@weavecode/harness';
|
|
2
|
+
import { type AssetSurface, type BlockingPromptSpec, type CaptureSurface, type MessagingSurface, type PluginStateSurface, type PluginSurface, type StatuslineSurface } from '@weavecode/harness';
|
|
3
3
|
/** 按 harness 取资产表面;未注册或未补 assets 槽抛错。 */
|
|
4
4
|
export declare function assetSurfaceFor(harness: Harness): AssetSurface;
|
|
5
5
|
/**
|
|
@@ -51,3 +51,13 @@ export declare function captureSurfaces(): Array<{
|
|
|
51
51
|
* harness 无此机制(不跟踪、不作答)——codex 无此类交互,缺席即静默。
|
|
52
52
|
*/
|
|
53
53
|
export declare function blockingPromptFor(harness: Harness): BlockingPromptSpec | null;
|
|
54
|
+
/**
|
|
55
|
+
* 按 harness 取 statusline 面;null = 该 harness 没有 statusline 概念。
|
|
56
|
+
* 「TUI 里能不能注入」由面自己的 `tui` 答,调用方不按 harness 名判。
|
|
57
|
+
*/
|
|
58
|
+
export declare function statuslineSurfaceFor(harness: Harness): StatuslineSurface | null;
|
|
59
|
+
/** 全部声明了 statusline 槽的 (harness, 面) 列表——能力矩阵按本表枚举。 */
|
|
60
|
+
export declare function statuslineSurfaces(): Array<{
|
|
61
|
+
harness: Harness;
|
|
62
|
+
surface: StatuslineSurface;
|
|
63
|
+
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createRuntimeRegistry as n}from"@weavecode/harness";const
|
|
1
|
+
import{createRuntimeRegistry as n}from"@weavecode/harness";const r=n();export function assetSurfaceFor(e){const t=r.get(e)?.assets;if(!t)throw new Error(`no asset surface registered for harness: ${e}`);return t}export function assetSurfaces(){return r.all().map(e=>e.assets).filter(e=>e!==void 0)}export function pluginSurfaceFor(e){const t=r.get(e)?.plugins;if(!t)throw new Error(`no plugin surface registered for harness: ${e}`);return t}export function pluginSurfaces(){return r.all().filter(e=>e.plugins!==void 0).map(e=>({harness:e.id,surface:e.plugins}))}export function pluginStateFor(e){const t=r.get(e)?.pluginState;if(!t)throw new Error(`no plugin state surface registered for harness: ${e}`);return t}export function pluginStateSurfaces(){return r.all().filter(e=>e.pluginState!==void 0).map(e=>({harness:e.id,state:e.pluginState}))}export function messagingSurfaceFor(e){const t=r.get(e)?.messaging;if(!t)throw new Error(`no messaging surface registered for harness: ${e}`);return t}export function messagingSurfaces(){return r.all().filter(e=>e.messaging!==void 0).map(e=>({harness:e.id,surface:e.messaging}))}export function captureSurfaces(){return r.all().filter(e=>e.capture!==void 0).map(e=>({harness:e.id,surface:e.capture}))}export function blockingPromptFor(e){return r.get(e)?.questions??null}export function statuslineSurfaceFor(e){return r.get(e)?.statusline??null}export function statuslineSurfaces(){return r.all().filter(e=>e.statusline!==void 0).map(e=>({harness:e.id,surface:e.statusline}))}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weavecode/server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Weave daemon — HTTP server, SQLite data layer, and hook ingestion",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"node": ">=22.5.0"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@weavecode/core": "^0.1.
|
|
24
|
-
"@weavecode/harness": "^0.1.
|
|
25
|
-
"@weavecode/templates": "^0.1.
|
|
23
|
+
"@weavecode/core": "^0.1.2",
|
|
24
|
+
"@weavecode/harness": "^0.1.2",
|
|
25
|
+
"@weavecode/templates": "^0.1.2",
|
|
26
26
|
"chokidar": "^4.0.0",
|
|
27
27
|
"selfsigned": "^5.5.0",
|
|
28
28
|
"smol-toml": "^1.3.0",
|