@tocca-systems/twp-cli 0.62.0 → 0.64.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.
Files changed (79) hide show
  1. package/CHANGELOG.public.md +8 -0
  2. package/README.md +33 -0
  3. package/dist/{agent-TLKSUAYA.js → agent-UAOZYMQM.js} +1 -1
  4. package/dist/{agent-loop-SWXPY3OD.js → agent-loop-GPPUR2WD.js} +1 -1
  5. package/dist/{ai-dispatch-EEX3FOFD.js → ai-dispatch-FZDFJ4TN.js} +4 -4
  6. package/dist/{analysis-XO3WRAJR.js → analysis-RKWGO7UY.js} +1 -1
  7. package/dist/{announcement-LNG32J6X.js → announcement-ASKS53LL.js} +1 -1
  8. package/dist/{api-command-G2TNSWKE.js → api-command-N2OJNJBC.js} +3 -3
  9. package/dist/{app-AOB26ORS.js → app-QA2HKG6E.js} +3 -3
  10. package/dist/{attendance-correct-3C2BHJQG.js → attendance-correct-KBNPGFGR.js} +1 -1
  11. package/dist/{attendance-lists-VMOIE3XO.js → attendance-lists-C7TO3GQ2.js} +1 -1
  12. package/dist/{backlog-D5LZIEN4.js → backlog-AWOTTGPB.js} +1 -1
  13. package/dist/{budget-RENLLCYQ.js → budget-Z6ILL7AU.js} +1 -1
  14. package/dist/{chunk-3YG7EN3Y.js → chunk-234WHKGS.js} +2 -2
  15. package/dist/{chunk-EWRZ4GSN.js → chunk-4CR64SNH.js} +2 -2
  16. package/dist/{chunk-QZBE4KC2.js → chunk-4P7EYEL5.js} +2 -2
  17. package/dist/{chunk-EO3M43TN.js → chunk-5LPELULJ.js} +1 -1
  18. package/dist/{chunk-SLD6FCXA.js → chunk-6PQO3AYP.js} +1 -1
  19. package/dist/{chunk-HEQCEFAW.js → chunk-FDRXS6ZU.js} +1 -1
  20. package/dist/{chunk-T4YEQWJO.js → chunk-FITASHOM.js} +2 -2
  21. package/dist/{chunk-MYWDL3WX.js → chunk-ITRTFBV3.js} +70 -66
  22. package/dist/{chunk-WBSAJ3P2.js → chunk-JYCJ4N6T.js} +1 -1
  23. package/dist/{chunk-T5CRU4DB.js → chunk-LAAKI3GS.js} +1 -1
  24. package/dist/{chunk-4PROMNXI.js → chunk-NQWTPHUO.js} +1 -1
  25. package/dist/chunk-PIB6MGG5.js +15 -0
  26. package/dist/chunk-QHX5YFMM.js +23 -0
  27. package/dist/{chunk-LMYOCAEY.js → chunk-RROCQRRY.js} +1 -1
  28. package/dist/{chunk-52V2AZ7D.js → chunk-RWR7OHVP.js} +1 -1
  29. package/dist/chunk-RZ2NZE4U.js +36 -0
  30. package/dist/chunk-THOBFX2S.js +10 -0
  31. package/dist/{chunk-BZJJAJGN.js → chunk-UIHNYBME.js} +1 -1
  32. package/dist/{chunk-CSXCHRYE.js → chunk-VV4GTQ2L.js} +1 -1
  33. package/dist/{chunk-7LFYDASU.js → chunk-XPPT3MUY.js} +2 -2
  34. package/dist/{chunk-E3KMIBSP.js → chunk-YKI7NYBD.js} +1 -1
  35. package/dist/cli.js +23 -8
  36. package/dist/{commands-RCCF5ZRU.js → commands-HK7DUMUJ.js} +18 -14
  37. package/dist/{company-F3IGQMOJ.js → company-YPDJZ3SE.js} +2 -2
  38. package/dist/{completion-WKXK7VGT.js → completion-7RHQKR5U.js} +4 -4
  39. package/dist/{contract-OWR27GIO.js → contract-2Y5VN3TR.js} +2 -2
  40. package/dist/{department-3QDHMZ5P.js → department-K4EFC6NW.js} +1 -1
  41. package/dist/{deposit-IPYESXIQ.js → deposit-NTLHIMJL.js} +1 -1
  42. package/dist/{estimate-4P67OZWB.js → estimate-C5LUNIWR.js} +3 -3
  43. package/dist/{evaluation-ZA23GR7P.js → evaluation-ZWUHSENB.js} +1 -1
  44. package/dist/{expense-GEOAM7B3.js → expense-BXJ7QYMP.js} +1 -1
  45. package/dist/{inquiry-3SCMJOEM.js → inquiry-KHPPTYN6.js} +1 -1
  46. package/dist/{invoice-ONTG53HY.js → invoice-VV2NT4A3.js} +2 -2
  47. package/dist/{job-title-OQQH5W6C.js → job-title-RCSL5Y2Z.js} +1 -1
  48. package/dist/{knowledge-IX7AZIBJ.js → knowledge-BLU6RHS5.js} +1 -1
  49. package/dist/{leave-7HMMZPCR.js → leave-RJBCHZCQ.js} +1 -1
  50. package/dist/{media-GAL5WENN.js → media-OIAOW546.js} +3 -3
  51. package/dist/{notification-ZT23M4R6.js → notification-KPMGELOR.js} +1 -1
  52. package/dist/{oneshot-4NIS4J4S.js → oneshot-OWEBFX5O.js} +1 -1
  53. package/dist/plan-submit-AWMD7XOY.js +3 -0
  54. package/dist/{position-HWBHYAD2.js → position-NY5LRELH.js} +1 -1
  55. package/dist/{project-3ROID2HA.js → project-4MEGZ326.js} +1 -1
  56. package/dist/{prospect-7B5UWFLH.js → prospect-7D2WK56K.js} +2 -2
  57. package/dist/{purchase-QVINV4TM.js → purchase-S7W67LJP.js} +3 -3
  58. package/dist/{receivable-66MYAIVR.js → receivable-GFJTEELC.js} +1 -1
  59. package/dist/redmine-P3EMFFHY.js +35 -0
  60. package/dist/{registry-JABWR2GZ.js → registry-GRRRT3I6.js} +1 -1
  61. package/dist/{report-XFTM4GCX.js → report-FUIVLC7B.js} +1 -1
  62. package/dist/{run-5COXNYKX.js → run-LSWFO4IY.js} +2 -2
  63. package/dist/{sales-ai-review-IVRISSWX.js → sales-ai-review-P36TTQRO.js} +1 -1
  64. package/dist/{sales-master-BGVF2AZL.js → sales-master-3CGHEFKF.js} +2 -2
  65. package/dist/{sales-numbering-4423JWN6.js → sales-numbering-3M2C2MAI.js} +1 -1
  66. package/dist/{search-TMROBRYD.js → search-U3QNPR4D.js} +1 -1
  67. package/dist/{server-skills-5CKBIIQ4.js → server-skills-IFTDV3IQ.js} +1 -1
  68. package/dist/{setup-U22KITRG.js → setup-MUPUY2AX.js} +1 -1
  69. package/dist/{skill-S7EPMW5Z.js → skill-C4TGG7SH.js} +1 -1
  70. package/dist/{supplier-payment-O7GZSKGD.js → supplier-payment-KG57PNWJ.js} +2 -2
  71. package/dist/{support-U3VY5JI5.js → support-BRVAJ7IH.js} +1 -1
  72. package/dist/{task-EQBPQ7H4.js → task-RYBYPM4N.js} +2 -2
  73. package/dist/{user-XYUB54QT.js → user-3DE46776.js} +2 -2
  74. package/dist/{worker-agent-VPRWBAWG.js → worker-agent-XCJGZHMT.js} +1 -1
  75. package/dist/{workflow-GMP6W5EF.js → workflow-MMEOWZJC.js} +1 -1
  76. package/package.json +1 -1
  77. package/dist/chunk-5BDE3A3N.js +0 -34
  78. package/dist/chunk-MPEHKAAL.js +0 -15
  79. package/dist/chunk-YNRONUTZ.js +0 -10
