@zibby/skills 0.1.95 → 0.2.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 +1 -1
- package/dist/artifact.d.ts +1 -115
- package/dist/browser.d.ts +10 -19
- package/dist/chartRender.d.ts +46 -57
- package/dist/chartRender.js +1 -1
- package/dist/chat-memory.d.ts +26 -330
- package/dist/chat-notify.d.ts +30 -409
- package/dist/chat-notify.js +3 -3
- package/dist/chatProgress.d.ts +28 -47
- package/dist/code-scan.d.ts +52 -58
- package/dist/codeStats.d.ts +36 -136
- package/dist/codeStats.js +1 -1
- package/dist/codebaseMemory.d.ts +52 -32
- package/dist/codebaseMemory.js +2 -2
- package/dist/core-tools.d.ts +10 -131
- package/dist/datasetStore.d.ts +52 -179
- package/dist/datasetStore.js +12 -3
- package/dist/discord.d.ts +32 -68
- package/dist/figma.d.ts +5 -408
- package/dist/function-skill.d.ts +23 -135
- package/dist/function-skill.js +1 -1
- package/dist/gbrain.d.ts +46 -114
- package/dist/git-write.d.ts +45 -137
- package/dist/git-write.js +6 -6
- package/dist/git.d.ts +2 -73
- package/dist/github.d.ts +2 -1202
- package/dist/gitlab.d.ts +55 -1059
- package/dist/gitlab.js +2 -2
- package/dist/googleDocs.d.ts +39 -175
- package/dist/hubspot.d.ts +1 -381
- package/dist/index.d.ts +19 -12
- package/dist/index.js +157 -148
- package/dist/integrations.d.ts +2 -2
- package/dist/jira.d.ts +2 -532
- package/dist/jira.js +4 -4
- package/dist/kvMemory.d.ts +47 -78
- package/dist/lark.d.ts +2 -161
- package/dist/lark.js +1 -1
- package/dist/larkDocs.d.ts +35 -236
- package/dist/linear.d.ts +36 -343
- package/dist/linkedin.d.ts +10 -120
- package/dist/llm-billing.d.ts +92 -180
- package/dist/llm-billing.js +1 -1
- package/dist/memory.d.ts +11 -137
- package/dist/notion.d.ts +28 -276
- package/dist/notion.js +4 -4
- package/dist/opendesign.d.ts +24 -202
- package/dist/opendesign.js +2 -2
- package/dist/package.json +3 -2
- package/dist/plane.d.ts +40 -24
- package/dist/report.d.ts +153 -110
- package/dist/review-dedup.d.ts +8 -8
- package/dist/review.d.ts +12 -2
- package/dist/reviewMemoryIo.d.ts +37 -3
- package/dist/reviewRecord.d.ts +41 -47
- package/dist/sentry.d.ts +25 -22
- package/dist/skill-installer.d.ts +11 -86
- package/dist/slack.d.ts +1 -284
- package/dist/socialCard.d.ts +35 -89
- package/dist/test-runner.d.ts +1 -220
- package/dist/trackers/github-adapter.d.ts +39 -94
- package/dist/trackers/index.d.ts +25 -18
- package/dist/trackers/jira-adapter.d.ts +20 -88
- package/dist/trackers/linear-adapter.d.ts +24 -87
- package/dist/trackers/plane-adapter.d.ts +29 -85
- package/dist/trackers/plane-adapter.js +1 -1
- package/dist/trackers/types.d.ts +1 -186
- package/dist/triggerAgent.d.ts +26 -42
- package/dist/triggerAgent.js +1 -1
- package/dist/workflow-builder.d.ts +11 -245
- package/docs/cli-reference.md +33 -0
- package/docs/concepts/designing-agents.md +201 -0
- package/docs/self-host/backup-restore.md +52 -0
- package/docs/self-host/index.md +75 -0
- package/docs/self-host/storage.md +50 -0
- package/docs/self-host/troubleshooting.md +48 -0
- package/docs/self-host/upgrade.md +81 -0
- package/package.json +3 -2
package/dist/opendesign.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{existsSync as m}from"fs";import{fileURLToPath as f}from"url";import{dirname as _,resolve as y}from"path";import{resolveIntegrationToken as I}from"@zibby/core/backend-client.js";var g=Object.freeze({SENTRY:"sentry",JIRA:"jira",GITHUB:"github",GITLAB:"gitlab",SLACK:"slack",LARK:"lark",OPENAI_BILLING:"openai_billing",ANTHROPIC_BILLING:"anthropic_billing",CURSOR_ADMIN:"cursor_admin",NOTION:"notion",GOOGLE:"google",PLANE:"plane",LINEAR:"linear",FIGMA:"figma",HUBSPOT:"hubspot",OPEN_DESIGN:"open_design",LINKEDIN_PERSONAL:"linkedin_personal",LINKEDIN_BUSINESS:"linkedin_business",DISCORD:"discord"}),O=Object.freeze({sentry:{id:"sentry",name:"Sentry",connectPath:"/integrations?provider=sentry"},jira:{id:"jira",name:"Jira",connectPath:"/integrations?provider=jira"},github:{id:"github",name:"GitHub",connectPath:"/integrations?provider=github"},gitlab:{id:"gitlab",name:"GitLab",connectPath:"/integrations?provider=gitlab"},slack:{id:"slack",name:"Slack",connectPath:"/integrations?provider=slack"},lark:{id:"lark",name:"Lark",connectPath:"/integrations?provider=lark"},openai_billing:{id:"openai_billing",name:"OpenAI Admin",connectPath:"/integrations?provider=openai_billing"},anthropic_billing:{id:"anthropic_billing",name:"Anthropic Admin",connectPath:"/integrations?provider=anthropic_billing"},cursor_admin:{id:"cursor_admin",name:"Cursor Admin",connectPath:"/integrations?provider=cursor_admin"},notion:{id:"notion",name:"Notion",connectPath:"/integrations?provider=notion"},google:{id:"google",name:"Google Docs",connectPath:"/integrations?provider=google"},plane:{id:"plane",name:"Plane",connectPath:"/integrations?provider=plane"},linear:{id:"linear",name:"Linear",connectPath:"/integrations?provider=linear"},figma:{id:"figma",name:"Figma",connectPath:"/integrations?provider=figma"},hubspot:{id:"hubspot",name:"HubSpot",connectPath:"/integrations?provider=hubspot"},open_design:{id:"open_design",name:"OpenDesign",connectPath:"/integrations?provider=open_design"},linkedin_personal:{id:"linkedin_personal",name:"LinkedIn (Personal)",connectPath:"/integrations?provider=linkedin_personal"},linkedin_business:{id:"linkedin_business",name:"LinkedIn (Business)",connectPath:"/integrations?provider=linkedin_business"},discord:{id:"discord",name:"Discord",connectPath:"/integrations?provider=discord"}});function j(){if(process.env.MCP_SKILL_PATH)return process.env.MCP_SKILL_PATH;let r=_(f(import.meta.url)),
|
|
1
|
+
import{existsSync as m}from"fs";import{fileURLToPath as f}from"url";import{dirname as _,resolve as y}from"path";import{resolveIntegrationToken as I}from"@zibby/core/backend-client.js";var g=Object.freeze({SENTRY:"sentry",JIRA:"jira",GITHUB:"github",GITLAB:"gitlab",SLACK:"slack",LARK:"lark",OPENAI_BILLING:"openai_billing",ANTHROPIC_BILLING:"anthropic_billing",CURSOR_ADMIN:"cursor_admin",NOTION:"notion",GOOGLE:"google",PLANE:"plane",LINEAR:"linear",FIGMA:"figma",HUBSPOT:"hubspot",OPEN_DESIGN:"open_design",LINKEDIN_PERSONAL:"linkedin_personal",LINKEDIN_BUSINESS:"linkedin_business",DISCORD:"discord"}),O=Object.freeze({sentry:{id:"sentry",name:"Sentry",connectPath:"/integrations?provider=sentry"},jira:{id:"jira",name:"Jira",connectPath:"/integrations?provider=jira"},github:{id:"github",name:"GitHub",connectPath:"/integrations?provider=github"},gitlab:{id:"gitlab",name:"GitLab",connectPath:"/integrations?provider=gitlab"},slack:{id:"slack",name:"Slack",connectPath:"/integrations?provider=slack"},lark:{id:"lark",name:"Lark",connectPath:"/integrations?provider=lark"},openai_billing:{id:"openai_billing",name:"OpenAI Admin",connectPath:"/integrations?provider=openai_billing"},anthropic_billing:{id:"anthropic_billing",name:"Anthropic Admin",connectPath:"/integrations?provider=anthropic_billing"},cursor_admin:{id:"cursor_admin",name:"Cursor Admin",connectPath:"/integrations?provider=cursor_admin"},notion:{id:"notion",name:"Notion",connectPath:"/integrations?provider=notion"},google:{id:"google",name:"Google Docs",connectPath:"/integrations?provider=google"},plane:{id:"plane",name:"Plane",connectPath:"/integrations?provider=plane"},linear:{id:"linear",name:"Linear",connectPath:"/integrations?provider=linear"},figma:{id:"figma",name:"Figma",connectPath:"/integrations?provider=figma"},hubspot:{id:"hubspot",name:"HubSpot",connectPath:"/integrations?provider=hubspot"},open_design:{id:"open_design",name:"OpenDesign",connectPath:"/integrations?provider=open_design"},linkedin_personal:{id:"linkedin_personal",name:"LinkedIn (Personal)",connectPath:"/integrations?provider=linkedin_personal"},linkedin_business:{id:"linkedin_business",name:"LinkedIn (Business)",connectPath:"/integrations?provider=linkedin_business"},discord:{id:"discord",name:"Discord",connectPath:"/integrations?provider=discord"}});function j(){if(process.env.MCP_SKILL_PATH)return process.env.MCP_SKILL_PATH;let r=_(f(import.meta.url)),n=y(r,"..","bin","mcp-skill.mjs");return m(n)?n:null}async function l(){let r=await I(g.OPEN_DESIGN),n=r?.token,e=r?.baseUrl;if(!n||typeof n!="string")throw new Error("OpenDesign is not connected: missing token. Connect it in Integrations.");if(!e||typeof e!="string")throw new Error("OpenDesign is not connected: missing baseUrl. Connect it in Integrations.");let t=e.replace(/\/+$/,"");return{token:n,baseUrl:t}}async function d(r,n={}){let{token:e,baseUrl:t}=await l(),i=`${t}/api${r}`;if(n.query&&typeof n.query=="object"){let a=new URLSearchParams;for(let[h,p]of Object.entries(n.query))p!=null&&p!==""&&a.set(h,String(p));let c=a.toString();c&&(i+=(i.includes("?")?"&":"?")+c)}let o={Authorization:`Bearer ${e}`,Accept:"application/json",...n.body?{"Content-Type":"application/json"}:{}},s=await fetch(i,{method:n.method||"GET",headers:o,body:n.body?JSON.stringify(n.body):void 0});return u(s,"OpenDesign")}async function u(r,n){if(!r.ok){let t=await r.text().catch(()=>""),i=t.slice(0,300);try{let o=JSON.parse(t),s=o?.code||o?.error?.code,a=o?.message||o?.error?.message||o?.error;(s||a)&&(i=[s?`[${s}]`:null,a].filter(Boolean).join(" ")||i)}catch{}throw new Error(`${n} API ${r.status}: ${i}`)}let e=await r.text().catch(()=>"");if(!e)return{};try{return JSON.parse(e)}catch{return{raw:e}}}var T={id:"open-design",serverName:"opendesign",allowedTools:["mcp__opendesign__*"],envKeys:[],description:"OpenDesign \u2014 list projects/designs, run the design agent, and export decks to PDF/HTML",promptFragment:`## OpenDesign (optional)
|
|
2
2
|
You may have access to the user's OpenDesign workspace (the Zibby-managed design/deck app) via its REST API. These tools are OPTIONAL \u2014 if OpenDesign is not connected they will return a "not connected" error; reach for them only when the task involves OpenDesign projects, designs, or exports. Tools (mcp__opendesign__*):
|
|
3
3
|
|
|
4
4
|
### Connectivity
|
|
@@ -20,4 +20,4 @@ You may have access to the user's OpenDesign workspace (the Zibby-managed design
|
|
|
20
20
|
|
|
21
21
|
### Notes
|
|
22
22
|
- A design artifact lookup ALWAYS needs its projectId (it scopes the query).
|
|
23
|
-
- After opendesign_cli_run, poll opendesign_cli_status with the returned runId until the run is no longer running.`,resolve(){let r=j();if(!r)return{command:null,args:[],env:{},description:this.description};let
|
|
23
|
+
- After opendesign_cli_run, poll opendesign_cli_status with the returned runId until the run is no longer running.`,resolve(){let r=j();if(!r)return{command:null,args:[],env:{},description:this.description};let n={};for(let e of this.envKeys)process.env[e]&&(n[e]=process.env[e]);return{type:"stdio",command:"node",args:[r,"../dist/opendesign.js","opendesignSkill"],env:n,description:this.description,alwaysLoad:!0}},async handleToolCall(r,n){try{switch(r){case"opendesign_health":{let{baseUrl:e}=await l(),t=await fetch(`${e}/api/health`,{method:"GET",headers:{Accept:"application/json"}}),i=await u(t,"OpenDesign");return JSON.stringify({ok:!0,health:i})}case"opendesign_list_projects":{let e=await d("/projects");return JSON.stringify(e)}case"opendesign_get_project":{let e=n?.id||n?.projectId;if(!e)return JSON.stringify({error:"id is required"});let t=await d(`/projects/${encodeURIComponent(e)}`);return JSON.stringify(t)}case"opendesign_list_designs":{let e=n?.projectId;if(!e)return JSON.stringify({error:"projectId is required"});let t=await d("/live-artifacts",{query:{projectId:e}});return JSON.stringify(t)}case"opendesign_get_design":{let e=n?.id,t=n?.projectId;if(!e)return JSON.stringify({error:"id is required"});if(!t)return JSON.stringify({error:"projectId is required"});let i=await d(`/live-artifacts/${encodeURIComponent(e)}`,{query:{projectId:t}});return JSON.stringify(i)}case"opendesign_export_pdf":{let e=n?.projectId||n?.id,{fileName:t,title:i,deck:o}=n||{};if(!e)return JSON.stringify({error:"projectId is required"});if(!t)return JSON.stringify({error:"fileName is required"});let s={fileName:t};i!==void 0&&(s.title=i),o!==void 0&&(s.deck=o);let a=await d(`/projects/${encodeURIComponent(e)}/export/pdf`,{method:"POST",body:s});return JSON.stringify(a)}case"opendesign_export_html":{let e=n?.projectId||n?.id,t=n?.path;if(!e)return JSON.stringify({error:"projectId is required"});if(!t)return JSON.stringify({error:"path is required (the export sub-path)"});let o=String(t).replace(/^\/+/,"").split("/").map(a=>encodeURIComponent(a)).join("/"),s=await d(`/projects/${encodeURIComponent(e)}/export/${o}`,{query:{inline:1}});return JSON.stringify(s)}case"opendesign_cli_run":{let{agentId:e,message:t,projectId:i,conversationId:o,model:s}=n||{};if(!e)return JSON.stringify({error:"agentId is required"});if(!t)return JSON.stringify({error:"message is required"});let a={agentId:e,message:t};i!==void 0&&(a.projectId=i),o!==void 0&&(a.conversationId=o),s!==void 0&&(a.model=s);let c=await d("/runs",{method:"POST",body:a});return JSON.stringify(c)}case"opendesign_cli_status":{let e=n?.id||n?.runId;if(!e)return JSON.stringify({error:"id (runId) is required"});let t=await d(`/runs/${encodeURIComponent(e)}`);return JSON.stringify(t)}default:return JSON.stringify({error:`Unknown tool: ${r}`})}}catch(e){return JSON.stringify({error:e.message})}},tools:[{name:"opendesign_health",description:"Probe the OpenDesign instance (GET /api/health, no auth). Use to confirm connectivity before other calls.",input_schema:{type:"object",properties:{}}},{name:"opendesign_list_projects",description:"List the projects in the OpenDesign workspace.",input_schema:{type:"object",properties:{}}},{name:"opendesign_get_project",description:"Get a single OpenDesign project by id.",input_schema:{type:"object",properties:{id:{type:"string",description:"The project id."}},required:["id"]}},{name:"opendesign_list_designs",description:"List the live design artifacts in an OpenDesign project. Requires the projectId, which scopes the query.",input_schema:{type:"object",properties:{projectId:{type:"string",description:"The project id whose designs to list."}},required:["projectId"]}},{name:"opendesign_get_design",description:"Get a single live design artifact by id. Requires both the design id and its projectId.",input_schema:{type:"object",properties:{id:{type:"string",description:"The live-artifact (design) id."},projectId:{type:"string",description:"The project id the design belongs to (scopes the lookup)."}},required:["id","projectId"]}},{name:"opendesign_export_pdf",description:"Export an OpenDesign project deck to PDF. Returns the export result (e.g. a download URL/path).",input_schema:{type:"object",properties:{projectId:{type:"string",description:"The project id to export."},fileName:{type:"string",description:"The output PDF file name."},title:{type:"string",description:"Optional deck title for the PDF."},deck:{description:"Optional deck payload/override to render instead of the project's current deck."}},required:["projectId","fileName"]}},{name:"opendesign_export_html",description:"Fetch an OpenDesign project's HTML export by sub-path (requested inline). Requires projectId and the export path.",input_schema:{type:"object",properties:{projectId:{type:"string",description:"The project id to export."},path:{type:"string",description:'The export sub-path under /projects/:id/export/ (e.g. "index.html" or a slide path).'}},required:["projectId","path"]}},{name:"opendesign_cli_run",description:"Start an OpenDesign agent run. Returns a runId; poll opendesign_cli_status with it until the run finishes.",input_schema:{type:"object",properties:{agentId:{type:"string",description:"The OpenDesign agent id to run."},message:{type:"string",description:"The instruction/message to send to the agent."},projectId:{type:"string",description:"Optional project id to scope the run to."},conversationId:{type:"string",description:"Optional conversation id to continue an existing thread."},model:{type:"string",description:"Optional model id override for the run."}},required:["agentId","message"]}},{name:"opendesign_cli_status",description:"Poll the status of an OpenDesign agent run by its runId.",input_schema:{type:"object",properties:{id:{type:"string",description:"The runId returned by opendesign_cli_run."}},required:["id"]}}]};export{T as opendesignSkill};
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zibby/skills",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Built-in skill definitions for the Zibby agent-workflow framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -141,6 +141,7 @@
|
|
|
141
141
|
"esbuild": "^0.28.0",
|
|
142
142
|
"eslint": "^10.0.2",
|
|
143
143
|
"globals": "^17.4.0",
|
|
144
|
-
"typescript": "^5.9.3"
|
|
144
|
+
"typescript": "^5.9.3",
|
|
145
|
+
"@types/node": "^20.14.0"
|
|
145
146
|
}
|
|
146
147
|
}
|
package/dist/plane.d.ts
CHANGED
|
@@ -1,24 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Plane skill — plugs in the OFFICIAL Plane MCP server.
|
|
3
|
+
*
|
|
4
|
+
* Unlike jira.js / github.js (which hand-write every tool against the
|
|
5
|
+
* provider REST API), this skill is a pure MCP plug-in: it spawns the
|
|
6
|
+
* official `makeplane/plane-mcp-server` over stdio and exposes ALL of
|
|
7
|
+
* its ~100+ tools (projects, work items CRUD + search, cycles, modules,
|
|
8
|
+
* comments, epics, labels, states, pages, workspaces, …) to the agent
|
|
9
|
+
* via the `mcp__plane__*` wildcard allowlist. There is deliberately NO
|
|
10
|
+
* `tools: [...]` array and NO `handleToolCall` — the MCP server is the
|
|
11
|
+
* single source of truth for the tool surface, so it stays current with
|
|
12
|
+
* upstream without us re-implementing anything.
|
|
13
|
+
*
|
|
14
|
+
* Run path (documented stdio entrypoint): `uvx plane-mcp-server stdio`.
|
|
15
|
+
* (A Dockerfile + npx remote also exist upstream; uvx is the canonical
|
|
16
|
+
* stdio path.) `uvx` must be available in the agent runtime — see the
|
|
17
|
+
* "TO GO LIVE" note in the skill's README/handoff.
|
|
18
|
+
*
|
|
19
|
+
* Auth + endpoint (api-key style, mirrors github/sentry credential shape):
|
|
20
|
+
* - PLANE_API_KEY (required) static workspace/personal API key
|
|
21
|
+
* - PLANE_WORKSPACE_SLUG (required for stdio) the workspace to operate on
|
|
22
|
+
* - PLANE_BASE_URL (optional) the Plane API base URL
|
|
23
|
+
*
|
|
24
|
+
* Base URL is CONFIGURABLE so a single skill covers all three hosting
|
|
25
|
+
* models with no code change:
|
|
26
|
+
* - Plane Cloud: https://api.plane.so (the default)
|
|
27
|
+
* - Self-hosted Plane: https://plane.acme.com/api (the instance's API base)
|
|
28
|
+
* - Zibby-app-hosted: the Zibby-managed instance's API base URL
|
|
29
|
+
* The value flows through the integration credential (baseUrl) or the
|
|
30
|
+
* PLANE_BASE_URL env var; when absent the MCP server falls back to
|
|
31
|
+
* api.plane.so. Never hardcode the host in a tool call.
|
|
32
|
+
*
|
|
33
|
+
* Credential plumbing matches jira/github: the backend resolves the
|
|
34
|
+
* connected-integration credentials and injects them into the Fargate
|
|
35
|
+
* task env (PLANE_API_KEY / PLANE_WORKSPACE_SLUG / PLANE_BASE_URL).
|
|
36
|
+
* resolve() reads them straight from process.env — exactly like
|
|
37
|
+
* jiraSkill.resolve() reads ATLASSIAN_ACCESS_TOKEN. Local dev can set
|
|
38
|
+
* the same env vars directly.
|
|
39
|
+
*/
|
|
40
|
+
export declare const planeSkill: any;
|
package/dist/report.d.ts
CHANGED
|
@@ -1,79 +1,33 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* report — universal "rich digest" structured object + per-destination
|
|
3
|
+
* renderers.
|
|
3
4
|
*
|
|
4
|
-
*
|
|
5
|
-
* (zod parse error). Callers should validate before calling if they
|
|
6
|
-
* want softer error messages.
|
|
5
|
+
* Why this lives in @zibby/skills (not workflow-templates):
|
|
7
6
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Convert a report-object → Lark interactive-card JSON.
|
|
7
|
+
* - The SCHEMA is the contract between any producer (analyze nodes
|
|
8
|
+
* in digest workflows) and any consumer (notify-slack /
|
|
9
|
+
* notify-lark / future notify-notion / etc.). Centralizing it here
|
|
10
|
+
* keeps producer and consumer in lockstep without circular
|
|
11
|
+
* dependencies between sibling templates.
|
|
15
12
|
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Convert a report-object → Notion blocks payload.
|
|
23
|
-
*
|
|
24
|
-
* Returns three things rather than just `blocks` because Notion's
|
|
25
|
-
* page-create endpoint takes title + icon as page properties (separate
|
|
26
|
-
* from the children blocks). Callers wire them as:
|
|
27
|
-
* POST /v1/pages
|
|
28
|
-
* { parent: { database_id }, properties: { Name: { title: [...] } },
|
|
29
|
-
* icon: { type: 'emoji', emoji }, children: blocks }
|
|
30
|
-
* — or, for append-to-existing-page:
|
|
31
|
-
* PATCH /v1/blocks/{pageId}/children
|
|
32
|
-
* { children: blocks }
|
|
33
|
-
* (the title + icon are dropped when appending).
|
|
13
|
+
* - The RENDERERS (reportToBlockKit, reportToLarkCard) are
|
|
14
|
+
* deterministic functions — pure mapping from report-object to the
|
|
15
|
+
* destination's native rich-card spec. They can be unit-tested in
|
|
16
|
+
* isolation; the notify-* templates wire them into their execute
|
|
17
|
+
* paths.
|
|
34
18
|
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
19
|
+
* - Adding `notify-notion` later means writing a `reportToNotionBlocks`
|
|
20
|
+
* here, then a thin template node that imports it. No changes to
|
|
21
|
+
* existing templates or the schema.
|
|
38
22
|
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
* title: string for the page's Name title property
|
|
44
|
-
* icon: optional severity-mapped emoji for the page icon
|
|
23
|
+
* Format: 6 section kinds — headline, trend, table, callouts,
|
|
24
|
+
* breakdown, paragraph. Each section is rendered to native Slack
|
|
25
|
+
* Block-Kit / Lark-Card components. NO third-party chart-rendering,
|
|
26
|
+
* NO image generation — we rely on the IM platform's native UI.
|
|
45
27
|
*/
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
icon?: string;
|
|
50
|
-
};
|
|
51
|
-
/**
|
|
52
|
-
* Convert a report-object → a single markdown string.
|
|
53
|
-
*
|
|
54
|
-
* This is the SHARED path for the document channels (Google Docs / Lark
|
|
55
|
-
* Docs / Notion via their create/append tools, which all accept markdown):
|
|
56
|
-
* one renderer, three destinations, each destination's own
|
|
57
|
-
* markdown-to-native converter does the final mapping. Layout mirrors the
|
|
58
|
-
* chat-card renderers 1:1 so a report reads the same everywhere:
|
|
59
|
-
* - title as `#`, subtitle as a plain line under it
|
|
60
|
-
* - headline: bold primary + delta arrow + severity emoji + summary
|
|
61
|
-
* - trend: fenced code block with the same unicodeBar lines
|
|
62
|
-
* - table: a real markdown pipe table
|
|
63
|
-
* - callouts: severity-emoji bullets
|
|
64
|
-
* - breakdown: bold-label bullets
|
|
65
|
-
* - paragraph: text as-is
|
|
66
|
-
* - footer: markdown links
|
|
67
|
-
*
|
|
68
|
-
* Pure function: input → output, no I/O. Throws on invalid input
|
|
69
|
-
* (zod parse error) — same contract as the other renderers.
|
|
70
|
-
*
|
|
71
|
-
* @param {z.infer<typeof reportObjectSchema>} report
|
|
72
|
-
* @returns {string} full markdown document
|
|
73
|
-
*/
|
|
74
|
-
export function reportToMarkdown(report: z.infer<typeof reportObjectSchema>): string;
|
|
75
|
-
export const SEVERITIES: readonly ["ok", "info", "warn", "critical"];
|
|
76
|
-
export const reportObjectSchema: z.ZodObject<{
|
|
28
|
+
import { z } from 'zod';
|
|
29
|
+
export declare const SEVERITIES: readonly ["ok", "info", "warn", "critical"];
|
|
30
|
+
export declare const reportObjectSchema: z.ZodObject<{
|
|
77
31
|
title: z.ZodString;
|
|
78
32
|
subtitle: z.ZodOptional<z.ZodString>;
|
|
79
33
|
headline: z.ZodObject<{
|
|
@@ -83,30 +37,30 @@ export const reportObjectSchema: z.ZodObject<{
|
|
|
83
37
|
direction: z.ZodOptional<z.ZodEnum<["up", "down", "flat"]>>;
|
|
84
38
|
severity: z.ZodOptional<z.ZodEnum<["ok", "info", "warn", "critical"]>>;
|
|
85
39
|
}, "strip", z.ZodTypeAny, {
|
|
40
|
+
severity?: "warn" | "info" | "ok" | "critical";
|
|
86
41
|
value?: string;
|
|
87
42
|
direction?: "flat" | "up" | "down";
|
|
88
|
-
severity?: "ok" | "info" | "warn" | "critical";
|
|
89
43
|
}, {
|
|
44
|
+
severity?: "warn" | "info" | "ok" | "critical";
|
|
90
45
|
value?: string;
|
|
91
46
|
direction?: "flat" | "up" | "down";
|
|
92
|
-
severity?: "ok" | "info" | "warn" | "critical";
|
|
93
47
|
}>>;
|
|
94
48
|
summary: z.ZodOptional<z.ZodString>;
|
|
95
49
|
}, "strip", z.ZodTypeAny, {
|
|
96
50
|
summary?: string;
|
|
97
51
|
primary?: string;
|
|
98
52
|
delta?: {
|
|
53
|
+
severity?: "warn" | "info" | "ok" | "critical";
|
|
99
54
|
value?: string;
|
|
100
55
|
direction?: "flat" | "up" | "down";
|
|
101
|
-
severity?: "ok" | "info" | "warn" | "critical";
|
|
102
56
|
};
|
|
103
57
|
}, {
|
|
104
58
|
summary?: string;
|
|
105
59
|
primary?: string;
|
|
106
60
|
delta?: {
|
|
61
|
+
severity?: "warn" | "info" | "ok" | "critical";
|
|
107
62
|
value?: string;
|
|
108
63
|
direction?: "flat" | "up" | "down";
|
|
109
|
-
severity?: "ok" | "info" | "warn" | "critical";
|
|
110
64
|
};
|
|
111
65
|
}>;
|
|
112
66
|
sections: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
@@ -117,18 +71,18 @@ export const reportObjectSchema: z.ZodObject<{
|
|
|
117
71
|
highlight: z.ZodOptional<z.ZodDefault<z.ZodEnum<["last", "max", "min", "none"]>>>;
|
|
118
72
|
severity: z.ZodOptional<z.ZodEnum<["ok", "info", "warn", "critical"]>>;
|
|
119
73
|
}, "strip", z.ZodTypeAny, {
|
|
120
|
-
title?: string;
|
|
121
74
|
values?: number[];
|
|
122
|
-
|
|
123
|
-
severity?: "
|
|
75
|
+
title?: string;
|
|
76
|
+
severity?: "warn" | "info" | "ok" | "critical";
|
|
124
77
|
kind?: "trend";
|
|
78
|
+
labels?: string[];
|
|
125
79
|
highlight?: "none" | "last" | "max" | "min";
|
|
126
80
|
}, {
|
|
127
|
-
title?: string;
|
|
128
81
|
values?: number[];
|
|
129
|
-
|
|
130
|
-
severity?: "
|
|
82
|
+
title?: string;
|
|
83
|
+
severity?: "warn" | "info" | "ok" | "critical";
|
|
131
84
|
kind?: "trend";
|
|
85
|
+
labels?: string[];
|
|
132
86
|
highlight?: "none" | "last" | "max" | "min";
|
|
133
87
|
}>, z.ZodObject<{
|
|
134
88
|
kind: z.ZodLiteral<"table">;
|
|
@@ -153,12 +107,12 @@ export const reportObjectSchema: z.ZodObject<{
|
|
|
153
107
|
}, "strip", z.ZodTypeAny, {
|
|
154
108
|
title?: string;
|
|
155
109
|
kind?: "callouts";
|
|
156
|
-
tone?: "
|
|
110
|
+
tone?: "warn" | "info" | "ok" | "critical";
|
|
157
111
|
items?: string[];
|
|
158
112
|
}, {
|
|
159
113
|
title?: string;
|
|
160
114
|
kind?: "callouts";
|
|
161
|
-
tone?: "
|
|
115
|
+
tone?: "warn" | "info" | "ok" | "critical";
|
|
162
116
|
items?: string[];
|
|
163
117
|
}>, z.ZodObject<{
|
|
164
118
|
kind: z.ZodLiteral<"breakdown">;
|
|
@@ -170,32 +124,32 @@ export const reportObjectSchema: z.ZodObject<{
|
|
|
170
124
|
severity: z.ZodOptional<z.ZodEnum<["ok", "info", "warn", "critical"]>>;
|
|
171
125
|
}, "strip", z.ZodTypeAny, {
|
|
172
126
|
sub?: string;
|
|
127
|
+
severity?: "warn" | "info" | "ok" | "critical";
|
|
173
128
|
value?: string;
|
|
174
129
|
label?: string;
|
|
175
|
-
severity?: "ok" | "info" | "warn" | "critical";
|
|
176
130
|
}, {
|
|
177
131
|
sub?: string;
|
|
132
|
+
severity?: "warn" | "info" | "ok" | "critical";
|
|
178
133
|
value?: string;
|
|
179
134
|
label?: string;
|
|
180
|
-
severity?: "ok" | "info" | "warn" | "critical";
|
|
181
135
|
}>, "many">;
|
|
182
136
|
}, "strip", z.ZodTypeAny, {
|
|
183
137
|
title?: string;
|
|
184
138
|
kind?: "breakdown";
|
|
185
139
|
rows?: {
|
|
186
140
|
sub?: string;
|
|
141
|
+
severity?: "warn" | "info" | "ok" | "critical";
|
|
187
142
|
value?: string;
|
|
188
143
|
label?: string;
|
|
189
|
-
severity?: "ok" | "info" | "warn" | "critical";
|
|
190
144
|
}[];
|
|
191
145
|
}, {
|
|
192
146
|
title?: string;
|
|
193
147
|
kind?: "breakdown";
|
|
194
148
|
rows?: {
|
|
195
149
|
sub?: string;
|
|
150
|
+
severity?: "warn" | "info" | "ok" | "critical";
|
|
196
151
|
value?: string;
|
|
197
152
|
label?: string;
|
|
198
|
-
severity?: "ok" | "info" | "warn" | "critical";
|
|
199
153
|
}[];
|
|
200
154
|
}>, z.ZodObject<{
|
|
201
155
|
kind: z.ZodLiteral<"paragraph">;
|
|
@@ -210,11 +164,11 @@ export const reportObjectSchema: z.ZodObject<{
|
|
|
210
164
|
text?: string;
|
|
211
165
|
kind?: "paragraph";
|
|
212
166
|
}>]>, "many">>, ({
|
|
213
|
-
title?: string;
|
|
214
167
|
values?: number[];
|
|
215
|
-
|
|
216
|
-
severity?: "
|
|
168
|
+
title?: string;
|
|
169
|
+
severity?: "warn" | "info" | "ok" | "critical";
|
|
217
170
|
kind?: "trend";
|
|
171
|
+
labels?: string[];
|
|
218
172
|
highlight?: "none" | "last" | "max" | "min";
|
|
219
173
|
} | {
|
|
220
174
|
title?: string;
|
|
@@ -224,27 +178,27 @@ export const reportObjectSchema: z.ZodObject<{
|
|
|
224
178
|
} | {
|
|
225
179
|
title?: string;
|
|
226
180
|
kind?: "callouts";
|
|
227
|
-
tone?: "
|
|
181
|
+
tone?: "warn" | "info" | "ok" | "critical";
|
|
228
182
|
items?: string[];
|
|
229
183
|
} | {
|
|
230
184
|
title?: string;
|
|
231
185
|
kind?: "breakdown";
|
|
232
186
|
rows?: {
|
|
233
187
|
sub?: string;
|
|
188
|
+
severity?: "warn" | "info" | "ok" | "critical";
|
|
234
189
|
value?: string;
|
|
235
190
|
label?: string;
|
|
236
|
-
severity?: "ok" | "info" | "warn" | "critical";
|
|
237
191
|
}[];
|
|
238
192
|
} | {
|
|
239
193
|
title?: string;
|
|
240
194
|
text?: string;
|
|
241
195
|
kind?: "paragraph";
|
|
242
196
|
})[], ({
|
|
243
|
-
title?: string;
|
|
244
197
|
values?: number[];
|
|
245
|
-
|
|
246
|
-
severity?: "
|
|
198
|
+
title?: string;
|
|
199
|
+
severity?: "warn" | "info" | "ok" | "critical";
|
|
247
200
|
kind?: "trend";
|
|
201
|
+
labels?: string[];
|
|
248
202
|
highlight?: "none" | "last" | "max" | "min";
|
|
249
203
|
} | {
|
|
250
204
|
title?: string;
|
|
@@ -254,16 +208,16 @@ export const reportObjectSchema: z.ZodObject<{
|
|
|
254
208
|
} | {
|
|
255
209
|
title?: string;
|
|
256
210
|
kind?: "callouts";
|
|
257
|
-
tone?: "
|
|
211
|
+
tone?: "warn" | "info" | "ok" | "critical";
|
|
258
212
|
items?: string[];
|
|
259
213
|
} | {
|
|
260
214
|
title?: string;
|
|
261
215
|
kind?: "breakdown";
|
|
262
216
|
rows?: {
|
|
263
217
|
sub?: string;
|
|
218
|
+
severity?: "warn" | "info" | "ok" | "critical";
|
|
264
219
|
value?: string;
|
|
265
220
|
label?: string;
|
|
266
|
-
severity?: "ok" | "info" | "warn" | "critical";
|
|
267
221
|
}[];
|
|
268
222
|
} | {
|
|
269
223
|
title?: string;
|
|
@@ -282,22 +236,22 @@ export const reportObjectSchema: z.ZodObject<{
|
|
|
282
236
|
}>>;
|
|
283
237
|
}, "strip", z.ZodTypeAny, {
|
|
284
238
|
title?: string;
|
|
239
|
+
subtitle?: string;
|
|
285
240
|
headline?: {
|
|
286
241
|
summary?: string;
|
|
287
242
|
primary?: string;
|
|
288
243
|
delta?: {
|
|
244
|
+
severity?: "warn" | "info" | "ok" | "critical";
|
|
289
245
|
value?: string;
|
|
290
246
|
direction?: "flat" | "up" | "down";
|
|
291
|
-
severity?: "ok" | "info" | "warn" | "critical";
|
|
292
247
|
};
|
|
293
248
|
};
|
|
294
|
-
subtitle?: string;
|
|
295
249
|
sections?: ({
|
|
296
|
-
title?: string;
|
|
297
250
|
values?: number[];
|
|
298
|
-
|
|
299
|
-
severity?: "
|
|
251
|
+
title?: string;
|
|
252
|
+
severity?: "warn" | "info" | "ok" | "critical";
|
|
300
253
|
kind?: "trend";
|
|
254
|
+
labels?: string[];
|
|
301
255
|
highlight?: "none" | "last" | "max" | "min";
|
|
302
256
|
} | {
|
|
303
257
|
title?: string;
|
|
@@ -307,16 +261,16 @@ export const reportObjectSchema: z.ZodObject<{
|
|
|
307
261
|
} | {
|
|
308
262
|
title?: string;
|
|
309
263
|
kind?: "callouts";
|
|
310
|
-
tone?: "
|
|
264
|
+
tone?: "warn" | "info" | "ok" | "critical";
|
|
311
265
|
items?: string[];
|
|
312
266
|
} | {
|
|
313
267
|
title?: string;
|
|
314
268
|
kind?: "breakdown";
|
|
315
269
|
rows?: {
|
|
316
270
|
sub?: string;
|
|
271
|
+
severity?: "warn" | "info" | "ok" | "critical";
|
|
317
272
|
value?: string;
|
|
318
273
|
label?: string;
|
|
319
|
-
severity?: "ok" | "info" | "warn" | "critical";
|
|
320
274
|
}[];
|
|
321
275
|
} | {
|
|
322
276
|
title?: string;
|
|
@@ -329,22 +283,22 @@ export const reportObjectSchema: z.ZodObject<{
|
|
|
329
283
|
};
|
|
330
284
|
}, {
|
|
331
285
|
title?: string;
|
|
286
|
+
subtitle?: string;
|
|
332
287
|
headline?: {
|
|
333
288
|
summary?: string;
|
|
334
289
|
primary?: string;
|
|
335
290
|
delta?: {
|
|
291
|
+
severity?: "warn" | "info" | "ok" | "critical";
|
|
336
292
|
value?: string;
|
|
337
293
|
direction?: "flat" | "up" | "down";
|
|
338
|
-
severity?: "ok" | "info" | "warn" | "critical";
|
|
339
294
|
};
|
|
340
295
|
};
|
|
341
|
-
subtitle?: string;
|
|
342
296
|
sections?: ({
|
|
343
|
-
title?: string;
|
|
344
297
|
values?: number[];
|
|
345
|
-
|
|
346
|
-
severity?: "
|
|
298
|
+
title?: string;
|
|
299
|
+
severity?: "warn" | "info" | "ok" | "critical";
|
|
347
300
|
kind?: "trend";
|
|
301
|
+
labels?: string[];
|
|
348
302
|
highlight?: "none" | "last" | "max" | "min";
|
|
349
303
|
} | {
|
|
350
304
|
title?: string;
|
|
@@ -354,16 +308,16 @@ export const reportObjectSchema: z.ZodObject<{
|
|
|
354
308
|
} | {
|
|
355
309
|
title?: string;
|
|
356
310
|
kind?: "callouts";
|
|
357
|
-
tone?: "
|
|
311
|
+
tone?: "warn" | "info" | "ok" | "critical";
|
|
358
312
|
items?: string[];
|
|
359
313
|
} | {
|
|
360
314
|
title?: string;
|
|
361
315
|
kind?: "breakdown";
|
|
362
316
|
rows?: {
|
|
363
317
|
sub?: string;
|
|
318
|
+
severity?: "warn" | "info" | "ok" | "critical";
|
|
364
319
|
value?: string;
|
|
365
320
|
label?: string;
|
|
366
|
-
severity?: "ok" | "info" | "warn" | "critical";
|
|
367
321
|
}[];
|
|
368
322
|
} | {
|
|
369
323
|
title?: string;
|
|
@@ -375,4 +329,93 @@ export const reportObjectSchema: z.ZodObject<{
|
|
|
375
329
|
rerunUrl?: string;
|
|
376
330
|
};
|
|
377
331
|
}>;
|
|
378
|
-
|
|
332
|
+
/**
|
|
333
|
+
* Convert a report-object → Slack Block-Kit `blocks` array.
|
|
334
|
+
*
|
|
335
|
+
* Pure function: input → output, no I/O. Throws on invalid input
|
|
336
|
+
* (zod parse error). Callers should validate before calling if they
|
|
337
|
+
* want softer error messages.
|
|
338
|
+
*
|
|
339
|
+
* @param {z.infer<typeof reportObjectSchema>} report
|
|
340
|
+
* @returns {Object[]} Block Kit blocks suitable for chat.postMessage's
|
|
341
|
+
* `blocks` field.
|
|
342
|
+
*/
|
|
343
|
+
export declare function reportToBlockKit(report: any): any[];
|
|
344
|
+
/**
|
|
345
|
+
* Convert a report-object → Lark interactive-card JSON.
|
|
346
|
+
*
|
|
347
|
+
* @param {z.infer<typeof reportObjectSchema>} report
|
|
348
|
+
* @returns {Object} Lark message card payload — use as `card` field on
|
|
349
|
+
* im/v1/messages with msg_type=interactive.
|
|
350
|
+
*/
|
|
351
|
+
export declare function reportToLarkCard(report: any): {
|
|
352
|
+
config: {
|
|
353
|
+
wide_screen_mode: boolean;
|
|
354
|
+
};
|
|
355
|
+
header: {
|
|
356
|
+
title: {
|
|
357
|
+
tag: string;
|
|
358
|
+
content: string;
|
|
359
|
+
};
|
|
360
|
+
subtitle: {
|
|
361
|
+
tag: string;
|
|
362
|
+
content: string;
|
|
363
|
+
};
|
|
364
|
+
template: string;
|
|
365
|
+
};
|
|
366
|
+
elements: any[];
|
|
367
|
+
};
|
|
368
|
+
/**
|
|
369
|
+
* Convert a report-object → Notion blocks payload.
|
|
370
|
+
*
|
|
371
|
+
* Returns three things rather than just `blocks` because Notion's
|
|
372
|
+
* page-create endpoint takes title + icon as page properties (separate
|
|
373
|
+
* from the children blocks). Callers wire them as:
|
|
374
|
+
* POST /v1/pages
|
|
375
|
+
* { parent: { database_id }, properties: { Name: { title: [...] } },
|
|
376
|
+
* icon: { type: 'emoji', emoji }, children: blocks }
|
|
377
|
+
* — or, for append-to-existing-page:
|
|
378
|
+
* PATCH /v1/blocks/{pageId}/children
|
|
379
|
+
* { children: blocks }
|
|
380
|
+
* (the title + icon are dropped when appending).
|
|
381
|
+
*
|
|
382
|
+
* Pure function: input → output, no I/O. Throws on invalid input
|
|
383
|
+
* (zod parse error). Notion's block schema documented at:
|
|
384
|
+
* https://developers.notion.com/reference/block
|
|
385
|
+
*
|
|
386
|
+
* @param {z.infer<typeof reportObjectSchema>} report
|
|
387
|
+
* @returns {{ blocks: Object[], title: string, icon?: string }}
|
|
388
|
+
* blocks: array of Notion block objects (no `id` / `parent` — those
|
|
389
|
+
* are server-assigned at create time)
|
|
390
|
+
* title: string for the page's Name title property
|
|
391
|
+
* icon: optional severity-mapped emoji for the page icon
|
|
392
|
+
*/
|
|
393
|
+
export declare function reportToNotionBlocks(report: any): {
|
|
394
|
+
blocks: any[];
|
|
395
|
+
title: string;
|
|
396
|
+
icon: "🟢" | "ℹ️" | "⚠️" | "🚨";
|
|
397
|
+
};
|
|
398
|
+
/**
|
|
399
|
+
* Convert a report-object → a single markdown string.
|
|
400
|
+
*
|
|
401
|
+
* This is the SHARED path for the document channels (Google Docs / Lark
|
|
402
|
+
* Docs / Notion via their create/append tools, which all accept markdown):
|
|
403
|
+
* one renderer, three destinations, each destination's own
|
|
404
|
+
* markdown-to-native converter does the final mapping. Layout mirrors the
|
|
405
|
+
* chat-card renderers 1:1 so a report reads the same everywhere:
|
|
406
|
+
* - title as `#`, subtitle as a plain line under it
|
|
407
|
+
* - headline: bold primary + delta arrow + severity emoji + summary
|
|
408
|
+
* - trend: fenced code block with the same unicodeBar lines
|
|
409
|
+
* - table: a real markdown pipe table
|
|
410
|
+
* - callouts: severity-emoji bullets
|
|
411
|
+
* - breakdown: bold-label bullets
|
|
412
|
+
* - paragraph: text as-is
|
|
413
|
+
* - footer: markdown links
|
|
414
|
+
*
|
|
415
|
+
* Pure function: input → output, no I/O. Throws on invalid input
|
|
416
|
+
* (zod parse error) — same contract as the other renderers.
|
|
417
|
+
*
|
|
418
|
+
* @param {z.infer<typeof reportObjectSchema>} report
|
|
419
|
+
* @returns {string} full markdown document
|
|
420
|
+
*/
|
|
421
|
+
export declare function reportToMarkdown(report: any): string;
|
package/dist/review-dedup.d.ts
CHANGED
|
@@ -3,15 +3,17 @@
|
|
|
3
3
|
* line-number references (they shift between commits), strip markdown emphasis,
|
|
4
4
|
* collapse whitespace, lowercase, cap length. Line-INDEPENDENT on purpose.
|
|
5
5
|
*/
|
|
6
|
-
export function normalizeBody(body: any): string;
|
|
6
|
+
export declare function normalizeBody(body: any): string;
|
|
7
7
|
/** Content fingerprint of an inline finding — path + normalized body (NO line). */
|
|
8
|
-
export function fingerprint(path: any, body: any):
|
|
8
|
+
export declare function fingerprint(path: any, body: any): string;
|
|
9
9
|
/** Hidden marker appended to a posted inline comment. */
|
|
10
|
-
export function fpMarker(fp: any): string;
|
|
10
|
+
export declare function fpMarker(fp: any): string;
|
|
11
|
+
/** Hidden marker on the review SUMMARY note (so it's updated, not re-posted). */
|
|
12
|
+
export declare const SUMMARY_MARKER = "\n\n<!-- zbreview-summary -->";
|
|
11
13
|
/** Pull the fingerprint out of an existing comment body, or null. */
|
|
12
|
-
export function extractFp(body: any): string;
|
|
14
|
+
export declare function extractFp(body: any): string;
|
|
13
15
|
/** Does this body carry the review-summary marker? */
|
|
14
|
-
export function hasSummaryMarker(body: any): boolean;
|
|
16
|
+
export declare function hasSummaryMarker(body: any): boolean;
|
|
15
17
|
/**
|
|
16
18
|
* Split an incoming inline-comment list into { toPost, skipped } given the
|
|
17
19
|
* fingerprints ALREADY present on the MR/PR. Each toPost body gets the marker
|
|
@@ -19,9 +21,7 @@ export function hasSummaryMarker(body: any): boolean;
|
|
|
19
21
|
* @param {Array<{path,body,...}>} comments
|
|
20
22
|
* @param {Iterable<string>} existingFps
|
|
21
23
|
*/
|
|
22
|
-
export function dedupeInline(comments: any, existingFps:
|
|
24
|
+
export declare function dedupeInline(comments: any, existingFps: any): {
|
|
23
25
|
toPost: any[];
|
|
24
26
|
skipped: number;
|
|
25
27
|
};
|
|
26
|
-
/** Hidden marker on the review SUMMARY note (so it's updated, not re-posted). */
|
|
27
|
-
export const SUMMARY_MARKER: "\n\n<!-- zbreview-summary -->";
|