@@ -1,15 +0,0 @@
1
- import { createRequire as __twpCreateRequire } from 'node:module';
2
- const require = __twpCreateRequire(import.meta.url);
3
- import{isValidSkillName,skillDigest}from"./chunk-YJZT3UD3.js";import{describeError}from"./chunk-AT432SCP.js";import{isPrivateProjectId}from"./chunk-GY7KI5E5.js";import{stripTerminalControls}from"./chunk-NHYMHCAT.js";import fs from"fs";import path from"path";var SKILL_REF=/^([ \t]*)\/([a-z][a-z0-9-]*)(?=[ \t\n]|$)([ \t]+[^\n]*)?/gm;function stripFrontmatter(content){if(!content.startsWith("---"))return content;const m=/^---[ \t]*\r?\n[\s\S]*?\r?\n---[ \t]*(?:\r?\n)?/.exec(content);return m===null?content:content.slice(m[0].length)}function referencedSkills(prompt){const out=[];for(const m of prompt.matchAll(SKILL_REF)){const name=m[2]??"";if(!out.includes(name))out.push(name)}return out}function expandServerSkills(prompt,bodies){if(bodies.size===0)return prompt;
4
- return prompt.replace(SKILL_REF,(whole,_indent,name,args)=>{const body=bodies.get(name);if(body===void 0)return whole;return stripFrontmatter(body).replaceAll("$ARGUMENTS",()=>(args??"").trim())})}function prepareSkillOverlay(root,workspace,bodies,provider){const commands=path.join(root,".claude","commands");fs.rmSync(root,{recursive:true,force:true});fs.mkdirSync(commands,{recursive:true});const src=path.join(workspace,".claude","commands");let names=[];try{names=fs.readdirSync(src).filter(f=>f.
5
- endsWith(".md"))}catch{}for(const f of names){const from=path.join(src,f);try{if(fs.statSync(from).isFile())fs.copyFileSync(from,path.join(commands,f))}catch{}}for(const[name,body]of bodies){if(!isValidSkillName(name))continue;fs.writeFileSync(path.join(commands,`${name}.md`),body,"utf8")}if(/^[a-z0-9-]+$/.test(provider)){const rel=path.join("scripts","agent-adapters","providers",`${provider}.md`);const from=path.join(workspace,rel);if(fs.existsSync(from)){fs.mkdirSync(path.dirname(path.join(root,
6
- rel)),{recursive:true});fs.copyFileSync(from,path.join(root,rel))}}}function unwrap(json,key){if(json===null||typeof json!=="object"||Array.isArray(json))return null;const top=json;const data=top["data"];if(data!==null&&typeof data==="object"&&!Array.isArray(data)&&key in data){return data}return top}function isRevision(v){return typeof v==="number"&&Number.isInteger(v)&&v>=0}function parseSkillList(res){const b=unwrap(res.json,"skills");const raw=b?.["skills"];if(!Array.isArray(raw))return null;
7
- const out=new Map;for(const s of raw){if(s===null||typeof s!=="object")continue;const{name,revision,digest}=s;if(typeof name!=="string"||!isValidSkillName(name)||!isRevision(revision)||typeof digest!=="string"){continue}out.set(name,{name,revision,digest})}return out}function parseSkillBody(res){const b=unwrap(res.json,"body");if(b===null)return null;const{name,revision,body}=b;if(typeof name!=="string"||!isRevision(revision)||typeof body!=="string")return null;const digest=skillDigest(body);if(b["\
8
- digest"]!==digest)return null;return{name,revision,digest,body}}var ServerSkillCatalog=class{constructor(deps){this.deps=deps}deps;list=new Map;source="none";bodies=new Map;lastWarning="";hashPart(){return this.source==="none"||this.list.size===0?"skills=file":`skills=${this.source}:${this.list.size}`}async refresh(){const{config,log}=this.deps;const warning=await this.fetchList();if(warning!==""&&warning!==this.lastWarning)log(` \u26A0\uFE0F ${warning}`);else if(warning===""&&this.lastWarning!==
9
- "")log("\u30B9\u30AD\u30EB\u5B9A\u7FA9\u306E\u4E00\u89A7\u3092\u30B5\u30FC\u30D0\u304B\u3089\u518D\u3073\u53D6\u5F97\u3067\u304D\u308B\u3088\u3046\u306B\u306A\u308A\u307E\u3057\u305F");this.lastWarning=warning;for(const name of[...this.bodies.keys()])if(!this.list.has(name))this.bodies.delete(name);config.configHash=`${config.configHash};${this.hashPart()}`}async fetchList(){if(isPrivateProjectId(this.deps.config.projectId??"")){this.list=new Map;this.source="none";return""}const res=await this.
10
- deps.api.request("GET","/settings/skills");const parsed=res.ok?parseSkillList(res):null;if(parsed!==null){this.list=parsed;this.source="server";return""}const reason=stripTerminalControls(res.ok?`\u5FDC\u7B54\u3092\u89E3\u91C8\u3067\u304D\u307E\u305B\u3093\uFF08\u5148\u982D: ${res.raw.slice(0,120)}\uFF09`:describeError(res));if(res.status===404){this.list=new Map;this.source="none";return""}const transient=res.status===null||res.status>=500||res.ok;if(transient&&this.source!=="none"){this.source=
11
- "cached";return`\u30B9\u30AD\u30EB\u5B9A\u7FA9\u306E\u4E00\u89A7\u3092\u30B5\u30FC\u30D0\u304B\u3089\u53D6\u5F97\u3067\u304D\u307E\u305B\u3093\uFF08${reason}\uFF09\u3002\u76F4\u524D\u306B\u53D6\u5F97\u3057\u305F\u4E00\u89A7\uFF08${this.list.size}\u4EF6\uFF09\u3067\u8D70\u308A\u307E\u3059`}this.list=new Map;this.source="none";return`\u30B9\u30AD\u30EB\u5B9A\u7FA9\u306E\u4E00\u89A7\u3092\u30B5\u30FC\u30D0\u304B\u3089\u53D6\u5F97\u3067\u304D\u307E\u305B\u3093\uFF08${reason}\uFF09\u3002\u4F5C\u696D\u30C4\u30EA\u30FC\u306E\u30B9\u30AD\u30EB\u30D5\u30A1\u30A4\u30EB\u3067\u8D70\u308A\u307E\u3059`}async resolve(prompt){
12
- const bodies=new Map;const origins=[];for(const name of referencedSkills(prompt)){const entry=this.list.get(name);if(entry===void 0){if(fs.existsSync(path.join(this.deps.config.workspace,".claude","commands",`${name}.md`))){origins.push({name,origin:"skill=file"})}continue}const cached=this.bodies.get(name);let detail=cached!==void 0&&cached.digest===entry.digest?cached:null;if(detail===null){const res=await this.deps.api.request("GET",`/settings/skills/${encodeURIComponent(name)}`);detail=res.ok?
13
- parseSkillBody(res):null;if(detail===null||detail.name!==name){const why=stripTerminalControls(res.ok?"\u5FDC\u7B54\u3092\u89E3\u91C8\u3067\u304D\u307E\u305B\u3093":describeError(res));if(cached!==void 0&&(res.status===null||res.status>=500)){this.deps.log(` \u26A0\uFE0F \u30B9\u30AD\u30EB ${name} \u306E\u672C\u6587\u3092\u53D6\u5F97\u3067\u304D\u307E\u305B\u3093\uFF08${why}\uFF09\u3002\u76F4\u524D\u306E revision ${cached.revision} \u3067\u8D70\u308A\u307E\u3059`);detail=cached}else{this.deps.
14
- log(` \u26A0\uFE0F \u30B9\u30AD\u30EB ${name} \u306E\u672C\u6587\u3092\u53D6\u5F97\u3067\u304D\u307E\u305B\u3093\uFF08${why}\uFF09\u3002\u4F5C\u696D\u30C4\u30EA\u30FC\u306E\u30D5\u30A1\u30A4\u30EB\u7248\u3067\u8D70\u308A\u307E\u3059`);origins.push({name,origin:"skill=file"});continue}}else{this.bodies.set(name,detail)}}bodies.set(name,detail.body);origins.push({name,origin:`skill=server@rev${detail.revision}`})}return{bodies,origins}}};function formatSkillOrigins(origins){return origins.map(o=>`${o.
15
- origin} name=${o.name}`).join(" \uFF0F ")}export{stripFrontmatter,referencedSkills,expandServerSkills,prepareSkillOverlay,parseSkillList,parseSkillBody,ServerSkillCatalog,formatSkillOrigins};
@@ -1,10 +0,0 @@
1
- import { createRequire as __twpCreateRequire } from 'node:module';
2
- const require = __twpCreateRequire(import.meta.url);
3
- var LOADERS={agent:async()=>(await import("./agent-TLKSUAYA.js")).agentDomain,"agent-loop":async()=>(await import("./agent-loop-SWXPY3OD.js")).agentLoopDomain,"ai-review-reason":async()=>(await import("./sales-ai-review-IVRISSWX.js")).aiReviewReasonDomain,analysis:async()=>(await import("./analysis-XO3WRAJR.js")).analysisDomain,announcement:async()=>(await import("./announcement-LNG32J6X.js")).announcementDomain,attendance:async()=>(await import("./attendance-correct-3C2BHJQG.js")).attendanceDomainWithRecords,
4
- backlog:async()=>(await import("./backlog-D5LZIEN4.js")).backlogDomain,budget:async()=>(await import("./budget-RENLLCYQ.js")).budgetDomain,"business-place":async()=>(await import("./sales-master-BGVF2AZL.js")).businessPlaceDomain,company:async()=>(await import("./company-F3IGQMOJ.js")).companyDomain,contract:async()=>(await import("./contract-OWR27GIO.js")).contractDomain,customer:async()=>(await import("./company-F3IGQMOJ.js")).customerDomain,department:async()=>(await import("./department-3QDHMZ5P.js")).
5
- departmentDomain,deposit:async()=>(await import("./deposit-IPYESXIQ.js")).depositDomain,estimate:async()=>(await import("./estimate-4P67OZWB.js")).estimateDomain,evaluation:async()=>(await import("./evaluation-ZA23GR7P.js")).evaluationDomain,expense:async()=>(await import("./expense-GEOAM7B3.js")).expenseDomain,"goal-sheet":async()=>(await import("./evaluation-ZA23GR7P.js")).goalSheetDomain,inquiry:async()=>(await import("./inquiry-3SCMJOEM.js")).inquiryDomain,invoice:async()=>(await import("./invoice-ONTG53HY.js")).
6
- invoiceDomain,"job-title":async()=>(await import("./job-title-OQQH5W6C.js")).jobTitleDomain,leave:async()=>(await import("./leave-7HMMZPCR.js")).leaveDomain,media:async()=>(await import("./media-GAL5WENN.js")).mediaDomain,meeting:async()=>(await import("./knowledge-IX7AZIBJ.js")).meetingDomain,note:async()=>(await import("./knowledge-IX7AZIBJ.js")).noteDomain,notification:async()=>(await import("./notification-ZT23M4R6.js")).notificationDomain,onedrive:async()=>(await import("./onedrive-ZY3GTU26.js")).
7
- onedriveDomain,outlook:async()=>(await import("./outlook-AAS5DXYQ.js")).outlookDomain,payee:async()=>(await import("./sales-master-BGVF2AZL.js")).payeeDomain,position:async()=>(await import("./position-HWBHYAD2.js")).positionDomain,project:async()=>(await import("./project-3ROID2HA.js")).projectDomain,prospect:async()=>(await import("./prospect-7B5UWFLH.js")).prospectDomain,purchase:async()=>(await import("./purchase-QVINV4TM.js")).purchaseDomain,qualification:async()=>(await import("./skill-S7EPMW5Z.js")).
8
- qualificationDomain,receivable:async()=>(await import("./receivable-66MYAIVR.js")).receivableDomain,report:async()=>(await import("./report-XFTM4GCX.js")).reportDomain,"rounding-setting":async()=>(await import("./sales-numbering-4423JWN6.js")).roundingSettingDomain,"seal-impression":async()=>(await import("./sales-master-BGVF2AZL.js")).sealImpressionDomain,search:async()=>(await import("./search-TMROBRYD.js")).searchDomain,shift:async()=>(await import("./attendance-lists-VMOIE3XO.js")).shiftDomain,
9
- skill:async()=>(await import("./skill-S7EPMW5Z.js")).skillDomain,storage:async()=>(await import("./storage-AQDCEBDJ.js")).storageDomain,"supplier-payment":async()=>(await import("./supplier-payment-O7GZSKGD.js")).supplierPaymentDomain,support:async()=>(await import("./support-U3VY5JI5.js")).supportDomain,task:async()=>(await import("./task-EQBPQ7H4.js")).taskDomain,teams:async()=>(await import("./teams-GPJ6HMIX.js")).teamsDomain,user:async()=>(await import("./user-XYUB54QT.js")).
10
- userDomain,wiki:async()=>(await import("./knowledge-IX7AZIBJ.js")).wikiDomain,workchange:async()=>(await import("./attendance-lists-VMOIE3XO.js")).workchangeDomain,"worker-agent":async()=>(await import("./worker-agent-VPRWBAWG.js")).workerAgentDomain,workflow:async()=>(await import("./workflow-GMP6W5EF.js")).workflowDomain};async function loadDomain(name){return LOADERS[name]()}export{loadDomain};