@tocca-systems/twp-cli 0.37.0 → 0.38.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 (48) hide show
  1. package/CHANGELOG.public.md +6 -0
  2. package/README.md +21 -1
  3. package/dist/{agent-loop-SP2UKXIG.js → agent-loop-4U5RLC4L.js} +1 -1
  4. package/dist/{ai-dispatch-LY6OVZC3.js → ai-dispatch-AHCYPQ5Y.js} +1 -1
  5. package/dist/{api-command-NLV55HVW.js → api-command-BZVUZIOB.js} +26 -10
  6. package/dist/{app-MED2NINK.js → app-SNRFIHTQ.js} +2 -2
  7. package/dist/attendance-5KE2JPK4.js +3 -0
  8. package/dist/{attendance-lists-F2KTIJZA.js → attendance-lists-MXQNWUIH.js} +1 -1
  9. package/dist/chunk-3RAGOW6X.js +5 -0
  10. package/dist/{chunk-4CVLBR42.js → chunk-57HDZYSN.js} +2 -2
  11. package/dist/{chunk-R53CMVWR.js → chunk-5R4SEO3I.js} +10 -10
  12. package/dist/{chunk-SN6YG4SF.js → chunk-ADQD5OPN.js} +1 -1
  13. package/dist/chunk-FEOST3GF.js +3 -0
  14. package/dist/chunk-GLBQAXWC.js +6 -0
  15. package/dist/{chunk-WYBJLRTG.js → chunk-GPIIXDEX.js} +2 -4
  16. package/dist/{chunk-KA3EE4TJ.js → chunk-IRT7VFG4.js} +1 -1
  17. package/dist/{chunk-KSWRKHKU.js → chunk-LS7P3IWP.js} +24 -22
  18. package/dist/chunk-O4NSYHR4.js +3 -0
  19. package/dist/{chunk-U6GEC6KI.js → chunk-OHIERIBW.js} +1 -1
  20. package/dist/{chunk-VQMR5UTD.js → chunk-QBA6THJ5.js} +1 -1
  21. package/dist/cli.js +15 -8
  22. package/dist/{commands-OABOHHNC.js → commands-7PGS2PTH.js} +1 -1
  23. package/dist/{commands-M4B3MDUA.js → commands-RCDYCU6L.js} +3 -3
  24. package/dist/{company-DH4H6HXD.js → company-GMCHRVHF.js} +2 -2
  25. package/dist/{completion-DGJH42YO.js → completion-3X7HPIPM.js} +1 -1
  26. package/dist/{department-NEDSHJJK.js → department-PVUB3ZPI.js} +1 -1
  27. package/dist/{job-title-USZK3QZS.js → job-title-CZRZFVUU.js} +1 -1
  28. package/dist/knowledge-XYLG42MB.js +112 -0
  29. package/dist/{leave-6UB43UT5.js → leave-DL3JPO5I.js} +2 -2
  30. package/dist/{media-3L4JSXC6.js → media-CMNIZUPY.js} +1 -1
  31. package/dist/{notification-MCABOEFM.js → notification-ULATH7AC.js} +1 -1
  32. package/dist/{position-D7BUAIH4.js → position-ICOGEMRG.js} +1 -1
  33. package/dist/{project-ROLQ535L.js → project-ZGOB5W25.js} +1 -1
  34. package/dist/{prospect-MOBECADA.js → prospect-MB2OP7L2.js} +2 -2
  35. package/dist/{registry-XXUXBYEE.js → registry-XBYUPKQQ.js} +1 -1
  36. package/dist/render-MTSSHDAZ.js +3 -0
  37. package/dist/{report-U2ZFPO33.js → report-JL7UJB4G.js} +1 -1
  38. package/dist/{run-65ZPZ5FD.js → run-6JRHCC67.js} +2 -2
  39. package/dist/{sales-2WX46SHN.js → sales-GJKW7VVG.js} +1 -1
  40. package/dist/{task-KPRX3OQX.js → task-CMCHUX2D.js} +2 -2
  41. package/dist/{user-VY35MTY3.js → user-5JXFO56G.js} +2 -2
  42. package/dist/{workflow-5DFICP3M.js → workflow-XBUMFS2G.js} +1 -1
  43. package/package.json +1 -1
  44. package/dist/attendance-ZWVZGVBE.js +0 -3
  45. package/dist/chunk-523KROGI.js +0 -3
  46. package/dist/chunk-6NEQ6PZZ.js +0 -3
  47. package/dist/chunk-R64SA5WZ.js +0 -6
  48. package/dist/render-W523YEYF.js +0 -3
@@ -1,6 +1,6 @@
1
1
  import { createRequire as __twpCreateRequire } from 'node:module';
2
2
  const require = __twpCreateRequire(import.meta.url);
3
- import{readBody}from"./chunk-HGTG5XQ7.js";import{WORKFLOWS_PATH}from"./chunk-ZST7XESB.js";import{UUID_RE,isSafePathSegment}from"./chunk-GMBJTG6A.js";import{LIST_FLAGS,LIST_PAGING_HELP,envelopePaging,nonEmpty,positiveInteger}from"./chunk-R53CMVWR.js";import{requireResolved,singleRef,withResolved}from"./chunk-ZN5EFDH7.js";import{acknowledgement,isRecord,pick}from"./chunk-ZWVYVS2A.js";import{ApiResponseError,UsageError}from"./chunk-7WSNIXTQ.js";var WORKFLOW_FLAG={name:"--workflow",summary:"\u7533\u8ACB\u66F8\uFF08\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\uFF09\u306E\u540D\u524D\u304B ID \u3067\u7D5E\u308A\u8FBC\u3080",takesValue:true,placeholder:"<\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC>"};var CATEGORIES={undefined:"\u6C4E\u7528",paid_holiday:"\u6709\u7D66\u4F11\u6687",substitute_holiday:"\u632F\u66FF\u4F11\u6687",comp_holiday:"\u4EE3\u4F11",absence:"\u6B20\u52E4",special_holiday:"\u7279\u5225\u4F11\u6687",other_leave:"\u305D\u306E\u4ED6\u4F11\u6687\u30FB\u6B20\u52E4",
3
+ import{readBody}from"./chunk-HGTG5XQ7.js";import{WORKFLOWS_PATH}from"./chunk-ZST7XESB.js";import{UUID_RE,isSafePathSegment}from"./chunk-GMBJTG6A.js";import{LIST_FLAGS,LIST_PAGING_HELP,envelopePaging,nonEmpty,positiveInteger}from"./chunk-5R4SEO3I.js";import{requireResolved,singleRef,withResolved}from"./chunk-ZN5EFDH7.js";import{acknowledgement,isRecord,pick}from"./chunk-ZWVYVS2A.js";import{ApiResponseError,UsageError}from"./chunk-7WSNIXTQ.js";var WORKFLOW_FLAG={name:"--workflow",summary:"\u7533\u8ACB\u66F8\uFF08\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\uFF09\u306E\u540D\u524D\u304B ID \u3067\u7D5E\u308A\u8FBC\u3080",takesValue:true,placeholder:"<\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC>"};var CATEGORIES={undefined:"\u6C4E\u7528",paid_holiday:"\u6709\u7D66\u4F11\u6687",substitute_holiday:"\u632F\u66FF\u4F11\u6687",comp_holiday:"\u4EE3\u4F11",absence:"\u6B20\u52E4",special_holiday:"\u7279\u5225\u4F11\u6687",other_leave:"\u305D\u306E\u4ED6\u4F11\u6687\u30FB\u6B20\u52E4",
4
4
  sales:"\u53D6\u5F15",commuting_expenses:"\u901A\u52E4\u4EA4\u901A\u8CBB",cms_publish:"\u30B3\u30F3\u30C6\u30F3\u30C4\u516C\u958B",equipment_lending:"\u5099\u54C1\u8CB8\u51FA",ai_tool_license:"AI\u30C4\u30FC\u30EB\u30E9\u30A4\u30BB\u30F3\u30B9",qualification_bonus:"\u5408\u683C\u304A\u795D\u3044\u91D1"};var CATEGORY_HELP=`\u30AB\u30C6\u30B4\u30EA: ${Object.entries(CATEGORIES).map(([key,label])=>`${key}\uFF08${label}\uFF09`).join(" / ")}`;var WORKFLOW_STATUSES=["active","inactive","draft"];var INSTANCE_STATUSES=[
5
5
  "new","in_progress","approved","rejected","canceled","sent_back"];var INSTANCE_STATUS_HELP="\u72B6\u614B: new\uFF08\u4E0B\u66F8\u304D\uFF09/ in_progress\uFF08\u627F\u8A8D\u5F85\u3061\uFF09/ approved\uFF08\u627F\u8A8D\u6E08\u307F\uFF09/ rejected\uFF08\u5374\u4E0B\uFF09/ canceled\uFF08\u53D6\u6D88\uFF09/ sent_back\uFF08\u5DEE\u3057\u623B\u3057\uFF09";var WORKFLOW_COLUMNS=["id","name","defined_category","status","is_hidden","valid_from","valid_to"];var WORKFLOW_ADMIN_COLUMNS=[...WORKFLOW_COLUMNS,"s\
6
6
  tep_count"];var WORKFLOW_GET_COLUMNS=["id","name","defined_category","status","is_hidden","valid_from","valid_to","description"];var INSTANCE_COLUMNS=["id","title","workflow_name","status","current_step_no","applicant_name","applied_at","completed_at"];var INSTANCE_GET_COLUMNS=["id","title","workflow_id","workflow_name","status","current_step_no","applicant_name","applied_at","completed_at","can_approve","is_editable","is_cancelable"];var PENDING_COLUMNS=["id","title","workflow_name","applicant_\
@@ -1,6 +1,6 @@
1
1
  import { createRequire as __twpCreateRequire } from 'node:module';
2
2
  const require = __twpCreateRequire(import.meta.url);
3
- import{isModeId,isPermissionModeId}from"./chunk-NAUH75MM.js";import{API_TOKEN,HELP_TOKEN,isDomainName}from"./chunk-523KROGI.js";import{splitFlagToken}from"./chunk-QQRJLH6B.js";var BUILTIN_COMMANDS=["login","logout","whoami","update","task-loop"];var TASK_LOOP_ACTIONS=["run","status","stop","schedule","setup","charter","skill"];var VALUE_FLAGS=new Set(["-p","--print","--profile","--tenant","--mode","--permission-mode","--model","--allowed-tools","--disallowed-tools","--project","--engine","--interval","--max-cycles","--ai","--workspace","--ai-config-file","--now","--counts","--gate","--file","--out","--revision","--dir","--output","--query"]);var BOOLEAN_FLAGS=new Set(
3
+ import{isModeId,isPermissionModeId}from"./chunk-NAUH75MM.js";import{API_TOKEN,HELP_TOKEN,isDomainName}from"./chunk-O4NSYHR4.js";import{splitFlagToken}from"./chunk-QQRJLH6B.js";var BUILTIN_COMMANDS=["login","logout","whoami","update","task-loop"];var TASK_LOOP_ACTIONS=["run","status","stop","schedule","setup","charter","skill"];var VALUE_FLAGS=new Set(["-p","--print","--profile","--tenant","--mode","--permission-mode","--model","--allowed-tools","--disallowed-tools","--project","--engine","--interval","--max-cycles","--ai","--workspace","--ai-config-file","--now","--counts","--gate","--file","--out","--revision","--dir","--output","--query"]);var BOOLEAN_FLAGS=new Set(
4
4
  ["-h","--help","-v","--version","--no-tui","--doctor","--password","--token","--no-browser","--safe","--daemon","--force-runner","--force","--drain","--yes","-y","--no-ai-config-file","--verbose","--all","--dry-run","--debug","--refresh"]);function dispatch(argv,limit=2){const tokens=[];const indexes=[];let truncated=false;for(let i=0;i<argv.length;i++){const arg=argv[i];if(arg===void 0)continue;if(arg.startsWith("-")&&arg!=="-"){const{name,value:inline}=splitFlagToken(arg);if(BOOLEAN_FLAGS.has(
5
5
  name)){if(inline!==void 0){truncated=true;break}continue}if(VALUE_FLAGS.has(name)){if(inline!==void 0)continue;const next=argv[i+1];if(next!==void 0&&(!next.startsWith("-")||next==="-"))i++;continue}truncated=true;break}if(arg===""||arg==="-")continue;if(tokens.length>=limit)break;tokens.push(arg);indexes.push(i)}return{tokens,indexes,truncated}}function isBuiltin(token){return token!==void 0&&BUILTIN_COMMANDS.includes(token)}function isTaskLoopAction(token){return token!==void 0&&TASK_LOOP_ACTIONS.
6
6
  includes(token)}function resolveRoute(result){const{tokens,indexes}=result;const[first,second]=tokens;const firstIndex=indexes[0];if(first===void 0||firstIndex===void 0)return{kind:"none",consumed:[]};const consumed=[firstIndex];const secondIndex=indexes[1];if(isBuiltin(first)){if(first==="task-loop"&&isTaskLoopAction(second)){if(secondIndex!==void 0)consumed.push(secondIndex);return{kind:"builtin",command:first,action:second,consumed}}return{kind:"builtin",command:first,...first==="task-loop"?{
package/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __twpCreateRequire } from 'node:module';
3
3
  const require = __twpCreateRequire(import.meta.url);
4
- import{GLOBAL_OPTIONS_HELP}from"./chunk-TAN5I2DP.js";import{parseArgv}from"./chunk-VQMR5UTD.js";import"./chunk-NAUH75MM.js";import"./chunk-523KROGI.js";import"./chunk-QQRJLH6B.js";import"./chunk-VSJBJXZO.js";var VERSION=true?"0.37.0":"0.0.0-dev";var HELP=`twp ${VERSION} \u2014 TWP CLI
4
+ import{GLOBAL_OPTIONS_HELP}from"./chunk-TAN5I2DP.js";import{parseArgv}from"./chunk-QBA6THJ5.js";import"./chunk-NAUH75MM.js";import"./chunk-O4NSYHR4.js";import"./chunk-QQRJLH6B.js";import"./chunk-VSJBJXZO.js";var VERSION=true?"0.38.0":"0.0.0-dev";var HELP=`twp ${VERSION} \u2014 TWP CLI
5
5
 
6
6
  \u4F7F\u3044\u65B9:
7
7
  twp \u5BFE\u8A71 TUI \u3092\u8D77\u52D5
@@ -288,6 +288,13 @@ import{GLOBAL_OPTIONS_HELP}from"./chunk-TAN5I2DP.js";import{parseArgv}from"./chu
288
288
  twp report submit <\u30EC\u30DD\u30FC\u30C8ID>
289
289
  \u30EC\u30DD\u30FC\u30C8\u3092\u63D0\u51FA\u3059\u308B\uFF08\u5FC5\u9808\u9805\u76EE\u304C\u7A7A\u306A\u3089\u9001\u3089\u306A\u3044\uFF09
290
290
  twp report format list \u4F7F\u3048\u308B\u30EC\u30DD\u30FC\u30C8\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u3092\u4E00\u89A7\u3059\u308B
291
+ twp wiki list \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E wiki \u30DA\u30FC\u30B8\u3092\u4E00\u89A7\u3059\u308B\uFF08--parent \u3067\u89AA\u30DA\u30FC\u30B8\u76F4\u4E0B\uFF09
292
+ twp wiki get <\u30DA\u30FC\u30B8ID> wiki \u30DA\u30FC\u30B81\u4EF6\u306E\u8A73\u7D30\u3092\u8868\u793A\u3059\u308B\uFF08--output text \u3067\u672C\u6587\u3092\u8AAD\u3080\uFF09
293
+ twp note list \u30C6\u30CA\u30F3\u30C8\u306E\u30CE\u30FC\u30C8\u3092\u4E00\u89A7\u3059\u308B\uFF08--mine \u3067\u81EA\u5206\u306E\u3082\u306E\uFF09
294
+ twp note get <\u30CE\u30FC\u30C8ID> \u30CE\u30FC\u30C81\u4EF6\u306E\u8A73\u7D30\u3092\u8868\u793A\u3059\u308B\uFF08--output text \u3067\u672C\u6587\u3092\u8AAD\u3080\uFF09
295
+ twp meeting list \u8B70\u4E8B\u9332\u3092\u4E00\u89A7\u3059\u308B\uFF08--from/--to \u3067\u958B\u50AC\u65E5\u306E\u671F\u9593\uFF09
296
+ twp meeting get <\u8B70\u4E8B\u9332ID>
297
+ \u8B70\u4E8B\u93321\u4EF6\u306E\u8A73\u7D30\u3092\u8868\u793A\u3059\u308B\uFF08--output text \u3067\u672C\u6587\u3092\u8AAD\u3080\uFF09
291
298
  twp estimate list \u898B\u7A4D\u3092\u4E00\u89A7\u3059\u308B\uFF08--status\u30FB--customer\u30FB--assignee\u30FB--from/--to\uFF09
292
299
  twp estimate get <\u898B\u7A4DID>
293
300
  \u898B\u7A4D1\u4EF6\u306E\u8A73\u7D30\u3092\u8868\u793A\u3059\u308B
@@ -430,15 +437,15 @@ TUI \u5185:
430
437
  TWP API \u3092\u547C\u3079\u307E\u3059\u3002TWP API \u306E\u30C4\u30FC\u30EB\u306F\u65E2\u5B9A\u3067\u78BA\u8A8D\u304C\u51FA\u307E\u3059\uFF08-p \u3067\u306F\u62D2\u5426\u3002--allowed-tools \u3067\u540D\u524D\u3092\u8A31\u53EF\uFF09\u3002
431
438
  \u4F1A\u8A71\u30FB\u30ED\u30FC\u30AB\u30EB\u30C4\u30FC\u30EB\uFF08\u30D5\u30A1\u30A4\u30EB\u30FB\u30B3\u30DE\u30F3\u30C9\u30FBgit\uFF09\u306F\u30C6\u30CA\u30F3\u30C8\u306E\u30AF\u30EC\u30B8\u30C3\u30C8\u3067\u5B9F\u969B\u306B\u52D5\u304D\u307E\u3059\u3002
432
439
  `;function ignoreEpipe(stream){stream.on("error",err=>{if(err.code==="EPIPE")process.exit(0);throw err})}async function main(){const nodeMajor=Number(process.versions.node.split(".")[0]);if(nodeMajor<22){process.stderr.write(`twp-cli \u306B\u306F Node.js 22 \u4EE5\u4E0A\u304C\u5FC5\u8981\u3067\u3059\uFF08\u73FE\u5728: ${process.versions.node}\uFF09
433
- `);process.exit(1)}ignoreEpipe(process.stdout);ignoreEpipe(process.stderr);if(process.env["TWP_AUTO_UPDATE_WORKER"]==="1"){const{runAutoUpdateWorker}=await import("./auto-update-worker-Y44TD6FD.js");await runAutoUpdateWorker().catch(()=>void 0);return}const[first,...rest]=process.argv.slice(2);if(first==="__complete"||first==="completion"){const completion=await import("./completion-DGJH42YO.js");if(first==="completion"){process.exitCode=completion.runCompletion(rest,process.stdout,process.stderr);return}
434
- const[{loadDomain},{loadUserConfig}]=await Promise.all([import("./registry-XXUXBYEE.js"),import("./config-3CNEQ7KN.js")]);process.exitCode=await completion.runComplete(rest,process.stdout,{loadDomain,profileNames:()=>Object.keys(loadUserConfig().profiles??{})});return}if(first==="configure"){const autoUpdate2=await import("./auto-update-JNSBIQM6.js");autoUpdate2.registerRunning();autoUpdate2.onStartup(VERSION);const{runConfigure}=await import("./configure-PIOFJFL5.js");process.exitCode=
440
+ `);process.exit(1)}ignoreEpipe(process.stdout);ignoreEpipe(process.stderr);if(process.env["TWP_AUTO_UPDATE_WORKER"]==="1"){const{runAutoUpdateWorker}=await import("./auto-update-worker-Y44TD6FD.js");await runAutoUpdateWorker().catch(()=>void 0);return}const[first,...rest]=process.argv.slice(2);if(first==="__complete"||first==="completion"){const completion=await import("./completion-3X7HPIPM.js");if(first==="completion"){process.exitCode=completion.runCompletion(rest,process.stdout,process.stderr);return}
441
+ const[{loadDomain},{loadUserConfig}]=await Promise.all([import("./registry-XBYUPKQQ.js"),import("./config-3CNEQ7KN.js")]);process.exitCode=await completion.runComplete(rest,process.stdout,{loadDomain,profileNames:()=>Object.keys(loadUserConfig().profiles??{})});return}if(first==="configure"){const autoUpdate2=await import("./auto-update-JNSBIQM6.js");autoUpdate2.registerRunning();autoUpdate2.onStartup(VERSION);const{runConfigure}=await import("./configure-PIOFJFL5.js");process.exitCode=
435
442
  await runConfigure(rest);return}const args=parseArgv(process.argv.slice(2));if(args.command==="version"){process.stdout.write(`${VERSION}
436
443
  `);return}if(args.command==="help"){process.stdout.write(HELP);return}if(args.unknown.length>0){process.stderr.write(`\u4E0D\u660E\u306A\u5F15\u6570: ${args.unknown.join(" ")}
437
444
 
438
- ${HELP}`);process.exitCode=2;return}const autoUpdate=await import("./auto-update-JNSBIQM6.js");autoUpdate.registerRunning();if(args.command==="task-loop"){process.env[autoUpdate.DISABLE_ENV]="1"}else if(args.command!=="update"){autoUpdate.onStartup(VERSION)}if(args.command==="domain"&&args.domain!==void 0){const{runDomain}=await import("./run-65ZPZ5FD.js");process.exitCode=await runDomain({domain:args.domain,...args.operation!==void 0?{operation:args.operation}:{},argv:args.domainArgv,help:args.
439
- domainHelp,globals:{...args.profile!==void 0?{profile:args.profile}:{},...args.output!==void 0?{output:args.output}:{},...args.query!==void 0?{query:args.query}:{},dryRun:args.dryRun,debug:args.debug,yes:args.yes,refresh:args.refresh},version:VERSION});return}if(args.command==="api"){const{runApiCommand}=await import("./api-command-NLV55HVW.js");process.exitCode=await runApiCommand({argv:args.domainArgv,help:args.domainHelp,globals:{...args.profile!==void 0?{profile:args.profile}:{},...args.output!==
440
- void 0?{output:args.output}:{},...args.query!==void 0?{query:args.query}:{},dryRun:args.dryRun,debug:args.debug,yes:args.yes},version:VERSION});return}if(args.command==="update"){const{runUpdate}=await import("./update-MAQJ6VWV.js");process.exitCode=await runUpdate({...args.profile!==void 0?{profile:args.profile}:{},version:VERSION});return}if(args.command==="login"||args.command==="logout"||args.command==="whoami"){const{runLogin,runLogout,runWhoami}=await import("./commands-OABOHHNC.js");
441
- const options={profile:args.profile,method:args.loginMethod,tenant:args.tenant,noBrowser:args.loginNoBrowser,cliVersion:VERSION,force:args.logoutForce,...args.output!==void 0?{output:args.output}:{},...args.query!==void 0?{query:args.query}:{}};const runner=args.command==="login"?runLogin:args.command==="logout"?runLogout:runWhoami;process.exitCode=await runner(options);return}if(args.command==="task-loop"){const{runTaskLoop}=await import("./commands-M4B3MDUA.js");process.exitCode=await runTaskLoop(
445
+ ${HELP}`);process.exitCode=2;return}const autoUpdate=await import("./auto-update-JNSBIQM6.js");autoUpdate.registerRunning();if(args.command==="task-loop"){process.env[autoUpdate.DISABLE_ENV]="1"}else if(args.command!=="update"){autoUpdate.onStartup(VERSION)}if(args.command==="domain"&&args.domain!==void 0){const{runDomain}=await import("./run-6JRHCC67.js");process.exitCode=await runDomain({domain:args.domain,...args.operation!==void 0?{operation:args.operation}:{},argv:args.domainArgv,help:args.
446
+ domainHelp,globals:{...args.profile!==void 0?{profile:args.profile}:{},...args.output!==void 0?{output:args.output}:{},...args.query!==void 0?{query:args.query}:{},dryRun:args.dryRun,debug:args.debug,yes:args.yes,refresh:args.refresh},version:VERSION});return}if(args.command==="api"){const{runApiCommand}=await import("./api-command-BZVUZIOB.js");process.exitCode=await runApiCommand({argv:args.domainArgv,help:args.domainHelp,globals:{...args.profile!==void 0?{profile:args.profile}:{},...args.output!==
447
+ void 0?{output:args.output}:{},...args.query!==void 0?{query:args.query}:{},dryRun:args.dryRun,debug:args.debug,yes:args.yes},version:VERSION});return}if(args.command==="update"){const{runUpdate}=await import("./update-MAQJ6VWV.js");process.exitCode=await runUpdate({...args.profile!==void 0?{profile:args.profile}:{},version:VERSION});return}if(args.command==="login"||args.command==="logout"||args.command==="whoami"){const{runLogin,runLogout,runWhoami}=await import("./commands-7PGS2PTH.js");
448
+ const options={profile:args.profile,method:args.loginMethod,tenant:args.tenant,noBrowser:args.loginNoBrowser,cliVersion:VERSION,force:args.logoutForce,...args.output!==void 0?{output:args.output}:{},...args.query!==void 0?{query:args.query}:{}};const runner=args.command==="login"?runLogin:args.command==="logout"?runLogout:runWhoami;process.exitCode=await runner(options);return}if(args.command==="task-loop"){const{runTaskLoop}=await import("./commands-RCDYCU6L.js");process.exitCode=await runTaskLoop(
442
449
  {action:args.taskLoopAction??"run",project:args.project,profile:args.profile,safe:args.safe,daemon:args.daemon,interval:args.interval,maxCycles:args.maxCycles,forceRunner:args.forceRunner,force:args.stopForce,drain:args.stopDrain,engine:args.engine,version:VERSION,verbose:args.verbose,scheduleNow:args.scheduleNow,scheduleCounts:args.scheduleCounts,scheduleGate:args.scheduleGate,charterOp:args.charterOp,charterInput:args.charterFile,charterOutput:args.charterOut,charterRevision:args.charterRevision,
443
450
  skillOp:args.skillOp,skillName:args.skillName,skillAll:args.skillAll,skillDir:args.skillDir,yes:args.yes,ais:args.ais,workspace:args.workspace,aiConfigFile:args.aiConfigFile,noAiConfigFile:args.noAiConfigFile});return}if(args.command==="print"){const{runOneShot}=await import("./oneshot-RYWJ6ECA.js");process.exitCode=await runOneShot({prompt:args.prompt??"",fromStdin:args.promptFromStdin,mode:args.mode??"dev",...args.permissionMode!==void 0?{permissionMode:args.permissionMode}:{},allowedTools:args.
444
- allowedTools,disallowedTools:args.disallowedTools,...args.model!==void 0?{model:args.model}:{},...args.profile!==void 0?{profile:args.profile}:{},version:VERSION});return}const{startTui}=await import("./app-MED2NINK.js");await startTui({mode:args.mode,permissionMode:args.permissionMode,allowedTools:args.allowedTools,disallowedTools:args.disallowedTools,model:args.model,profile:args.profile,noTui:args.noTui||!process.stdout.isTTY,doctor:args.doctor,version:VERSION})}await main();
451
+ allowedTools,disallowedTools:args.disallowedTools,...args.model!==void 0?{model:args.model}:{},...args.profile!==void 0?{profile:args.profile}:{},version:VERSION});return}const{startTui}=await import("./app-SNRFIHTQ.js");await startTui({mode:args.mode,permissionMode:args.permissionMode,allowedTools:args.allowedTools,disallowedTools:args.disallowedTools,model:args.model,profile:args.profile,noTui:args.noTui||!process.stdout.isTTY,doctor:args.doctor,version:VERSION})}await main();
@@ -55,7 +55,7 @@ ation/json",Authorization:`Bearer ${creds.token}`}}).then(res=>res.ok,()=>false)
55
55
  `);if(!revoked){writeOut("\u26A0 \u30B5\u30FC\u30D0\u5074\u306E\u30C8\u30FC\u30AF\u30F3\u5931\u52B9\u306B\u5931\u6557\u3057\u307E\u3057\u305F\uFF08\u30AA\u30D5\u30E9\u30A4\u30F3\u7B49\uFF09\u3002TWP \u306E\u300C\u8A2D\u5B9A > CLI\u7AEF\u672B\u300D\u304B\u3089\u3082\u5931\u52B9\u3067\u304D\u307E\u3059\u3002\n")}})}async function runWhoami(options){return run(async()=>{const profile=resolveProfile(options.profile);const structured=options.output!==void 0||options.query!==void 0;let format=null;if(structured){
56
56
  const{resolveOutputFormat,OUTPUT_FORMATS}=await import("./format-NMW6Y2E5.js");format=resolveOutputFormat({...options.output!==void 0?{flag:options.output}:{},isTty:process.stdout.isTTY===true});if(format===null){throw new UsageError(`--output \u306B\u300C${options.output??""}\u300D\u306F\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093`,`\u6307\u5B9A\u3067\u304D\u308B\u306E\u306F ${OUTPUT_FORMATS.join(" / ")} \u3067\u3059`)}}const stored=loadCredentials(profile.name);const apiUrl=effectiveApiUrl(
57
57
  profile,stored?.api_url);const session=new AuthSession(profile.name,apiUrl);const client=new TwpApiClient(apiUrl,session,httpFetch,options.cliVersion);const me=await client.get("/api/v2/user");const user=me.user;const creds=loadCredentials(profile.name);if(format!==null){const value={id:user?.id??null,name:user?.name??null,email:user?.email??null,tenant_code:user?.tenant_code??null,role:user?.role??null,is_admin:user?.is_admin??null,profile:profile.name,api_url:apiUrl,expires_at:creds?.token_expires_at??
58
- null};const{evaluateQuery}=await import("./query-EEALMOSO.js");const{renderOutput}=await import("./render-W523YEYF.js");const selected=options.query===void 0?value:await evaluateQuery(options.query,value);const text=renderOutput(selected,format);process.stdout.write(text.endsWith("\n")?text:`${text}
58
+ null};const{evaluateQuery}=await import("./query-EEALMOSO.js");const{renderOutput}=await import("./render-MTSSHDAZ.js");const selected=options.query===void 0?value:await evaluateQuery(options.query,value);const text=renderOutput(selected,format);process.stdout.write(text.endsWith("\n")?text:`${text}
59
59
  `);return}writeOut(`\u30E6\u30FC\u30B6\u30FC: ${user?.name??"?"}\uFF08${user?.email??"?"}\uFF09
60
60
  `);writeOut(`ID: ${user?.id??"?"}
61
61
  `);writeOut(`\u30C6\u30CA\u30F3\u30C8: ${user?.tenant_code??"?"}
@@ -1,7 +1,7 @@
1
1
  import { createRequire as __twpCreateRequire } from 'node:module';
2
2
  const require = __twpCreateRequire(import.meta.url);
3
- import{EngineNotConfiguredError,NoopEngine,UnknownEngineError,aiUnavailableLabel,assertKnownEngine,failureHint,isAiUnavailable,needsHumanToRestoreAi}from"./chunk-ZOOEH7ZE.js";import{claudeConfigDir,resolveDetectDeps}from"./chunk-T4QZO6RQ.js";import{REQUIRE_ZERO_STATUS,ScheduleApi,collectDue,gateStatus,nowInZone,parseCounts,promptSection}from"./chunk-RFBFR567.js";import{InstanceLock,buildLockOwner,defaultIsLoopProcess,writeLockOwner}from"./chunk-3WHC4FSG.js";import{LoopSettingsApplier,
4
- renderStepBudget}from"./chunk-VBX44RKP.js";import{ServerSkillCatalog,formatSkillOrigins}from"./chunk-L52XJFJR.js";import{AgentLoopApi,describeError,filterByStatus,isPermanent,pick,pickString}from"./chunk-QWSXHHFT.js";import"./chunk-VK2Z4QGC.js";import"./chunk-P4AEFKLM.js";import"./chunk-VRBI2NPI.js";import{resolveProjectRef,uuidProjectIdPolicy}from"./chunk-GMBJTG6A.js";import{AuthSession}from"./chunk-XNLIEUAW.js";import{httpFetch}from"./chunk-J7QYPKVK.js";
3
+ import{EngineNotConfiguredError,NoopEngine,UnknownEngineError,aiUnavailableLabel,assertKnownEngine,failureHint,isAiUnavailable,needsHumanToRestoreAi}from"./chunk-ZOOEH7ZE.js";import{ServerSkillCatalog,formatSkillOrigins}from"./chunk-L52XJFJR.js";import{claudeConfigDir,resolveDetectDeps}from"./chunk-T4QZO6RQ.js";import{REQUIRE_ZERO_STATUS,ScheduleApi,collectDue,gateStatus,nowInZone,parseCounts,promptSection}from"./chunk-RFBFR567.js";import{InstanceLock,buildLockOwner,defaultIsLoopProcess,
4
+ writeLockOwner}from"./chunk-3WHC4FSG.js";import{LoopSettingsApplier,renderStepBudget}from"./chunk-VBX44RKP.js";import{AgentLoopApi,describeError,filterByStatus,isPermanent,pick,pickString}from"./chunk-QWSXHHFT.js";import"./chunk-VK2Z4QGC.js";import"./chunk-P4AEFKLM.js";import"./chunk-VRBI2NPI.js";import{resolveProjectRef,uuidProjectIdPolicy}from"./chunk-GMBJTG6A.js";import{AuthSession}from"./chunk-XNLIEUAW.js";import{httpFetch}from"./chunk-J7QYPKVK.js";
5
5
  import{compareVersionCores,parseVersionCore}from"./chunk-DXXFUNYN.js";import{effectiveApiUrl,resolveProfile}from"./chunk-4VZKNEVN.js";import{stripTerminalControls}from"./chunk-NHYMHCAT.js";import{duplicateTaskKeyDropReason,excludedKeyInArgs,extractPlanJson,parseOpsCount,parsePlanExcludeKeys,placeholderTaskKey,releaseDeployDropReason,stepToItem,zeroTargetDropReasons}from"./chunk-VCZVITWG.js";import{CapacityReporter,buildLoopConfig,describeOperations,evaluateOwnership,formatHookIds,
6
6
  formatHookWiring,localDate,loopStateDir,runHook,runPrefetch,runPreflight}from"./chunk-QVPU4HHG.js";import{killProcessTree}from"./chunk-N2UVRM3Z.js";import{exclusiveInflightEntries,formatExclusiveEntry,normalizeSkillName,skillOfItem,spawnSyncResolved}from"./chunk-AEJHDFXB.js";import{PRIVATE_PROJECT_REF,isPrivateProjectId,isPrivateProjectRef,privateProjectId,projectFileKey}from"./chunk-GY7KI5E5.js";import{isTaskKey}from"./chunk-II5RVJQN.js";import"./chunk-7WSNIXTQ.js";
7
7
  import{joinFor}from"./chunk-PMOUHEJQ.js";import"./chunk-5WGOHFAS.js";import{twpHomeDir}from"./chunk-RZVI6PMW.js";import"./chunk-VSJBJXZO.js";import fs10 from"fs";import path8 from"path";import fs from"fs";import path from"path";var LoopLogger=class{constructor(runnerId,logFile,out=process.stdout,now=()=>new Date){this.runnerId=runnerId;this.out=out;this.now=now;if(logFile){fs.mkdirSync(path.dirname(logFile),{recursive:true});this.stream=fs.createWriteStream(logFile,{flags:"a"})}}runnerId;out;now;stream=null;log(message){const d=this.now();const ts=`${d.getFullYear()}-${pad(d.getMonth()+1)}-${pad(d.getDate())} ${pad(d.getHours())}:${pad(d.getMinutes())}:${pad(d.getSeconds())}`;const line=`[${ts}] [${this.runnerId}] ${stripTerminalControls(
@@ -312,7 +312,7 @@ const startedAtMs=now();let warned="";let done=false;const check=()=>{if(done)re
312
312
  decision.key)return;warned=decision.key;handlers.onWarn(decision.reason);return}done=true;const recorded=writeRestartAttempt(opts.stateDir,opts.projectKey,{from:decision.from,to:decision.to,at:new Date(now()).toISOString()},opts.store);if(!recorded){handlers.onWarn(`\u518D\u8D77\u52D5\u8A18\u9332\u3092\u66F8\u3051\u307E\u305B\u3093\u3067\u3057\u305F\uFF08${restartAttemptPath(opts.stateDir,opts.projectKey)}\uFF09\u3002\u540C\u3058\u7248\u30C9\u30EA\u30D5\u30C8\u304C\u89E3\u6D88\u3057\u306A\u3044\u5834\u5408\u3001\u518D\u8D77\u52D5\u3092\u7E70\u308A\u8FD4\u3059\u9632\u6CE2\u5824\u304C\u52B9\u304D\u307E\u305B\u3093`)}
313
313
  handlers.onRestart({from:decision.from,to:decision.to})};const timer=setInterval(check,opts.intervalMs??DRIFT_POLL_MS);timer.unref?.();return{stop:()=>{done=true;clearInterval(timer)},check}}import fs9 from"fs";import path7 from"path";var POLL_MS=1e3;var MAX_STOP_BYTES=4096;var MAX_AT_LENGTH=64;function markerPath(lockDir2,kind){return path7.join(lockDir2,kind)}function requestMarker(lockDir2,kind,pid,deps={}){const target=markerPath(lockDir2,kind);const write=deps.writeFileSync??((p,d)=>fs9.writeFileSync(p,d,{flag:"wx",mode:384}));const now=deps.now??(()=>new Date);clearMarker(lockDir2,kind,deps);try{write(target,`${JSON.stringify({pid,at:now().toISOString()})}
314
314
  `);return{ok:true}}catch(err){const e=err;return{ok:false,reason:e.code??"UNKNOWN"}}}function readMarker(lockDir2,kind,deps={}){const target=markerPath(lockDir2,kind);const read=deps.readFileSync??(p=>fs9.readFileSync(p,"utf8"));const size=deps.statSize??(p=>fs9.statSync(p).size);let raw;try{if(size(target)>MAX_STOP_BYTES)return null;raw=read(target)}catch{return null}if(raw.length>MAX_STOP_BYTES)return null;try{const parsed=JSON.parse(raw);if(typeof parsed!=="object"||parsed===null)return null;const pid=parsed.pid;const at=parsed.at;if(typeof pid!=="number"||!Number.isInteger(pid)||
315
- pid<=0)return null;return{pid,at:sanitizeAt(at)}}catch{return null}}function sanitizeAt(at){if(typeof at!=="string")return"";return at.replace(/[\u0000-\u001f\u007f]/g," ").slice(0,MAX_AT_LENGTH)}function clearMarker(lockDir2,kind,deps={}){const rm=deps.rmSync??(p=>fs9.rmSync(p,{recursive:true,force:true}));try{rm(markerPath(lockDir2,kind))}catch{}}function watchMarker(lockDir2,kind,selfPid,onStop,deps={}){let fired=false;const timer=setInterval(()=>{if(fired)return;const req=readMarker(lockDir2,kind,deps);if(req===null||req.pid!==selfPid)return;fired=true;onStop(req)},deps.intervalMs??POLL_MS);timer.unref?.();return()=>{fired=true;clearInterval(timer)}}function safe(s){return stripTerminalControls(s)}function compactTimestamp(at=new Date){const p2=n=>String(n).padStart(2,"0");return`${at.getFullYear()}${p2(at.getMonth()+1)}${p2(at.getDate())}-${p2(at.getHours())}${p2(at.getMinutes())}${p2(at.getSeconds())}`}async function buildEngine(config,log){if(config.engine==="noop")return new NoopEngine;const{DispatchEngine}=await import("./ai-dispatch-LY6OVZC3.js");const{DEFAULT_PREFLIGHT_HOSTS}=await import("./ai-dispatch-LY6OVZC3.js");const extraHosts=config.
315
+ pid<=0)return null;return{pid,at:sanitizeAt(at)}}catch{return null}}function sanitizeAt(at){if(typeof at!=="string")return"";return at.replace(/[\u0000-\u001f\u007f]/g," ").slice(0,MAX_AT_LENGTH)}function clearMarker(lockDir2,kind,deps={}){const rm=deps.rmSync??(p=>fs9.rmSync(p,{recursive:true,force:true}));try{rm(markerPath(lockDir2,kind))}catch{}}function watchMarker(lockDir2,kind,selfPid,onStop,deps={}){let fired=false;const timer=setInterval(()=>{if(fired)return;const req=readMarker(lockDir2,kind,deps);if(req===null||req.pid!==selfPid)return;fired=true;onStop(req)},deps.intervalMs??POLL_MS);timer.unref?.();return()=>{fired=true;clearInterval(timer)}}function safe(s){return stripTerminalControls(s)}function compactTimestamp(at=new Date){const p2=n=>String(n).padStart(2,"0");return`${at.getFullYear()}${p2(at.getMonth()+1)}${p2(at.getDate())}-${p2(at.getHours())}${p2(at.getMinutes())}${p2(at.getSeconds())}`}async function buildEngine(config,log){if(config.engine==="noop")return new NoopEngine;const{DispatchEngine}=await import("./ai-dispatch-AHCYPQ5Y.js");const{DEFAULT_PREFLIGHT_HOSTS}=await import("./ai-dispatch-AHCYPQ5Y.js");const extraHosts=config.
316
316
  operations.preflightHosts;return new DispatchEngine(config.ai,log,{workspace:config.workspace,charterFile:config.charterFile??void 0,charterEnabled:config.charterEnabled,...config.charterPrefix===null?{}:{charterPrefix:config.charterPrefix},...config.charterSuffix===null?{}:{charterSuffix:config.charterSuffix},serverPrompts:()=>config.serverPrompts??{},compileCommand:config.compileCommand??void 0,skillOverlayDir:path8.join(config.stateDir,"skill-overlay",projectFileKey(config.projectId)),launcherBin:config.
317
317
  claudeLauncher.bin,...extraHosts.length>0?{preflightHosts:[...DEFAULT_PREFLIGHT_HOSTS,...extraHosts]}:{}})}function lockDir(config){return path8.join(config.stateDir,`task-loop-${projectFileKey(config.projectId)}.lock.d`)}async function runTaskLoop(opts){if(opts.action==="stop")return await stopLoop(opts);const profile=resolveProfile(opts.profile);let creds;try{creds=new AuthSession(profile.name,profile.apiUrl).loadOrThrow()}catch(err){process.stderr.write(`${err.message}
318
318
  `);return 1}const apiUrl=effectiveApiUrl(profile,creds.api_url);const session=new AuthSession(profile.name,apiUrl);const projectRef=opts.project??process.env.TWP_PROJECT??"";if(projectRef===""){process.stderr.write("--project <\u30AD\u30FC|UUID> \u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\uFF08TWP_PROJECT \u3067\u3082\u53EF\uFF09\n");return 2}const projectApi=new ProjectApi(apiUrl,session);let project;try{project=await projectApi.resolve(projectRef)}catch(err){process.stderr.write(`${err.
@@ -1,8 +1,8 @@
1
1
  import { createRequire as __twpCreateRequire } from 'node:module';
2
2
  const require = __twpCreateRequire(import.meta.url);
3
- import{COMPANY_FIELDS,COMPANY_LICENSE,CUSTOMER_FLAG,CUSTOMER_LICENSE,childForbidden,customerSubresources,customerWriteOperations,dataOf,levelForbidden,prepareCustomerFlag}from"./chunk-4CVLBR42.js";import"./chunk-I6DWJXPC.js";import{inspectLocalFile}from"./chunk-VECUCVIY.js";import{checkUploadQuota}from"./chunk-DDKZ5IPT.js";import{featureLicenseGuidance,licenseForbidden}from"./chunk-SN6YG4SF.js";import{createFlags,fieldBody,hasAnyField,updateFlags}from"./chunk-KA3EE4TJ.js";
3
+ import{COMPANY_FIELDS,COMPANY_LICENSE,CUSTOMER_FLAG,CUSTOMER_LICENSE,childForbidden,customerSubresources,customerWriteOperations,dataOf,levelForbidden,prepareCustomerFlag}from"./chunk-57HDZYSN.js";import"./chunk-I6DWJXPC.js";import{inspectLocalFile}from"./chunk-VECUCVIY.js";import{checkUploadQuota}from"./chunk-DDKZ5IPT.js";import{featureLicenseGuidance,licenseForbidden}from"./chunk-ADQD5OPN.js";import{createFlags,fieldBody,hasAnyField,updateFlags}from"./chunk-IRT7VFG4.js";
4
4
  import{repeatedValues}from"./chunk-IOGVQVGD.js";import{booleanText}from"./chunk-UDPJ2IGK.js";import{CUSTOMERS_PATH,SALES_COMPANIES_PATH,isExactNumericId}from"./chunk-ZST7XESB.js";import{ApiError}from"./chunk-IF2K4PM5.js";import{isSafePathSegment}from"./chunk-GMBJTG6A.js";import{NotLoggedInError,SessionExpiredError}from"./chunk-XNLIEUAW.js";import"./chunk-J7QYPKVK.js";import"./chunk-4VZKNEVN.js";import"./chunk-QQRJLH6B.js";import"./chunk-NHYMHCAT.js";
5
- import"./chunk-GY7KI5E5.js";import{LIST_FLAGS,LIST_PAGING_HELP,PAGE_NUMBER_LIST_FLAGS,PAGE_NUMBER_PAGING_HELP,STABLE_PAGE_ORDER,envelopePaging,nonEmpty,pageNumberPaging,pageNumberQuery,pageRangeNotes,positiveInteger}from"./chunk-R53CMVWR.js";import"./chunk-II5RVJQN.js";import{requireResolved,singleRef,withResolved}from"./chunk-ZN5EFDH7.js";import{acknowledgement,isRecord,pick}from"./chunk-ZWVYVS2A.js";import{ApiResponseError,UsageError}from"./chunk-7WSNIXTQ.js";
5
+ import"./chunk-GY7KI5E5.js";import{LIST_FLAGS,LIST_PAGING_HELP,PAGE_NUMBER_LIST_FLAGS,PAGE_NUMBER_PAGING_HELP,STABLE_PAGE_ORDER,envelopePaging,nonEmpty,pageNumberPaging,pageNumberQuery,pageRangeNotes,positiveInteger}from"./chunk-5R4SEO3I.js";import"./chunk-II5RVJQN.js";import{requireResolved,singleRef,withResolved}from"./chunk-ZN5EFDH7.js";import{acknowledgement,isRecord,pick}from"./chunk-ZWVYVS2A.js";import{ApiResponseError,UsageError}from"./chunk-7WSNIXTQ.js";
6
6
  import"./chunk-RZVI6PMW.js";import"./chunk-VSJBJXZO.js";var CUSTOMER_FLAG_FIELD={kind:"boolean",flag:"--customer",key:"customer_flg",summary:"\u9867\u5BA2\u3068\u3057\u3066\u6271\u3046\u304B\uFF08true / false\uFF09"};var FIELDS=[...COMPANY_FIELDS,CUSTOMER_FLAG_FIELD];var COLUMNS=["id","company_name","company_name_kana","company_short_name","customer_flg","supplier_flg","tel","address1"];var WRITE_FORBIDDEN=levelForbidden(COMPANY_LICENSE,"\u53D6\u5F15\u5148\u306E\u4F5C\u6210\u30FB\u66F4\u65B0\u306B\u306F\u3001\u8CA9\u58F2\u7BA1\u7406\u306E\u6A29\u9650\u304C\u300C\u30E1\u30F3\u30D0\u30FC\u300D\u4EE5\u4E0A\u304B\u3001\u9867\u5BA2\u7BA1\u7406\u306E\u6A29\u9650\u304C\u300C\u7DE8\u96C6\u8005\u300D\u4EE5\u4E0A\u306E\u3069\u3061\u3089\u304B\u304C\u8981\u308A\u307E\u3059\u3002\u30C6\u30CA\u30F3\u30C8\u7BA1\u7406\u8005\u306B\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002");
7
7
  var DELETE_FORBIDDEN=levelForbidden(COMPANY_LICENSE,"\u53D6\u5F15\u5148\u306E\u524A\u9664\u306B\u306F\u3001\u8CA9\u58F2\u7BA1\u7406\u306E\u6A29\u9650\u304C\u300C\u30E1\u30F3\u30D0\u30FC\u300D\u4EE5\u4E0A\u304B\u3001\u9867\u5BA2\u7BA1\u7406\u306E\u6A29\u9650\u304C\u300C\u7BA1\u7406\u8005\u300D\u306E\u3069\u3061\u3089\u304B\u304C\u8981\u308A\u307E\u3059\u3002\u30C6\u30CA\u30F3\u30C8\u7BA1\u7406\u8005\u306B\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002");var REF_HELP="<\u53D6\u5F15\u5148> \u306F\u4F01\u696D\u540D\u30FB\u7565\u79F0\u30FB\u30AB\u30CA\u306E\u5B8C\u5168\u4E00\u81F4\u304B\
8
8
  ID\uFF08twp company list \u306E id \u5217\u306E\u6570\u5B57\uFF09\u3067\u6307\u5B9A\u3057\u307E\u3059\u3002\u9867\u5BA2\u30FB\u4ED5\u5165\u5148\u306E\u3069\u3061\u3089\u3082\u6307\u5B9A\u3067\u304D\u307E\u3059\u3002";function companyPath(input){const id=requireResolved(input,"companyId");if(!isExactNumericId(id))throw new UsageError(`\u53D6\u5F15\u5148 ID \u3092\u30D1\u30B9\u306B\u4F7F\u3048\u307E\u305B\u3093: ${id}`);return`${SALES_COMPANIES_PATH}/${id}`}async function resolveCompany(input,ctx,usage){
@@ -1,6 +1,6 @@
1
1
  import { createRequire as __twpCreateRequire } from 'node:module';
2
2
  const require = __twpCreateRequire(import.meta.url);
3
- import{BUILTIN_COMMANDS,GLOBAL_FLAGS,TASK_LOOP_ACTIONS,VALUE_FLAGS}from"./chunk-VQMR5UTD.js";import"./chunk-NAUH75MM.js";import{API_TOKEN,DOMAIN_NAMES,HELP_TOKEN,isDomainName}from"./chunk-523KROGI.js";import"./chunk-QQRJLH6B.js";import{OUTPUT_FORMATS}from"./chunk-K2ONOH3L.js";import"./chunk-WVS4W5FY.js";import"./chunk-NHYMHCAT.js";import"./chunk-VSJBJXZO.js";var EXTRA_TOP_LEVEL=[API_TOKEN,HELP_TOKEN,"completion","configure"];var COMPLETION_SHELLS=["bash","zsh","fish","powershell"];var TOP_LEVEL_FLAGS=["--help","--version","-p","--print","--profile","--mode","--permission-mode","--model","--allowed-tools","--disallowed-tools","--no-tui","--doctor"];var DOMAIN_GLOBAL_FLAGS=[...GLOBAL_FLAGS].filter(flag=>flag.startsWith("--"));function staticValues(flag,ctx){if(flag==="--output")return OUTPUT_FORMATS;if(flag==="--profile")return ctx.profileNames();return void 0}
3
+ import{BUILTIN_COMMANDS,GLOBAL_FLAGS,TASK_LOOP_ACTIONS,VALUE_FLAGS}from"./chunk-QBA6THJ5.js";import"./chunk-NAUH75MM.js";import{API_TOKEN,DOMAIN_NAMES,HELP_TOKEN,isDomainName}from"./chunk-O4NSYHR4.js";import"./chunk-QQRJLH6B.js";import{OUTPUT_FORMATS}from"./chunk-K2ONOH3L.js";import"./chunk-WVS4W5FY.js";import"./chunk-NHYMHCAT.js";import"./chunk-VSJBJXZO.js";var EXTRA_TOP_LEVEL=[API_TOKEN,HELP_TOKEN,"completion","configure"];var COMPLETION_SHELLS=["bash","zsh","fish","powershell"];var TOP_LEVEL_FLAGS=["--help","--version","-p","--print","--profile","--mode","--permission-mode","--model","--allowed-tools","--disallowed-tools","--no-tui","--doctor"];var DOMAIN_GLOBAL_FLAGS=[...GLOBAL_FLAGS].filter(flag=>flag.startsWith("--"));function staticValues(flag,ctx){if(flag==="--output")return OUTPUT_FORMATS;if(flag==="--profile")return ctx.profileNames();return void 0}
4
4
  function positionals(words,takesValue){const out=[];for(let i=0;i<words.length;i++){const word=words[i]??"";if(word==="--"){out.push(...words.slice(i+1));break}if(word.startsWith("-")){if(!word.includes("=")&&takesValue(word))i++;continue}out.push(word)}return out}function byPrefix(candidates,current){const seen=new Set;for(const candidate of candidates){if(candidate.startsWith(current))seen.add(candidate)}return[...seen]}function remainingFlags(flags,words){const used=new Set(words.filter(w=>w.
5
5
  startsWith("--")).map(w=>w.split("=")[0]));return[...flags.filter(f=>f.repeatable===true||!used.has(f.name)).map(f=>f.name),...DOMAIN_GLOBAL_FLAGS.filter(f=>!used.has(f))]}async function complete(words,current,ctx){const previous=words[words.length-1];if(previous!==void 0&&previous.startsWith("--")&&!previous.includes("=")){const values=staticValues(previous,ctx);if(values!==void 0)return byPrefix(values,current)}const eq=current.indexOf("=");if(current.startsWith("--")&&eq>0){const flag=current.
6
6
  slice(0,eq);const values=staticValues(flag,ctx);return values===void 0?[]:byPrefix(values.map(v=>`${flag}=${v}`),current)}const pos=positionals(words,flag=>VALUE_FLAGS.has(flag));const[first,second]=pos;if(first===void 0){if(current.startsWith("-"))return byPrefix([...TOP_LEVEL_FLAGS,...DOMAIN_GLOBAL_FLAGS],current);return byPrefix([...BUILTIN_COMMANDS,...DOMAIN_NAMES,...EXTRA_TOP_LEVEL],current)}if(first==="completion")return pos.length===1?byPrefix(COMPLETION_SHELLS,current):[];if(first==="con\
@@ -1,6 +1,6 @@
1
1
  import { createRequire as __twpCreateRequire } from 'node:module';
2
2
  const require = __twpCreateRequire(import.meta.url);
3
- import{cacheNote,createFlags,fieldBody,hasAnyField,idSegment,masterFields,masterItem,masterListOperation,masterRows,referencedDeleteGuidance,resolveRefFields,targetId,updateFlags}from"./chunk-KA3EE4TJ.js";import"./chunk-UDPJ2IGK.js";import{DEPARTMENTS_PATH}from"./chunk-ZST7XESB.js";import"./chunk-IF2K4PM5.js";import"./chunk-GMBJTG6A.js";import"./chunk-J7QYPKVK.js";import"./chunk-4VZKNEVN.js";import"./chunk-NHYMHCAT.js";import"./chunk-R53CMVWR.js";
3
+ import{cacheNote,createFlags,fieldBody,hasAnyField,idSegment,masterFields,masterItem,masterListOperation,masterRows,referencedDeleteGuidance,resolveRefFields,targetId,updateFlags}from"./chunk-IRT7VFG4.js";import"./chunk-UDPJ2IGK.js";import{DEPARTMENTS_PATH}from"./chunk-ZST7XESB.js";import"./chunk-IF2K4PM5.js";import"./chunk-GMBJTG6A.js";import"./chunk-J7QYPKVK.js";import"./chunk-4VZKNEVN.js";import"./chunk-NHYMHCAT.js";import"./chunk-5R4SEO3I.js";
4
4
  import"./chunk-II5RVJQN.js";import{withResolved}from"./chunk-ZN5EFDH7.js";import{acknowledgement,isRecord,pick}from"./chunk-ZWVYVS2A.js";import{ApiResponseError,UsageError}from"./chunk-7WSNIXTQ.js";import"./chunk-RZVI6PMW.js";import"./chunk-VSJBJXZO.js";var LABEL="\u90E8\u7F72";var LIST_COLUMNS=["id","code","name","parent_id","level","effective_status","valid_from","valid_to","member_count"];var GET_COLUMNS=["id","code","name","name_short","parent_id","level","sort","effective_status","valid_from","valid_to","description"];var TREE_COLUMNS=["depth","name","code","id","effective_status","valid_to"];var MEMBER_COLUMNS=["id","user_id","position_id","job_title_id","start_date","end_date","is_primary","is_current","effective_status"];var REF_FLAG={name:"\
5
5
  --department",summary:"\u5BFE\u8C61\u306E\u90E8\u7F72\uFF08\u4F4D\u7F6E\u5F15\u6570\u306E\u4EE3\u308F\u308A\u306B\u4F7F\u3048\u308B\uFF09",takesValue:true,placeholder:"<\u90E8\u7F72>"};var REF_HELP="<\u90E8\u7F72> \u306F\u540D\u524D\u30FB\u30B3\u30FC\u30C9\u30FBID \u306E\u3069\u308C\u3067\u3082\u6307\u5B9A\u3067\u304D\u307E\u3059\uFF08\u540D\u524D\u304C\u8907\u6570\u306B\u4E00\u81F4\u3059\u308C\u3070\u5019\u88DC\u3092\u51FA\u3057\u3066\u6B62\u307E\u308A\u307E\u3059\uFF09\u3002\nID \u4EE5\u5916\u306F\u90E8\u7F72\u4E00\u89A7\uFF08\u65E2\u5B9A10\u5206\u30AD\u30E3\u30C3\u30B7\u30E5\u30FB--refresh \u3067\u53D6\u308A\u76F4\u3057\uFF09\u3068\u7167\u5408\u3057\u307E\u3059\u3002";
6
6
  var FIELDS=masterFields(LABEL,[{kind:"text",flag:"--name-short",key:"name_short",label:"\u7565\u79F0",maxChars:50,summary:"\u7565\u79F0"},{kind:"ref",flag:"--parent",key:"parent_id",summary:"\u89AA\u90E8\u7F72\uFF08\u540D\u524D\u30FB\u30B3\u30FC\u30C9\u30FBID\uFF09",placeholder:"<\u90E8\u7F72>",clearFlag:"--no-parent",clearSummary:"\u89AA\u90E8\u7F72\u3092\u5916\u3057\u3066\u6700\u4E0A\u4F4D\u306B\u3059\u308B",resolve:(ctx,ref,flag)=>ctx.resolver.department(ref,flag)},{kind:"integer",flag:"--sor\
@@ -1,6 +1,6 @@
1
1
  import { createRequire as __twpCreateRequire } from 'node:module';
2
2
  const require = __twpCreateRequire(import.meta.url);
3
- import{STATUS_VALUES,flatMasterDomain}from"./chunk-KA3EE4TJ.js";import"./chunk-UDPJ2IGK.js";import{JOB_TITLES_PATH}from"./chunk-ZST7XESB.js";import"./chunk-IF2K4PM5.js";import"./chunk-GMBJTG6A.js";import"./chunk-J7QYPKVK.js";import"./chunk-4VZKNEVN.js";import"./chunk-NHYMHCAT.js";import"./chunk-R53CMVWR.js";import"./chunk-II5RVJQN.js";import"./chunk-ZN5EFDH7.js";import"./chunk-ZWVYVS2A.js";import"./chunk-7WSNIXTQ.js";import"./chunk-RZVI6PMW.js";
3
+ import{STATUS_VALUES,flatMasterDomain}from"./chunk-IRT7VFG4.js";import"./chunk-UDPJ2IGK.js";import{JOB_TITLES_PATH}from"./chunk-ZST7XESB.js";import"./chunk-IF2K4PM5.js";import"./chunk-GMBJTG6A.js";import"./chunk-J7QYPKVK.js";import"./chunk-4VZKNEVN.js";import"./chunk-NHYMHCAT.js";import"./chunk-5R4SEO3I.js";import"./chunk-II5RVJQN.js";import"./chunk-ZN5EFDH7.js";import"./chunk-ZWVYVS2A.js";import"./chunk-7WSNIXTQ.js";import"./chunk-RZVI6PMW.js";
4
4
  import"./chunk-VSJBJXZO.js";var jobTitleDomain=flatMasterDomain({name:"job-title",label:"\u8077\u4F4D",path:JOB_TITLES_PATH,itemKey:"job_title",summary:"\u8077\u4F4D\u30DE\u30B9\u30BF\uFF08\u4E00\u89A7\u30FB\u53D6\u5F97\u30FB\u4F5C\u6210\u30FB\u66F4\u65B0\u30FB\u524A\u9664\uFF09",listColumns:["id","code","name","sort_order","status","position_id","base_selling_price","base_cost_price"],getColumns:["id","code","name","name_short","sort_order","status","position_id","base_selling_price","base_cost_price","description"],fields:[
5
5
  {kind:"text",flag:"--name-short",key:"name_short",label:"\u7565\u79F0",maxChars:50,summary:"\u7565\u79F0"},{kind:"integer",flag:"--sort-order",key:"sort_order",label:"\u8868\u793A\u9806",min:0,max:9999,summary:"\u8868\u793A\u9806\uFF080\u301C9999\uFF09"},{kind:"enum",flag:"--status",key:"status",values:STATUS_VALUES,summary:"\u72B6\u614B\uFF08active: \u6709\u52B9 / inactive: \u7121\u52B9\uFF09"},{kind:"text",flag:"--description",key:"description",label:"\u8AAC\u660E",maxChars:1e3,summary:"\u8AAC\u660E"},
6
6
  {kind:"integer",flag:"--base-selling-price",key:"base_selling_price",label:"\u57FA\u6E96\u58F2\u4FA1",min:0,summary:"\u57FA\u6E96\u58F2\u4FA1\uFF080\u4EE5\u4E0A\u306E\u6574\u6570\uFF09"},{kind:"integer",flag:"--base-cost-price",key:"base_cost_price",label:"\u57FA\u6E96\u539F\u4FA1",min:0,summary:"\u57FA\u6E96\u539F\u4FA1\uFF080\u4EE5\u4E0A\u306E\u6574\u6570\uFF09"},{kind:"text",flag:"--skill-requirements",key:"skill_requirements",label:"\u30B9\u30AD\u30EB\u8981\u4EF6",maxChars:5e3,summary:"\u30B9\u30AD\u30EB\u8981\u4EF6"},
@@ -0,0 +1,112 @@
1
+ import { createRequire as __twpCreateRequire } from 'node:module';
2
+ const require = __twpCreateRequire(import.meta.url);
3
+ import{dateFlag}from"./chunk-3RAGOW6X.js";import{repeatedValues}from"./chunk-IOGVQVGD.js";import{boundedText}from"./chunk-UDPJ2IGK.js";import"./chunk-ZST7XESB.js";import"./chunk-IF2K4PM5.js";import{ResolveError,isSafePathSegment}from"./chunk-GMBJTG6A.js";import"./chunk-J7QYPKVK.js";import"./chunk-4VZKNEVN.js";import"./chunk-QQRJLH6B.js";import"./chunk-NHYMHCAT.js";import{LIST_FLAGS,LIST_PAGING_HELP,envelopePaging,nonEmpty,positiveInteger}from"./chunk-5R4SEO3I.js";
4
+ import"./chunk-II5RVJQN.js";import{requireResolved,withResolved}from"./chunk-ZN5EFDH7.js";import{isRecord,pick}from"./chunk-ZWVYVS2A.js";import{ApiResponseError,UsageError}from"./chunk-7WSNIXTQ.js";import"./chunk-RZVI6PMW.js";import"./chunk-VSJBJXZO.js";var MAX_BLOCK_DEPTH=10;var NAMED_ENTITIES={nbsp:" ",lt:"<",gt:">",quot:'"',apos:"'",amp:"&"};function decodeEntities(text2){return text2.replace(/&(#x[0-9a-f]{1,8}|#\d{1,8}|[a-z]{1,8});/gi,(whole,ref)=>{if(ref.startsWith("#")){const code=ref[1]==="x"||ref[1]==="X"?Number.parseInt(ref.slice(2),16):Number.parseInt(ref.slice(1),10);return Number.isInteger(code)&&code>0&&code<=1114111?String.fromCodePoint(code):whole}return NAMED_ENTITIES[ref.toLowerCase()]??whole})}var HTML_TAG_NAMES=new Set(["a","\
5
+ abbr","article","aside","audio","b","blockquote","body","br","caption","cite","code","col","colgroup","dd","del","details","div","dl","dt","em","figcaption","figure","font","footer","h1","h2","h3","h4","h5","h6","head","header","hr","html","i","iframe","img","input","ins","kbd","label","li","main","mark","meta","nav","ol","p","pre","q","s","samp","script","section","small","source","span","strike","strong","style","sub","summary","sup","table","tbody","td","tfoot","th","thead","title","tr","u","\
6
+ ul","var","video"]);var ATTRIBUTES=/^(?:\s+[a-z_:][-\w:.]*(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'=<>`]+))?)*\s*\/?$/i;function tokenizeHtml(html){const tokens=[];let text2="";let i=0;let nextLt=html.indexOf("<");let nextGt=-2;while(nextLt!==-1){text2+=html.slice(i,nextLt);if(nextGt===-2||nextGt!==-1&&nextGt<nextLt)nextGt=html.indexOf(">",nextLt);const following=html.indexOf("<",nextLt+1);if(nextGt===-1||following!==-1&&following<nextGt){text2+="<";i=nextLt+1;nextLt=following;continue}const inner=html.
7
+ slice(nextLt+1,nextGt);const match=/^(\/?)([a-z][a-z0-9]*)(?=[\s/]|$)/i.exec(inner);if(match!==null&&HTML_TAG_NAMES.has((match[2]??"").toLowerCase())&&ATTRIBUTES.test(inner.slice(match[0].length))){if(text2!=="")tokens.push({kind:"text",text:text2});text2="";const[head,slash,name]=match;tokens.push({kind:"tag",name:name.toLowerCase(),closing:slash==="/",attrs:inner.slice(head.length)})}else if(!inner.startsWith("!")){text2+=`<${inner}>`}i=nextGt+1;nextLt=html.indexOf("<",i)}text2+=html.slice(i);
8
+ if(text2!=="")tokens.push({kind:"text",text:text2});return tokens}function attr(attrs,name){const lower=attrs.toLowerCase();let at=lower.indexOf(`${name}=`);while(at>0&&!/\s/.test(lower[at-1]??""))at=lower.indexOf(`${name}=`,at+1);if(at===-1)return void 0;const quote=attrs[at+name.length+1];if(quote!=='"'&&quote!=="'")return void 0;const from=at+name.length+2;const to=attrs.indexOf(quote,from);return to===-1?void 0:decodeEntities(attrs.slice(from,to))}function hasHtmlTag(text2){return tokenizeHtml(
9
+ text2).some(token=>token.kind==="tag")}var PARAGRAPH_TAGS=new Set(["p","div","table","section","article","hr"]);var DROP_CONTENT_TAGS=new Set(["script","style","head","title"]);function listMarker(attrs,frame){const checked=attr(attrs,"data-checked");const kind=checked==="true"?"checked":checked==="false"?"unchecked":attr(attrs,"data-list")??frame?.listType;if(kind==="checked")return"- [x] ";if(kind==="unchecked")return"- [ ] ";if(kind==="ordered"||kind===void 0&&frame?.ordered===true)return`${frame===
10
+ void 0?1:frame.count}. `;return"- "}function htmlToText(html){const out=[];const links=[];const lists=[];let dropUntil;let inPre=false;for(const token of tokenizeHtml(html)){if(dropUntil!==void 0){if(token.kind==="tag"&&token.closing&&token.name===dropUntil)dropUntil=void 0;continue}if(token.kind==="text"){const text2=decodeEntities(token.text);out.push(inPre?text2:text2.replace(/[ \t\r\n\f]+/g," "));continue}const{name,closing,attrs}=token;if(DROP_CONTENT_TAGS.has(name)){if(!closing)dropUntil=name;
11
+ continue}if(name==="pre"){out.push(closing?`
12
+ ${FENCE_END}
13
+
14
+ `:`
15
+
16
+ ${FENCE_START}
17
+ `);inPre=!closing;continue}if(inPre)continue;if(/^h[1-6]$/.test(name)){out.push(closing?"\n\n":`
18
+
19
+ ${"#".repeat(Number(name[1]))} `)}else if(name==="ul"||name==="ol"){if(closing)lists.pop();else lists.push({ordered:name==="ol",listType:attr(attrs,"data-list"),count:0});out.push("\n\n")}else if(name==="li"&&!closing){const frame=lists[lists.length-1];if(frame!==void 0)frame.count+=1;out.push(`
20
+ ${" ".repeat(Math.max(0,lists.length-1))}${listMarker(attrs,frame)}`)}else if(name==="blockquote"){out.push(closing?"\n\n":"\n\n> ")}else if(name==="br"){out.push("\n")}else if(PARAGRAPH_TAGS.has(name)){out.push("\n\n")}else if(name==="tr"){out.push("\n")}else if((name==="td"||name==="th")&&closing){out.push(" | ")}else if(name==="img"&&!closing){const src=attr(attrs,"src");if(src!==void 0&&src!=="")out.push(`![\u753B\u50CF](${src})`)}else if(name==="a"){if(!closing){links.push({href:attr(attrs,
21
+ "href")??"",at:out.length})}else{const link=links.pop();if(link!==void 0&&link.href!==""){const label=out.splice(link.at).join("").trim();out.push(label===""||label===link.href?link.href:`[${label}](${link.href})`)}}}}return tidy(out.join(""),{trimStart:true})}var FENCE_START="```";var FENCE_END="```";function tidy(text2,options={}){const kept=[];let blank=0;let inFence=false;for(const raw of text2.replace(/\r\n?/g,"\n").split("\n")){if(raw.trim()==="```"){inFence=!inFence;kept.push(raw.trim());
22
+ blank=0;continue}if(inFence){kept.push(raw);continue}const line=options.trimStart===true&&!/^ {2,}(?:- |\d+\. )/.test(raw)?raw.trim():raw.trimEnd();blank=line===""?blank+1:0;if(blank<2)kept.push(line)}return kept.join("\n").replace(/^\n+|\n+$/g,"")}function oneLine(text2){return text2.split("\n").map(part=>part.trim()).filter(part=>part!=="").join(" ")}function isObject(value){return value!==null&&typeof value==="object"&&!Array.isArray(value)}function inlineText(content,depth){if(depth>MAX_BLOCK_DEPTH||
23
+ !Array.isArray(content))return"";return content.map(inline=>{if(typeof inline==="string")return inline;if(!isObject(inline))return"";if(inline["type"]==="link"){const label=inlineText(inline["content"],depth+1);const href=typeof inline["href"]==="string"?inline["href"]:"";if(href==="")return label;return label===""||label===href?href:`[${label}](${href})`}if(typeof inline["text"]==="string")return inline["text"];return inlineText(inline["content"],depth+1)}).join("")}function tableLines(content,depth){
24
+ if(!isObject(content)||!Array.isArray(content["rows"]))return[];return content["rows"].flatMap(row=>{if(!isObject(row)||!Array.isArray(row["cells"]))return[];const cells=row["cells"].map(cell=>inlineText(isObject(cell)?cell["content"]:cell,depth+1).replace(/\|/g,"\\|").replace(/\n/g," "));return[`| ${cells.join(" | ")} |`]})}function blockPrefix(block,ordinal){const props=isObject(block["props"])?block["props"]:{};switch(block["type"]){case"heading":{const level=typeof props["level"]==="number"&&
25
+ props["level"]>=1&&props["level"]<=6?props["level"]:1;return`${"#".repeat(level)} `}case"bulletListItem":return"- ";case"numberedListItem":return`${ordinal}. `;case"checkListItem":return props["checked"]===true?"- [x] ":"- [ ] ";case"quote":return"> ";default:return""}}function mediaLine(block){const props=isObject(block["props"])?block["props"]:{};const url=typeof props["url"]==="string"?props["url"]:"";if(url==="")return void 0;const name=[props["caption"],props["name"]].find(v=>typeof v==="st\
26
+ ring"&&v.trim()!=="")??"";const label=block["type"]==="image"?"\u753B\u50CF":"\u30D5\u30A1\u30A4\u30EB";return`${block["type"]==="image"?"!":""}[${name===""?label:name}](${url})`}function blocksToLines(blocks,depth){if(!Array.isArray(blocks)||depth>MAX_BLOCK_DEPTH)return[];const indent=" ".repeat(depth);const lines=[];let ordinal=0;for(const block of blocks){if(!isObject(block))continue;ordinal=block["type"]==="numberedListItem"?ordinal+1:0;if(block["type"]==="table"){lines.push(...tableLines(block["\
27
+ content"],depth).map(row=>`${indent}${row}`))}else if(block["type"]==="codeBlock"){const code=inlineText(block["content"],depth);lines.push(`${indent}\`\`\``,...code.split("\n").map(row=>`${indent}${row}`),`${indent}\`\`\``)}else{const text2=inlineText(block["content"],depth);const media=text2.trim()===""?mediaLine(block):void 0;if(media!==void 0){lines.push(`${indent}${media}`)}else if(text2.trim()!==""){const prefix=blockPrefix(block,ordinal);const continuation=`${indent}${" ".repeat(prefix.length)}`;
28
+ lines.push(`${indent}${prefix}${text2.split("\n").join(`
29
+ ${continuation}`)}`)}else{lines.push("")}}lines.push(...blocksToLines(block["children"],depth+1))}return lines}function blockNoteToText(blocks){return tidy(blocksToLines(blocks,0).join("\n"))}function meetingContentToText(content){if(typeof content!=="string")return"";const trimmed=content.trim();if(trimmed==="")return"";if(trimmed.startsWith("[")){try{const parsed=JSON.parse(trimmed);if(Array.isArray(parsed))return blockNoteToText(parsed)}catch{}}return hasHtmlTag(trimmed)?htmlToText(trimmed):trimmed}
30
+ function wikiContentToText(content){if(typeof content!=="string")return"";const trimmed=content.trim();return hasHtmlTag(trimmed)?htmlToText(trimmed):trimmed}function noteContentToText(content,contentType){if(typeof content!=="string")return"";return contentType==="markdown"?tidy(content):htmlToText(content)}function metaLine(label,value){if(value===null||value===void 0)return[];const text2=Array.isArray(value)?value.filter(v=>typeof v==="string"||typeof v==="number").join(", "):typeof value==="\
31
+ string"||typeof value==="number"||typeof value==="boolean"?String(value):"";return text2.trim()===""?[]:[`${label}: ${oneLine(text2)}`]}function composeDocument(title,meta,sections){const parts=[`# ${typeof title==="string"&&title.trim()!==""?oneLine(title):"(\u7121\u984C)"}`];if(meta.length>0)parts.push(meta.join("\n"));for(const section of sections){if(section.body.trim()==="")continue;parts.push(section.heading===void 0?section.body:`\u25A0 ${section.heading}
32
+
33
+ ${section.body}`)}return`${parts.join("\n\n")}
34
+ `}var WIKI_PATH="/api/v2/wiki";var NOTES_PATH="/api/v2/notes";var MEETINGS_PATH="/api/v2/meetings";var ROOT_PARENT="root";var WIKI_STATUSES=["draft","published"];var NOTE_STATUSES=["draft","published"];var NOTE_VISIBILITIES=["private","tenant","external","public"];var NOTE_SORTS=["manual","created_at","updated_at","view_count","comment_count","reaction_count"];var MEETING_STATUSES=["draft","published","archived"];var MEETING_TYPES=["regular","client","internal","retrospective","decision","one_on_o\
35
+ ne"];var MEETING_SORTS=["meeting_date","created_at","updated_at","title"];var SORT_ORDERS=["asc","desc"];var MEETING_TAGS_MAX=20;var MEETING_TAG_MAX_CHARS=50;var DATE_FLOOR="0000-01-01";var DATE_CEIL="9999-12-31";var WIKI_LIST_COLUMNS=["id","title","status","parent_page_id","updated_at","updated_by_name"];var WIKI_CHILD_COLUMNS=["id","title","status","child_count","updated_at","updated_by_name"];var WIKI_GET_COLUMNS=["id","title","status","parent_page_id","version","tags","updated_at","updated_b\
36
+ y_name"];var NOTE_LIST_COLUMNS=["id","title","status","visibility","created_by_name","updated_at","comment_count","reaction_count"];var NOTE_GET_COLUMNS=["id","title","status","visibility","content_type","category_name","tags","created_by_name","updated_at","view_count"];var MEETING_LIST_COLUMNS=["id","meeting_date","title","meeting_type","status","project_name","created_by_name"];var MEETING_GET_COLUMNS=["id","title","meeting_date","meeting_type","status","project_name","category_name","created\
37
+ _by_name","updated_at"];var TEXT_OUTPUT_HELP="--output text \u306F\u672C\u6587\u3092\u8AAD\u3080\u305F\u3081\u306E\u6587\u66F8\uFF08\u898B\u51FA\u3057\u30FB\u30E1\u30BF\u60C5\u5831\u30FB\u672C\u6587\uFF09\u3092\u51FA\u3057\u307E\u3059\u3002HTML \u3068\u5171\u540C\u7DE8\u96C6\u30A8\u30C7\u30A3\u30BF\u306E JSON \u306F\n\u5E73\u6587\u3078\u5909\u63DB\u3057\u3001\u898B\u51FA\u3057\u30FB\u7B87\u6761\u66F8\u304D\u30FB\u30EA\u30F3\u30AF\u306F Markdown \u98A8\u306B\u6B8B\u3057\u307E\u3059\u3002--output json \u306F\u30B5\u30FC\u30D0\u306E\u539F\u6587\u306E\u307E\u307E\u3067\u3059\u3002";
38
+ function noArgs(input,command){if(input.args.length>0){throw new UsageError(`${command} \u306F\u4F4D\u7F6E\u5F15\u6570\u3092\u53D6\u308A\u307E\u305B\u3093: ${input.args.join(" ")}`,`${command} help`)}}function singleId(input,command,label,where){const[raw,...rest]=input.args;const id=raw?.trim()??"";if(id==="")throw new UsageError(`${label}\u306E ID \u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044`,`${command} help`);if(rest.length>0)throw new UsageError(`${command} \u304C\u53D7\u3051\u53D6\u308C\u308B${label}\
39
+ ID \u306F1\u3064\u3060\u3051\u3067\u3059: ${rest.join(" ")}`,`${command} help`);if(!isSafePathSegment(id))throw new UsageError(`${label}\u306E ID \u3068\u3057\u3066\u4F7F\u3048\u306A\u3044\u5024\u3067\u3059: ${id}`,`${label}\u306E ID \u306F ${where} \u306E id \u5217\u3067\u78BA\u8A8D\u3067\u304D\u307E\u3059\u3002`);return id}function oneOf(input,flag,allowed){const raw=nonEmpty(input.flags,flag);if(raw===void 0)return void 0;const value=raw.trim();if(!allowed.includes(value)){throw new UsageError(
40
+ `${flag} \u306B\u6307\u5B9A\u3067\u304D\u306A\u3044\u5024\u3067\u3059: ${raw}`,`\u6307\u5B9A\u3067\u304D\u308B\u5024: ${allowed.join(" / ")}`)}return value}function pageLimit(input){const limit=positiveInteger(input.flags,"--limit");if(limit!==void 0&&limit>500){throw new UsageError(`--limit \u306F 1\u301C500 \u3067\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044: ${limit}`,"\u30B5\u30FC\u30D0\u306E\u4E0A\u9650\u304C500\u4EF6\u3067\u3059\u3002\u5168\u4EF6\u306F --all \u3067\u8FBF\u308C\u307E\u3059\u3002")}
41
+ return limit}function record(body,key,label){const row=isRecord(body)&&body["result"]===true?body[key]:void 0;if(!isRecord(row)||typeof row["id"]!=="string"){throw new ApiResponseError(`${label}\u306E\u5FDC\u7B54\u306B ${key} \u304C\u3042\u308A\u307E\u305B\u3093\u3002\u63A5\u7D9A\u5148\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002`)}return row}function envelopeRows(body,paging,label){if(!isRecord(body)||body["result"]!==true){throw new ApiResponseError(`${label}\u306E\u5FDC\u7B54\u306E\u5F62\u304C\u60F3\u5B9A\u3068\u9055\u3044\u307E\u3059\u3002\u63A5\u7D9A\u5148\u3092\u78BA\u8A8D\
42
+ \u3057\u3066\u304F\u3060\u3055\u3044\u3002`)}return paging.items(body)}function scanTruncatedNote(label){return body=>isRecord(body)&&body["scan_truncated"]===true?[`\u30B5\u30FC\u30D0\u304C\u8D70\u67FB\u3059\u308B\u4EF6\u6570\u306E\u4E0A\u9650\u306B\u9054\u3057\u305F\u305F\u3081\u3001\u3053\u306E${label}\u306B\u306F\u6761\u4EF6\u306B\u5408\u3046\u306E\u306B\u51FA\u3066\u3053\u306A\u3044\u884C\u304C\u3042\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002`]:[]}var WIKI_LABEL="wiki \u30DA\u30FC\u30B8";
43
+ var wikiPaging=envelopePaging({label:`${WIKI_LABEL}\u4E00\u89A7`});var PARENT_EXCLUSIVE=["--status","--tag","--keyword","--limit","--cursor","--all","--max-pages","--max-items"];function parentRef(input){const raw=nonEmpty(input.flags,"--parent");if(raw===void 0)return void 0;const parent=raw.trim();const clash=PARENT_EXCLUSIVE.filter(flag=>input.flags.has(flag));if(clash.length>0){throw new UsageError(`--parent \u306F ${clash.join(" / ")} \u3068\u4F75\u7528\u3067\u304D\u307E\u305B\u3093`,"--par\
44
+ ent \u306F\u30DA\u30FC\u30B8\u306E\u89AA\u5B50\u69CB\u9020\uFF08\u5168\u30DA\u30FC\u30B8\uFF09\u304B\u3089\u76F4\u4E0B\u306E\u5B50\u3092\u9078\u3076\u306E\u3067\u3001\u30B5\u30FC\u30D0\u5074\u306E\u7D5E\u308A\u8FBC\u307F\u30FB\u30DA\u30FC\u30B8\u30F3\u30B0\u3092\u4F7F\u3048\u307E\u305B\u3093\u3002")}if(parent!==ROOT_PARENT&&!isSafePathSegment(parent)){throw new UsageError(`\u89AA\u30DA\u30FC\u30B8\u306E ID \u3068\u3057\u3066\u4F7F\u3048\u306A\u3044\u5024\u3067\u3059: ${parent}`,"\u30DA\u30FC\u30B8\u306E ID \u306F twp wi\
45
+ ki list \u306E id \u5217\u3067\u78BA\u8A8D\u3067\u304D\u307E\u3059\u3002")}return parent}function wikiListQuery(input){return{project_id:requireResolved(input,"project"),status:oneOf(input,"--status",WIKI_STATUSES),tag:nonEmpty(input.flags,"--tag"),keyword:nonEmpty(input.flags,"--keyword"),limit:pageLimit(input),cursor:nonEmpty(input.flags,"--cursor")}}function childrenOf(body,parent){const tree=isRecord(body)&&body["result"]===true?body["tree"]:void 0;if(!Array.isArray(tree))throw new ApiResponseError(
46
+ `${WIKI_LABEL}\u306E\u30C4\u30EA\u30FC\u306E\u5FDC\u7B54\u306B tree \u914D\u5217\u304C\u3042\u308A\u307E\u305B\u3093\u3002\u63A5\u7D9A\u5148\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002`);const find=roots=>{const stack=[...roots];while(stack.length>0){const node=stack.pop();if(!isRecord(node))continue;const children2=Array.isArray(node["children"])?node["children"]:[];if(node["id"]===parent)return children2;for(const child of children2)stack.push(child)}return void 0};const children=parent===
47
+ ROOT_PARENT?tree:find(tree);if(children===void 0){throw new ResolveError(`\u89AA\u30DA\u30FC\u30B8 ${parent} \u306F\u3053\u306E\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E wiki \u306B\u898B\u3064\u304B\u308A\u307E\u305B\u3093\uFF08\u524A\u9664\u6E08\u307F\u30FB\u4ED6\u4EBA\u306E\u4E0B\u66F8\u304D\u30FB\u5225\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u30DA\u30FC\u30B8\u306F\u898B\u3048\u307E\u305B\u3093\uFF09`,404)}return children.filter(isRecord).map(node=>{const{children:grand,...page}=node;return{
48
+ ...page,child_count:Array.isArray(grand)?grand.length:0}})}var wikiList={name:"list",summary:`\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E${WIKI_LABEL}\u3092\u4E00\u89A7\u3059\u308B\uFF08--parent \u3067\u89AA\u30DA\u30FC\u30B8\u76F4\u4E0B\uFF09`,usage:"twp wiki list [--project <\u30B3\u30FC\u30C9|ID>] [--parent <\u30DA\u30FC\u30B8ID>|root] [--status <draft|published>] [--tag <\u30BF\u30B0>] [--keyword <\u8A9E>] [--all] [--limit <\u4EF6\u6570>]",description:`wiki \u306F\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u3054\u3068\u3067\u3059\u3002--project \u3092\u7701\u304F\u3068\u65E2\u5B9A\u306E\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\
49
+ \uFF08TWP_PROJECT \u7B49\uFF09\u3092\u4F7F\u3044\u307E\u3059\u3002
50
+ --parent <\u30DA\u30FC\u30B8ID> \u306F\u305D\u306E\u30DA\u30FC\u30B8\u76F4\u4E0B\u306E\u5B50\u30DA\u30FC\u30B8\u3060\u3051\u3001--parent ${ROOT_PARENT} \u306F\u6700\u4E0A\u4F4D\u306E\u30DA\u30FC\u30B8\u3060\u3051\u3092\u51FA\u3057\u307E\u3059\uFF08\u5B6B\u306F child_count \u5217\u3067\u6570\u3060\u3051\u5206\u304B\u308A\u307E\u3059\uFF09\u3002
51
+ --parent \u306F\u30DA\u30FC\u30B8\u306E\u89AA\u5B50\u69CB\u9020\u30921\u56DE\u3067\u5F15\u3044\u3066\u9078\u3076\u306E\u3067\u3001${PARENT_EXCLUSIVE.join(" / ")} \u3068\u306F\u4F75\u7528\u3067\u304D\u307E\u305B\u3093\u3002
52
+ \u4E0B\u66F8\u304D\u306F\u4F5C\u6210\u8005\u3068 wiki \u306E\u7BA1\u7406\u8005\u306B\u3057\u304B\u898B\u3048\u307E\u305B\u3093\uFF08\u30B5\u30FC\u30D0\u306E\u5224\u5B9A\uFF09\u3002
53
+
54
+ --output json \u306F API \u304C\u8FD4\u3059\u5168\u30D5\u30A3\u30FC\u30EB\u30C9\uFF08\u672C\u6587 content \u3092\u542B\u3080\uFF09\u3092\u51FA\u3057\u307E\u3059\u3002
55
+ --output table / text / tsv \u306F\u8981\u7D04\u5217\uFF08${WIKI_LIST_COLUMNS.join(" / ")}\u3002--parent \u3067\u306F parent_page_id \u306E\u4EE3\u308F\u308A\u306B child_count\uFF09\u3067\u3059\u3002\u672C\u6587\u306F twp wiki get \u3067\u8AAD\u3081\u307E\u3059\u3002
56
+
57
+ `+LIST_PAGING_HELP,flags:[...LIST_FLAGS,{name:"--project",summary:"\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\uFF08\u30B3\u30FC\u30C9\u304B ID\u3002\u7701\u7565\u6642\u306F\u65E2\u5B9A\u306E\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\uFF09",takesValue:true,placeholder:"<\u30B3\u30FC\u30C9|ID>"},{name:"--parent",summary:`\u89AA\u30DA\u30FC\u30B8\u306E ID\uFF08\u76F4\u4E0B\u306E\u5B50\u3060\u3051\u3092\u51FA\u3059\uFF09\u3002${ROOT_PARENT} \u3067\u6700\u4E0A\u4F4D`,takesValue:true,placeholder:"<\u30DA\u30FC\u30B8ID>|root"},
58
+ {name:"--status",summary:`\u72B6\u614B\u3067\u7D5E\u308A\u8FBC\u3080\uFF08${WIKI_STATUSES.join(" / ")}\uFF09`,takesValue:true,placeholder:"<\u72B6\u614B>"},{name:"--tag",summary:"\u30BF\u30B0\u3067\u7D5E\u308A\u8FBC\u3080",takesValue:true,placeholder:"<\u30BF\u30B0>"},{name:"--keyword",summary:"\u30AD\u30FC\u30EF\u30FC\u30C9\u3067\u7D5E\u308A\u8FBC\u3080",takesValue:true,placeholder:"<\u8A9E>"}],paging:wikiPaging,async prepare(input,ctx){noArgs(input,"twp wiki list");parentRef(input);oneOf(input,
59
+ "--status",WIKI_STATUSES);pageLimit(input);return withResolved(input,{project:await ctx.projectId(input.flags.get("--project"))})},plan(input){return parentRef(input)!==void 0?{method:"GET",path:`${WIKI_PATH}/tree`,query:{project_id:requireResolved(input,"project")}}:{method:"GET",path:WIKI_PATH,query:wikiListQuery(input)}},narrow(body,input){const parent=parentRef(input);if(parent===void 0)return body;return{result:true,items:childrenOf(body,parent),has_more:false,next_cursor:null}},summarize:body=>{
60
+ const rows=envelopeRows(body,wikiPaging,`${WIKI_LABEL}\u4E00\u89A7`);const columns=rows.some(row=>isRecord(row)&&"child_count"in row)?WIKI_CHILD_COLUMNS:WIKI_LIST_COLUMNS;return rows.map(row=>pick(row,columns))},raw:body=>envelopeRows(body,wikiPaging,`${WIKI_LABEL}\u4E00\u89A7`)};function wikiDocument(body){const page=record(body,"page",WIKI_LABEL);return composeDocument(page["title"],[...metaLine("\u72B6\u614B",page["status"]),...metaLine("\u30BF\u30B0",page["tags"]),...metaLine("\u89AA\u30DA\u30FC\u30B8",
61
+ page["parent_page_id"]),...metaLine("\u7248",page["version"]),...metaLine("\u66F4\u65B0",page["updated_at"]),...metaLine("\u66F4\u65B0\u8005",page["updated_by_name"]),...metaLine("ID",page["id"])],[{body:wikiContentToText(page["content"])}])}var wikiGet={name:"get",summary:`${WIKI_LABEL}1\u4EF6\u306E\u8A73\u7D30\u3092\u8868\u793A\u3059\u308B\uFF08--output text \u3067\u672C\u6587\u3092\u8AAD\u3080\uFF09`,usage:"twp wiki get <\u30DA\u30FC\u30B8ID>",description:`${TEXT_OUTPUT_HELP}
62
+
63
+ --output table / tsv \u306F\u8981\u7D04\u5217\uFF08${WIKI_GET_COLUMNS.join(" / ")}\uFF09\u3067\u3059\u3002
64
+ \u4ED6\u4EBA\u306E\u4E0B\u66F8\u304D\uFF08\u3068\u3001\u4ED6\u4EBA\u306E\u4E0B\u66F8\u304D\u306E\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3\u914D\u4E0B\u306E\u30DA\u30FC\u30B8\uFF09\u306F\u300C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u300D\u306B\u306A\u308A\u307E\u3059\uFF08\u30B5\u30FC\u30D0\u306E\u5224\u5B9A\uFF09\u3002`,flags:[],plan:input=>({method:"GET",path:`${WIKI_PATH}/${encodeURIComponent(singleId(input,"twp wiki get","\u30DA\u30FC\u30B8","twp wiki list"))}`}),summarize:body=>pick(record(body,
65
+ "page",WIKI_LABEL),WIKI_GET_COLUMNS),raw:body=>record(body,"page",WIKI_LABEL),document:wikiDocument};var NOTE_LABEL="\u30CE\u30FC\u30C8";var notePaging=envelopePaging({label:`${NOTE_LABEL}\u4E00\u89A7`});function noteListQuery(input){return{status:oneOf(input,"--status",NOTE_STATUSES),visibility:oneOf(input,"--visibility",NOTE_VISIBILITIES),tag:nonEmpty(input.flags,"--tag"),keyword:nonEmpty(input.flags,"--keyword"),sort_by:oneOf(input,"--sort",NOTE_SORTS),mine:input.flags.has("--mine")?"true":void 0,
66
+ is_favorited:input.flags.has("--favorite")?"true":void 0,limit:pageLimit(input),cursor:nonEmpty(input.flags,"--cursor")}}var noteList={name:"list",summary:`\u30C6\u30CA\u30F3\u30C8\u306E${NOTE_LABEL}\u3092\u4E00\u89A7\u3059\u308B\uFF08--mine \u3067\u81EA\u5206\u306E\u3082\u306E\uFF09`,usage:"twp note list [--mine] [--favorite] [--status <draft|published>] [--visibility <\u516C\u958B\u7BC4\u56F2>] [--tag <\u30BF\u30B0>] [--keyword <\u8A9E>] [--sort <\u4E26\u3073\u9806>] [--all] [--limit <\u4EF6\u6570>]",
67
+ description:`\u4ED6\u4EBA\u306E\u4E0B\u66F8\u304D\u30FB\u975E\u516C\u958B\u306E\u30CE\u30FC\u30C8\u306F\u51FA\u307E\u305B\u3093\uFF08\u30CE\u30FC\u30C8\u306E\u7BA1\u7406\u8005\u3092\u9664\u304F\u3002\u30B5\u30FC\u30D0\u306E\u5224\u5B9A\uFF09\u3002\u533F\u540D\u306E\u30CE\u30FC\u30C8\u306F\u4F5C\u6210\u8005\u304C\u4F0F\u305B\u3089\u308C\u307E\u3059\u3002
68
+ --visibility \u306F ${NOTE_VISIBILITIES.join(" / ")}\u3001--sort \u306F ${NOTE_SORTS.join(" / ")} \u3067\u3059\uFF08\u6253\u3061\u9593\u9055\u3044\u306F\u9001\u308B\u524D\u306B\u6B62\u3081\u307E\u3059\uFF09\u3002
69
+
70
+ --output json \u306F API \u304C\u8FD4\u3059\u5168\u30D5\u30A3\u30FC\u30EB\u30C9\uFF08\u672C\u6587 content \u3092\u542B\u3080\uFF09\u3092\u51FA\u3057\u307E\u3059\u3002
71
+ --output table / text / tsv \u306F\u8981\u7D04\u5217\uFF08${NOTE_LIST_COLUMNS.join(" / ")}\uFF09\u3067\u3059\u3002\u672C\u6587\u306F twp note get \u3067\u8AAD\u3081\u307E\u3059\u3002
72
+
73
+ `+LIST_PAGING_HELP,flags:[...LIST_FLAGS,{name:"--mine",summary:"\u81EA\u5206\u304C\u4F5C\u6210\u3057\u305F\u30CE\u30FC\u30C8\u3060\u3051\uFF08\u81EA\u5206\u306E\u4E0B\u66F8\u304D\u30FB\u975E\u516C\u958B\u3092\u542B\u3080\uFF09",takesValue:false},{name:"--favorite",summary:"\u304A\u6C17\u306B\u5165\u308A\u306B\u767B\u9332\u3057\u305F\u30CE\u30FC\u30C8\u3060\u3051",takesValue:false},{name:"--status",summary:`\u72B6\u614B\u3067\u7D5E\u308A\u8FBC\u3080\uFF08${NOTE_STATUSES.join(" / ")}\uFF09`,takesValue:true,
74
+ placeholder:"<\u72B6\u614B>"},{name:"--visibility",summary:`\u516C\u958B\u7BC4\u56F2\u3067\u7D5E\u308A\u8FBC\u3080\uFF08${NOTE_VISIBILITIES.join(" / ")}\uFF09`,takesValue:true,placeholder:"<\u516C\u958B\u7BC4\u56F2>"},{name:"--tag",summary:"\u30BF\u30B0\u3067\u7D5E\u308A\u8FBC\u3080",takesValue:true,placeholder:"<\u30BF\u30B0>"},{name:"--keyword",summary:"\u30AD\u30FC\u30EF\u30FC\u30C9\u3067\u7D5E\u308A\u8FBC\u3080",takesValue:true,placeholder:"<\u8A9E>"},{name:"--sort",summary:`\u4E26\u3073\u9806\uFF08${NOTE_SORTS.
75
+ join(" / ")}\uFF09`,takesValue:true,placeholder:"<\u4E26\u3073\u9806>"}],paging:notePaging,plan(input){noArgs(input,"twp note list");return{method:"GET",path:NOTES_PATH,query:noteListQuery(input)}},summarize:body=>envelopeRows(body,notePaging,`${NOTE_LABEL}\u4E00\u89A7`).map(row=>pick(row,NOTE_LIST_COLUMNS)),raw:body=>envelopeRows(body,notePaging,`${NOTE_LABEL}\u4E00\u89A7`),notes:scanTruncatedNote(`${NOTE_LABEL}\u4E00\u89A7`)};function noteDocument(body){const note=record(body,"note",NOTE_LABEL);
76
+ return composeDocument(note["title"],[...metaLine("\u72B6\u614B",note["status"]),...metaLine("\u516C\u958B\u7BC4\u56F2",note["visibility"]),...metaLine("\u30AB\u30C6\u30B4\u30EA",note["category_name"]),...metaLine("\u30BF\u30B0",note["tags"]),...metaLine("\u4F5C\u6210\u8005",note["created_by_name"]),...metaLine("\u66F4\u65B0",note["updated_at"]),...metaLine("ID",note["id"])],[{body:noteContentToText(note["content"],note["content_type"])}])}var noteGet={name:"get",summary:`${NOTE_LABEL}1\u4EF6\u306E\u8A73\u7D30\u3092\u8868\u793A\u3059\u308B\
77
+ \uFF08--output text \u3067\u672C\u6587\u3092\u8AAD\u3080\uFF09`,usage:"twp note get <\u30CE\u30FC\u30C8ID>",description:`${TEXT_OUTPUT_HELP}
78
+
79
+ --output table / tsv \u306F\u8981\u7D04\u5217\uFF08${NOTE_GET_COLUMNS.join(" / ")}\uFF09\u3067\u3059\u3002
80
+ \u958B\u304F\u3068\u30CE\u30FC\u30C8\u306E\u95B2\u89A7\u6570\u304C1\u5897\u3048\u307E\u3059\uFF08\u753B\u9762\u3067\u958B\u304F\u306E\u3068\u540C\u3058\u304F\u30B5\u30FC\u30D0\u304C\u6570\u3048\u307E\u3059\uFF09\u3002`,flags:[],plan:input=>({method:"GET",path:`${NOTES_PATH}/${encodeURIComponent(singleId(input,"twp note get","\u30CE\u30FC\u30C8","twp note list"))}`}),summarize:body=>pick(record(body,"note",NOTE_LABEL),NOTE_GET_COLUMNS),raw:body=>record(body,"note",NOTE_LABEL),document:noteDocument};
81
+ var MEETING_LABEL="\u8B70\u4E8B\u9332";var meetingPaging=envelopePaging({label:`${MEETING_LABEL}\u4E00\u89A7`});var TAG_FLAG={name:"--tag",summary:`\u30BF\u30B0\u3067\u7D5E\u308A\u8FBC\u3080\uFF08\u8907\u6570\u6307\u5B9A\u53EF\u30FB\u6700\u5927${MEETING_TAGS_MAX}\u500B\uFF09`,takesValue:true,placeholder:"<\u30BF\u30B0>",repeatable:true};function shiftDate(date,offset){const[y,m,d]=date.split("-").map(Number);return new Date(Date.UTC(y,m-1,d+offset)).toISOString().slice(0,10)}function meetingPeriod(input){
82
+ const from=dateFlag(input.flags,"--from");const to=dateFlag(input.flags,"--to");if(from===void 0&&to===void 0)return{};if(from!==void 0&&to!==void 0&&from>to){throw new UsageError(`--from\uFF08${from}\uFF09\u304C --to\uFF08${to}\uFF09\u3088\u308A\u5F8C\u3067\u3059`,"\u671F\u9593\u306F --from <\u958B\u59CB\u65E5> --to <\u7D42\u4E86\u65E5> \u306E\u9806\u3067\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002")}return{start_date:from===void 0?DATE_FLOOR:`${shiftDate(from,-1)}T15:00`,end_date:to===
83
+ void 0?DATE_CEIL:`${to}T14:59~`}}function meetingTags(input){const tags=repeatedValues(input,TAG_FLAG.name).map(tag=>tag.trim());if(tags.length>MEETING_TAGS_MAX)throw new UsageError(`--tag \u306F${MEETING_TAGS_MAX}\u500B\u307E\u3067\u3067\u3059\uFF08${tags.length}\u500B\u6307\u5B9A\u3055\u308C\u307E\u3057\u305F\uFF09`,"\u30B5\u30FC\u30D0\u306E\u4E0A\u9650\u3067\u3059\u3002");for(const tag of tags){if(tag==="")throw new UsageError("--tag \u306B\u7A7A\u306E\u5024\u306F\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093",
84
+ "--tag <\u30BF\u30B0> \u3092\u6307\u5B9A\u3059\u308B\u304B\u3001--tag \u3054\u3068\u5916\u3057\u3066\u304F\u3060\u3055\u3044\u3002");if([...tag].length>MEETING_TAG_MAX_CHARS)throw new UsageError(`--tag \u306F${MEETING_TAG_MAX_CHARS}\u6587\u5B57\u4EE5\u5185\u3067\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044: ${tag}`,"\u30B5\u30FC\u30D0\u306E\u4E0A\u9650\u3067\u3059\u3002")}return Object.fromEntries(tags.map((tag,i)=>[`tags[${i}]`,tag]))}function meetingListQuery(input){return{project_id:input.
85
+ resolved?.["project"],title:boundedText(input,"--keyword",{maxChars:255,label:"\u691C\u7D22\u8A9E"}),...meetingTags(input),status:oneOf(input,"--status",MEETING_STATUSES),meeting_type:oneOf(input,"--type",MEETING_TYPES),...meetingPeriod(input),sort_by:oneOf(input,"--sort",MEETING_SORTS),sort_order:oneOf(input,"--order",SORT_ORDERS),limit:pageLimit(input),cursor:nonEmpty(input.flags,"--cursor")}}var meetingList={name:"list",summary:`${MEETING_LABEL}\u3092\u4E00\u89A7\u3059\u308B\uFF08--from/--to \u3067\u958B\u50AC\u65E5\u306E\u671F\u9593\uFF09`,
86
+ usage:"twp meeting list [--from <\u65E5\u4ED8>] [--to <\u65E5\u4ED8>] [--project <\u30B3\u30FC\u30C9|ID>] [--keyword <\u8A9E>] [--tag <\u30BF\u30B0>]... [--status <\u72B6\u614B>] [--type <\u7A2E\u985E>] [--sort <\u4E26\u3073\u9806>] [--order <asc|desc>] [--all] [--limit <\u4EF6\u6570>]",description:`\u95B2\u89A7\u3067\u304D\u308B\u8B70\u4E8B\u9332\u3060\u3051\u304C\u51FA\u307E\u3059\uFF08\u516C\u958B\u7BC4\u56F2\u306E\u5224\u5B9A\u306F\u30B5\u30FC\u30D0\uFF09\u3002
87
+ --from / --to \u306F\u958B\u50AC\u65E5\uFF08YYYY-MM-DD\u30FB\u65E5\u672C\u6642\u9593\u306E\u65E5\u4ED8\uFF09\u306E\u671F\u9593\u3067\u3001\u4E21\u7AEF\u306E\u65E5\u3092\u542B\u307F\u307E\u3059\u3002\u7247\u65B9\u3060\u3051\u3067\u3082\u6307\u5B9A\u3067\u304D\u307E\u3059\uFF08\u53CD\u5BFE\u5074\u306F\u7121\u5236\u9650\uFF09\u3002
88
+ \uFF08API \u304B\u3089 +09:00 \u306E\u3088\u3046\u306A\u30AA\u30D5\u30BB\u30C3\u30C8\u4ED8\u304D\u306E\u65E5\u6642\u3067\u4F5C\u3063\u305F\u8B70\u4E8B\u9332\u306F\u3001\u30B5\u30FC\u30D0\u304C\u6587\u5B57\u5217\u3067\u6BD4\u3079\u308B\u305F\u3081\u5883\u754C\u306E\u65E5\u304C\u305A\u308C\u308B\u3053\u3068\u304C\u3042\u308A\u307E\u3059\uFF09
89
+ --project \u3092\u7701\u3044\u3066\u3082\u65E2\u5B9A\u306E\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\uFF08TWP_PROJECT \u7B49\uFF09\u3067\u306F\u7D5E\u308A\u8FBC\u307F\u307E\u305B\u3093\u3002
90
+ --keyword \u306F\u30BF\u30A4\u30C8\u30EB\u306E\u8A9E\u3067\u3059\uFF08\u672C\u6587\u306F\u691C\u7D22\u3057\u307E\u305B\u3093\uFF09\u3002
91
+ --status \u306F ${MEETING_STATUSES.join(" / ")}\u3001--type \u306F ${MEETING_TYPES.join(" / ")}\u3001--sort \u306F ${MEETING_SORTS.join(" / ")} \u3067\u3059\u3002
92
+
93
+ --output json \u306F API \u304C\u8FD4\u3059\u5168\u30D5\u30A3\u30FC\u30EB\u30C9\uFF08\u672C\u6587\u30FB\u6587\u5B57\u8D77\u3053\u3057\u3092\u542B\u3080\uFF09\u3092\u51FA\u3057\u307E\u3059\u3002
94
+ --output table / text / tsv \u306F\u8981\u7D04\u5217\uFF08${MEETING_LIST_COLUMNS.join(" / ")}\uFF09\u3067\u3059\u3002\u672C\u6587\u306F twp meeting get \u3067\u8AAD\u3081\u307E\u3059\u3002
95
+
96
+ `+LIST_PAGING_HELP,flags:[...LIST_FLAGS,{name:"--from",summary:"\u958B\u50AC\u65E5\u304C\u3053\u306E\u65E5\u4EE5\u964D\uFF08YYYY-MM-DD\uFF09",takesValue:true,placeholder:"<\u65E5\u4ED8>"},{name:"--to",summary:"\u958B\u50AC\u65E5\u304C\u3053\u306E\u65E5\u4EE5\u524D\uFF08YYYY-MM-DD\uFF09",takesValue:true,placeholder:"<\u65E5\u4ED8>"},{name:"--project",summary:"\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u3067\u7D5E\u308A\u8FBC\u3080\uFF08\u30B3\u30FC\u30C9\u304B ID\uFF09",takesValue:true,placeholder:"<\u30B3\u30FC\
97
+ \u30C9|ID>"},{name:"--keyword",summary:"\u30BF\u30A4\u30C8\u30EB\u306E\u8A9E\u3067\u7D5E\u308A\u8FBC\u3080\uFF08255\u6587\u5B57\u4EE5\u5185\uFF09",takesValue:true,placeholder:"<\u8A9E>"},TAG_FLAG,{name:"--status",summary:`\u72B6\u614B\u3067\u7D5E\u308A\u8FBC\u3080\uFF08${MEETING_STATUSES.join(" / ")}\uFF09`,takesValue:true,placeholder:"<\u72B6\u614B>"},{name:"--type",summary:`\u4F1A\u8B70\u306E\u7A2E\u985E\u3067\u7D5E\u308A\u8FBC\u3080\uFF08${MEETING_TYPES.join(" / ")}\uFF09`,takesValue:true,placeholder:"\
98
+ <\u7A2E\u985E>"},{name:"--sort",summary:`\u4E26\u3073\u9806\uFF08${MEETING_SORTS.join(" / ")}\u3002\u65E2\u5B9A\u306F\u958B\u50AC\u65E5\uFF09`,takesValue:true,placeholder:"<\u4E26\u3073\u9806>"},{name:"--order",summary:"\u6607\u9806\u30FB\u964D\u9806\uFF08asc / desc\uFF09",takesValue:true,placeholder:"<asc|desc>"}],paging:meetingPaging,async prepare(input,ctx){noArgs(input,"twp meeting list");meetingListQuery(input);if(!input.flags.has("--project"))return input;return withResolved(input,{project:await ctx.
99
+ projectId(input.flags.get("--project"))})},plan:input=>({method:"GET",path:MEETINGS_PATH,query:meetingListQuery(input)}),summarize:body=>envelopeRows(body,meetingPaging,`${MEETING_LABEL}\u4E00\u89A7`).map(row=>pick(row,MEETING_LIST_COLUMNS)),raw:body=>envelopeRows(body,meetingPaging,`${MEETING_LABEL}\u4E00\u89A7`),notes:scanTruncatedNote(`${MEETING_LABEL}\u4E00\u89A7`)};function listField(value){if(Array.isArray(value))return value;if(typeof value==="string"&&value.trim().startsWith("[")){try{const parsed=JSON.
100
+ parse(value);if(Array.isArray(parsed))return parsed}catch{}}return[]}function text(value){return typeof value==="string"?oneLine(value):""}function aside(pairs){const parts=pairs.flatMap(([label,value])=>text(value)===""?[]:[`${label}: ${text(value)}`]);return parts.length===0?"":`\uFF08${parts.join("\uFF0F")}\uFF09`}function decisionLines(value){return listField(value).filter(isRecord).flatMap(d=>text(d["decision"])===""?[]:[`- ${text(d["decision"])}${aside([["\u7406\u7531",d["rationale"]],["\u6C7A\u5B9A\
101
+ \u8005",d["decided_by_name"]]])}`]).join("\n")}var ACTION_STATUS_MARK={done:"[x]",in_progress:"[~]"};function actionItemLines(value){return listField(value).filter(isRecord).flatMap(a=>{const description=text(a["description"]);if(description==="")return[];const status=typeof a["status"]==="string"?a["status"]:"";const mark=Object.hasOwn(ACTION_STATUS_MARK,status)?ACTION_STATUS_MARK[status]:"[ ]";return[`- ${mark} ${description}${aside([["\u62C5\u5F53",a["assignee_name"]],["\u671F\u9650",a["deadl\
102
+ ine"]],["\u72B6\u614B",status]])}`]}).join("\n")}function attendeeNames(value,key){return listField(value).filter(isRecord).map(a=>text(a[key])).filter(name=>name!=="")}function meetingDocument(body){const m=record(body,"meeting",MEETING_LABEL);return composeDocument(m["title"],[...metaLine("\u958B\u50AC\u65E5",m["meeting_date"]),...metaLine("\u6240\u8981\u6642\u9593(\u5206)",m["duration_minutes"]),...metaLine("\u7A2E\u985E",m["meeting_type"]),...metaLine("\u72B6\u614B",m["status"]),...metaLine(
103
+ "\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8",m["project_name"]),...metaLine("\u30AB\u30C6\u30B4\u30EA",m["category_name"]),...metaLine("\u53C2\u52A0\u8005",attendeeNames(m["attendees"],"user_name")),...metaLine("\u793E\u5916\u53C2\u52A0\u8005",attendeeNames(m["external_attendees"],"name")),...metaLine("\u30BF\u30B0",m["tags"]),...metaLine("\u4F5C\u6210\u8005",m["created_by_name"]),...metaLine("ID",m["id"])],[{heading:"\u30A2\u30B8\u30A7\u30F3\u30C0",body:meetingContentToText(m["agenda"])},{heading:"\u8B70\u4E8B\
104
+ \u30E1\u30E2",body:meetingContentToText(m["notes"])},{heading:"\u6C7A\u5B9A\u4E8B\u9805",body:decisionLines(m["decisions"])},{heading:"\u30A2\u30AF\u30B7\u30E7\u30F3\u30A2\u30A4\u30C6\u30E0",body:actionItemLines(m["action_items"])},{heading:"AI \u8981\u7D04",body:meetingContentToText(m["ai_summary"])}])}var meetingGet={name:"get",summary:`${MEETING_LABEL}1\u4EF6\u306E\u8A73\u7D30\u3092\u8868\u793A\u3059\u308B\uFF08--output text \u3067\u672C\u6587\u3092\u8AAD\u3080\uFF09`,usage:"twp meeting get <\
105
+ \u8B70\u4E8B\u9332ID>",description:`${TEXT_OUTPUT_HELP}
106
+ \u6587\u66F8\u306B\u306F\u30A2\u30B8\u30A7\u30F3\u30C0\u30FB\u8B70\u4E8B\u30E1\u30E2\u30FB\u6C7A\u5B9A\u4E8B\u9805\u30FB\u30A2\u30AF\u30B7\u30E7\u30F3\u30A2\u30A4\u30C6\u30E0\u30FBAI \u8981\u7D04\u3092\u4E26\u3079\u307E\u3059\u3002
107
+ \u6587\u5B57\u8D77\u3053\u3057\uFF08transcript\uFF09\u306F\u9577\u3044\u306E\u3067\u6587\u66F8\u306B\u5165\u308C\u307E\u305B\u3093\uFF08--query transcript \u3067\u53D6\u308C\u307E\u3059\uFF09\u3002
108
+
109
+ --output table / tsv \u306F\u8981\u7D04\u5217\uFF08${MEETING_GET_COLUMNS.join(" / ")}\uFF09\u3067\u3059\u3002
110
+ \u95B2\u89A7\u3067\u304D\u306A\u3044\u8B70\u4E8B\u9332\u306F\u300C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u300D\u306B\u306A\u308A\u307E\u3059\uFF08\u516C\u958B\u7BC4\u56F2\u306E\u5224\u5B9A\u306F\u30B5\u30FC\u30D0\uFF09\u3002`,flags:[],plan:input=>({method:"GET",path:`${MEETINGS_PATH}/${encodeURIComponent(singleId(input,"twp meeting get","\u8B70\u4E8B\u9332","twp meeting list"))}`}),summarize:body=>pick(record(body,"meeting",MEETING_LABEL),MEETING_GET_COLUMNS),raw:body=>record(body,"meeting",
111
+ MEETING_LABEL),document:meetingDocument};var wikiDomain={name:"wiki",summary:"\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E wiki\uFF08\u4E00\u89A7\u30FB\u89AA\u30DA\u30FC\u30B8\u76F4\u4E0B\u306E\u4E00\u89A7\u30FB\u672C\u6587\u3092\u8AAD\u3080\uFF09",operations:[wikiList,wikiGet]};var noteDomain={name:"note",summary:"\u30CE\u30FC\u30C8\uFF08\u4E00\u89A7\u30FB\u672C\u6587\u3092\u8AAD\u3080\uFF09",operations:[noteList,noteGet]};var meetingDomain={name:"meeting",summary:"\u8B70\u4E8B\u9332\uFF08\u671F\u9593\u3067\u306E\u4E00\u89A7\u30FB\u672C\u6587\u3092\u8AAD\u3080\uFF09",
112
+ operations:[meetingList,meetingGet]};export{meetingDomain,noteDomain,wikiDomain};
@@ -1,7 +1,7 @@
1
1
  import { createRequire as __twpCreateRequire } from 'node:module';
2
2
  const require = __twpCreateRequire(import.meta.url);
3
- import{USER_REF_FLAG,USER_REF_HELP,userPath}from"./chunk-2M2JQ23W.js";import{applyInstancePlan,createInstancePlan,formColumns,writtenInstance}from"./chunk-U6GEC6KI.js";import{assertMonthsOpen,dateFlag}from"./chunk-WYBJLRTG.js";import"./chunk-HGTG5XQ7.js";import"./chunk-ZST7XESB.js";import{ApiError}from"./chunk-IF2K4PM5.js";import{UUID_RE}from"./chunk-GMBJTG6A.js";import{NotLoggedInError,SessionExpiredError}from"./chunk-XNLIEUAW.js";import"./chunk-J7QYPKVK.js";
4
- import"./chunk-4VZKNEVN.js";import"./chunk-NHYMHCAT.js";import"./chunk-R53CMVWR.js";import"./chunk-II5RVJQN.js";import{requireResolved,singleRef,withResolved}from"./chunk-ZN5EFDH7.js";import{isRecord,pick}from"./chunk-ZWVYVS2A.js";import{ApiRejectedError,ApiResponseError,UsageError}from"./chunk-7WSNIXTQ.js";import"./chunk-RZVI6PMW.js";import"./chunk-VSJBJXZO.js";var LIST_USAGE="twp leave list";var GRANTS_USAGE="twp leave grants [<\u30E6\u30FC\u30B6\u30FC> | --user <\u30E6\u30FC\u30B6\u30FC>]";var USAGE_COLUMNS=["used_date","type_label","days","hours","status_label","reason","is_post_application","id"];var GRANT_COLUMNS=["grant_date","type_label","days","remaining_days","remaining_hours","expiry_date","status_label","reason","id"];function noArgs(input,operation){if(input.args.length>0){throw new UsageError(`${operation} \u306F\u4F4D\u7F6E\u5F15\u6570\u3092\u53D7\u3051\u53D6\u308A\u307E\u305B\u3093: ${input.
3
+ import{USER_REF_FLAG,USER_REF_HELP,userPath}from"./chunk-2M2JQ23W.js";import{applyInstancePlan,createInstancePlan,formColumns,writtenInstance}from"./chunk-OHIERIBW.js";import{assertMonthsOpen}from"./chunk-GPIIXDEX.js";import{dateFlag}from"./chunk-3RAGOW6X.js";import"./chunk-HGTG5XQ7.js";import"./chunk-ZST7XESB.js";import{ApiError}from"./chunk-IF2K4PM5.js";import{UUID_RE}from"./chunk-GMBJTG6A.js";import{NotLoggedInError,SessionExpiredError}from"./chunk-XNLIEUAW.js";
4
+ import"./chunk-J7QYPKVK.js";import"./chunk-4VZKNEVN.js";import"./chunk-NHYMHCAT.js";import"./chunk-5R4SEO3I.js";import"./chunk-II5RVJQN.js";import{requireResolved,singleRef,withResolved}from"./chunk-ZN5EFDH7.js";import{isRecord,pick}from"./chunk-ZWVYVS2A.js";import{ApiRejectedError,ApiResponseError,UsageError}from"./chunk-7WSNIXTQ.js";import"./chunk-RZVI6PMW.js";import"./chunk-VSJBJXZO.js";var LIST_USAGE="twp leave list";var GRANTS_USAGE="twp leave grants [<\u30E6\u30FC\u30B6\u30FC> | --user <\u30E6\u30FC\u30B6\u30FC>]";var USAGE_COLUMNS=["used_date","type_label","days","hours","status_label","reason","is_post_application","id"];var GRANT_COLUMNS=["grant_date","type_label","days","remaining_days","remaining_hours","expiry_date","status_label","reason","id"];function noArgs(input,operation){if(input.args.length>0){throw new UsageError(`${operation} \u306F\u4F4D\u7F6E\u5F15\u6570\u3092\u53D7\u3051\u53D6\u308A\u307E\u305B\u3093: ${input.
5
5
  args.join(" ")}`,`twp leave ${operation} help`)}}function summaryBody(body){if(!isRecord(body)||!isRecord(body["summary"])){throw new ApiResponseError("\u6709\u7D66\u30B5\u30DE\u30EA\u306E\u5FDC\u7B54\u306B summary \u304C\u3042\u308A\u307E\u305B\u3093\u3002\u63A5\u7D9A\u5148\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002")}return body}function usagesBody(body){if(!isRecord(body)||!Array.isArray(body["usages"])){throw new ApiResponseError("\u6709\u7D66\u306E\u53D6\u5F97\u5C65\u6B74\u306E\u5FDC\u7B54\u306B usages \u304C\u3042\u308A\u307E\u305B\u3093\u3002\u63A5\u7D9A\u5148\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002")}
6
6
  return body}function grantsBody(body){if(!isRecord(body)||!Array.isArray(body["grants"])){throw new ApiResponseError("\u6709\u7D66\u306E\u4ED8\u4E0E\u5C65\u6B74\u306E\u5FDC\u7B54\u306B grants \u304C\u3042\u308A\u307E\u305B\u3093\u3002\u63A5\u7D9A\u5148\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002")}return body}function listBody(body){const combined=isRecord(body)?body:{};return{summary:summaryBody(combined["summary"]),usages:usagesBody(combined["usages"])}}async function list(input,ctx){
7
7
  const summary=summaryBody(await ctx.send(listPlan(input)));const usages=await ctx.send({method:"GET",path:"/api/v1/paid-leave/me/usages"});return{summary,usages}}function listPlan(input){noArgs(input,"list");return{method:"GET",path:"/api/v1/paid-leave/me"}}function listNotes(body){const{summary:sheet}=listBody(body);const summary=sheet["summary"];const hours=typeof summary["total_remaining_hours"]==="number"&&summary["total_remaining_hours"]>0?` ${String(summary["total_remaining_hours"])} \u6642\u9593`:
@@ -1,6 +1,6 @@
1
1
  import { createRequire as __twpCreateRequire } from 'node:module';
2
2
  const require = __twpCreateRequire(import.meta.url);
3
- import{contentTypeFor,inspectLocalFile}from"./chunk-VECUCVIY.js";import{checkUploadQuota}from"./chunk-DDKZ5IPT.js";import"./chunk-ZST7XESB.js";import"./chunk-IF2K4PM5.js";import{isSafePathSegment}from"./chunk-GMBJTG6A.js";import"./chunk-J7QYPKVK.js";import"./chunk-4VZKNEVN.js";import"./chunk-NHYMHCAT.js";import"./chunk-GY7KI5E5.js";import{LIST_FLAGS,LIST_PAGING_HELP,envelopePaging,nonEmpty,positiveInteger}from"./chunk-R53CMVWR.js";import"./chunk-II5RVJQN.js";
3
+ import{contentTypeFor,inspectLocalFile}from"./chunk-VECUCVIY.js";import{checkUploadQuota}from"./chunk-DDKZ5IPT.js";import"./chunk-ZST7XESB.js";import"./chunk-IF2K4PM5.js";import{isSafePathSegment}from"./chunk-GMBJTG6A.js";import"./chunk-J7QYPKVK.js";import"./chunk-4VZKNEVN.js";import"./chunk-NHYMHCAT.js";import"./chunk-GY7KI5E5.js";import{LIST_FLAGS,LIST_PAGING_HELP,envelopePaging,nonEmpty,positiveInteger}from"./chunk-5R4SEO3I.js";import"./chunk-II5RVJQN.js";
4
4
  import{requireResolved,singleRef,withResolved}from"./chunk-ZN5EFDH7.js";import{isRecord,pick}from"./chunk-ZWVYVS2A.js";import{ApiRejectedError,ApiResponseError,UsageError}from"./chunk-7WSNIXTQ.js";import"./chunk-RZVI6PMW.js";import"./chunk-VSJBJXZO.js";import crypto from"crypto";import fs from"fs";import path from"path";var SCOPE_PERSONAL="personal";var SCOPE_PROJECT="project";var LIST_COLUMNS=["id","file_name","content_type","file_size","folder_id","public_status","updated_at"];var UPLOAD_COLUMNS=["id","file_name","content_type","file_size","folder_id","scope","content_hash"];var FILE_FLAG={name:"--file",summary:"\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3059\u308B\u30ED\u30FC\u30AB\u30EB\u30D5\u30A1\u30A4\u30EB\u306E\u30D1\u30B9\uFF08\u5FC5\u9808\uFF09",takesValue:true,placeholder:"<\u30D1\u30B9>"};var NAME_FLAG={
5
5
  name:"--name",summary:"\u4FDD\u5B58\u3059\u308B\u30D5\u30A1\u30A4\u30EB\u540D\uFF08\u7701\u7565\u6642\u306F\u30ED\u30FC\u30AB\u30EB\u306E\u30D5\u30A1\u30A4\u30EB\u540D\u3002\u540C\u540D\u304C\u3042\u308B\u3068\u30B5\u30FC\u30D0\u304C\u5225\u540D\u306B\u3057\u307E\u3059\uFF09",takesValue:true,placeholder:"<\u30D5\u30A1\u30A4\u30EB\u540D>"};var CONTENT_TYPE_FLAG={name:"--content-type",summary:"Content-Type\uFF08\u7701\u7565\u6642\u306F\u62E1\u5F35\u5B50\u304B\u3089\u63A8\u5B9A\u3002\u4E0D\u660E\u306A\u3089 application/octet-stream\uFF09",
6
6
  takesValue:true,placeholder:"<\u578B>"};var FOLDER_FLAG={name:"--folder",summary:"\u30D5\u30A9\u30EB\u30C0ID\uFF08\u7701\u7565\u6642\u306F\u30B9\u30B3\u30FC\u30D7\u306E\u6700\u4E0A\u4F4D\uFF09",takesValue:true,placeholder:"<\u30D5\u30A9\u30EB\u30C0ID>"};var MEDIA_PROJECT_FLAG={name:"--project",summary:"\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u5BFE\u8C61\u306B\u3059\u308B\uFF08\u30B3\u30FC\u30C9\u307E\u305F\u306F ID\uFF09\u3002\u7701\u7565\u6642\u306F\u81EA\u5206\u306E\u500B\u4EBA\u30D5\u30A1\u30A4\u30EB",
@@ -1,6 +1,6 @@
1
1
  import { createRequire as __twpCreateRequire } from 'node:module';
2
2
  const require = __twpCreateRequire(import.meta.url);
3
- import{boundedText}from"./chunk-UDPJ2IGK.js";import{NOTIFICATIONS_PATH}from"./chunk-ZST7XESB.js";import"./chunk-IF2K4PM5.js";import{isSafePathSegment}from"./chunk-GMBJTG6A.js";import"./chunk-J7QYPKVK.js";import"./chunk-4VZKNEVN.js";import"./chunk-NHYMHCAT.js";import{LIST_FLAGS,LIST_PAGING_HELP,envelopePaging,nonEmpty,positiveInteger}from"./chunk-R53CMVWR.js";import"./chunk-II5RVJQN.js";import{requireResolved,withResolved}from"./chunk-ZN5EFDH7.js";
3
+ import{boundedText}from"./chunk-UDPJ2IGK.js";import{NOTIFICATIONS_PATH}from"./chunk-ZST7XESB.js";import"./chunk-IF2K4PM5.js";import{isSafePathSegment}from"./chunk-GMBJTG6A.js";import"./chunk-J7QYPKVK.js";import"./chunk-4VZKNEVN.js";import"./chunk-NHYMHCAT.js";import{LIST_FLAGS,LIST_PAGING_HELP,envelopePaging,nonEmpty,positiveInteger}from"./chunk-5R4SEO3I.js";import"./chunk-II5RVJQN.js";import{requireResolved,withResolved}from"./chunk-ZN5EFDH7.js";
4
4
  import{isRecord,pick}from"./chunk-ZWVYVS2A.js";import{ApiResponseError,UsageError}from"./chunk-7WSNIXTQ.js";import"./chunk-RZVI6PMW.js";import"./chunk-VSJBJXZO.js";var LABEL="\u901A\u77E5";var LIST_COLUMNS=["id","datetime","category_name","status_name","title"];var GET_COLUMNS=["id","datetime","category","category_name","status_name","read_time","title","content","url"];var CATEGORY_FLAG={name:"--category",summary:"\u901A\u77E5\u30AB\u30C6\u30B4\u30EA\u3067\u7D5E\u308A\u8FBC\u3080\uFF08\u30AD\u30FC\u304B\u540D\u524D\u3002twp notification categories \u3067\u4E00\u89A7\u3067\u304D\u308B\uFF09",takesValue:true,placeholder:"<\u30AB\u30C6\u30B4\u30EA>"};var CATEGORY_HELP="\
5
5
  --category \u306F\u30AB\u30C6\u30B4\u30EA\u306E\u30AD\u30FC\uFF08workflow_approval\uFF09\u304B\u540D\u524D\uFF08\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u627F\u8A8D\u4F9D\u983C\uFF09\u3067\u6307\u5B9A\u3067\u304D\u307E\u3059\u3002\n\u30AB\u30C6\u30B4\u30EA\u4E00\u89A7\u3068\u7167\u5408\u3059\u308B\u306E\u3067\u3001\u6253\u3061\u9593\u9055\u3048\u305F\u30AB\u30C6\u30B4\u30EA\u3092\u300C0\u4EF6\u300D\u3068\u3057\u3066\u8FD4\u3059\u3053\u3068\u306F\u3042\u308A\u307E\u305B\u3093\uFF08\u4E00\u89A7\u306F\u65E2\u5B9A10\u5206\u30AD\u30E3\u30C3\u30B7\u30E5\u30FB--refresh \u3067\u53D6\u308A\u76F4\u3057\uFF09\u3002";
6
6
  async function resolveCategory(input,ctx){const raw=nonEmpty(input.flags,CATEGORY_FLAG.name);if(raw===void 0)return input;return withResolved(input,{category:(await ctx.resolver.notificationCategory(raw.trim())).id})}function noArgs(input,op){if(input.args.length>0){throw new UsageError(`${op} \u306F\u4F4D\u7F6E\u5F15\u6570\u3092\u53D6\u308A\u307E\u305B\u3093: ${input.args.join(" ")}`,`twp notification ${op} help`)}}function notificationId(input,op){const[raw,...rest]=input.args;const id=raw?.trim()??
@@ -1,6 +1,6 @@
1
1
  import { createRequire as __twpCreateRequire } from 'node:module';
2
2
  const require = __twpCreateRequire(import.meta.url);
3
- import{STATUS_VALUES,booleanQuery,flatMasterDomain}from"./chunk-KA3EE4TJ.js";import"./chunk-UDPJ2IGK.js";import{POSITIONS_PATH}from"./chunk-ZST7XESB.js";import"./chunk-IF2K4PM5.js";import"./chunk-GMBJTG6A.js";import"./chunk-J7QYPKVK.js";import"./chunk-4VZKNEVN.js";import"./chunk-NHYMHCAT.js";import"./chunk-R53CMVWR.js";import"./chunk-II5RVJQN.js";import"./chunk-ZN5EFDH7.js";import"./chunk-ZWVYVS2A.js";import"./chunk-7WSNIXTQ.js";
3
+ import{STATUS_VALUES,booleanQuery,flatMasterDomain}from"./chunk-IRT7VFG4.js";import"./chunk-UDPJ2IGK.js";import{POSITIONS_PATH}from"./chunk-ZST7XESB.js";import"./chunk-IF2K4PM5.js";import"./chunk-GMBJTG6A.js";import"./chunk-J7QYPKVK.js";import"./chunk-4VZKNEVN.js";import"./chunk-NHYMHCAT.js";import"./chunk-5R4SEO3I.js";import"./chunk-II5RVJQN.js";import"./chunk-ZN5EFDH7.js";import"./chunk-ZWVYVS2A.js";import"./chunk-7WSNIXTQ.js";
4
4
  import"./chunk-RZVI6PMW.js";import"./chunk-VSJBJXZO.js";var positionDomain=flatMasterDomain({name:"position",label:"\u5F79\u8077",path:POSITIONS_PATH,itemKey:"position",summary:"\u5F79\u8077\u30DE\u30B9\u30BF\uFF08\u4E00\u89A7\u30FB\u53D6\u5F97\u30FB\u4F5C\u6210\u30FB\u66F4\u65B0\u30FB\u524A\u9664\uFF09",listColumns:["id","code","name","rank","is_manager","status","user_count"],getColumns:["id","code","name","name_short","rank","is_manager","status","description"],fields:[{kind:"text",flag:"--name-short",key:"name_short",label:"\u7565\u79F0",maxChars:50,
5
5
  summary:"\u7565\u79F0"},{kind:"integer",flag:"--rank",key:"rank",label:"\u30E9\u30F3\u30AF",min:0,max:9999,summary:"\u30E9\u30F3\u30AF\uFF080\u301C9999\u3002\u5927\u304D\u3044\u307B\u3069\u4E0A\u4F4D\uFF09"},{kind:"boolean",flag:"--manager",key:"is_manager",summary:"\u7BA1\u7406\u8077\u304B\uFF08true / false\uFF09"},{kind:"boolean",flag:"--can-view-personal-info",key:"can_view_personal_info",summary:"\u90E8\u4E0B\u306E\u500B\u4EBA\u60C5\u5831\u3092\u95B2\u89A7\u3067\u304D\u308B\u304B\uFF08true / false\uFF09"},
6
6
  {kind:"boolean",flag:"--can-view-emergency-contact",key:"can_view_emergency_contact",summary:"\u90E8\u4E0B\u306E\u7DCA\u6025\u9023\u7D61\u5148\u3092\u95B2\u89A7\u3067\u304D\u308B\u304B\uFF08true / false\uFF09"},{kind:"boolean",flag:"--can-view-work-tel",key:"can_view_work_tel",summary:"\u90E8\u4E0B\u306E\u696D\u52D9\u7528\u96FB\u8A71\u756A\u53F7\u3092\u95B2\u89A7\u3067\u304D\u308B\u304B\uFF08true / false\uFF09"},{kind:"enum",flag:"--status",key:"status",values:STATUS_VALUES,summary:"\u72B6\u614B\uFF08active: \u6709\
@@ -1,6 +1,6 @@
1
1
  import { createRequire as __twpCreateRequire } from 'node:module';
2
2
  const require = __twpCreateRequire(import.meta.url);
3
- import{collapsesInUrlPath,safeProjectIdPolicy}from"./chunk-GMBJTG6A.js";import{LIST_FLAGS,LIST_PAGING_HELP,envelopePaging,nonEmpty,positiveInteger}from"./chunk-R53CMVWR.js";import{requireResolved,withResolved}from"./chunk-ZN5EFDH7.js";import{isRecord,pick}from"./chunk-ZWVYVS2A.js";import{ApiResponseError,UsageError}from"./chunk-7WSNIXTQ.js";import"./chunk-VSJBJXZO.js";var LIST_COLUMNS=["id","code","name","status","effective_status"];var GET_COLUMNS=["id","code","name","status","effective_status","display_flg","closed_flg","task_enabled_flg","start_date","end_date","created_at","updated_at"];var MEMBER_COLUMNS=["user_id","user_name","user_email","role","alias","department_name"];function memberItems(body){const list=isRecord(body)?body["list"]:void 0;if(!Array.isArray(list)){throw new ApiResponseError("\u30E1\u30F3\u30D0\u30FC\u4E00\u89A7\u306E\u5FDC\u7B54\u306B list \u914D\u5217\u304C\u3042\u308A\u307E\u305B\u3093\u3002\u63A5\u7D9A\u5148\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002")}
3
+ import{collapsesInUrlPath,safeProjectIdPolicy}from"./chunk-GMBJTG6A.js";import{LIST_FLAGS,LIST_PAGING_HELP,envelopePaging,nonEmpty,positiveInteger}from"./chunk-5R4SEO3I.js";import{requireResolved,withResolved}from"./chunk-ZN5EFDH7.js";import{isRecord,pick}from"./chunk-ZWVYVS2A.js";import{ApiResponseError,UsageError}from"./chunk-7WSNIXTQ.js";import"./chunk-VSJBJXZO.js";var LIST_COLUMNS=["id","code","name","status","effective_status"];var GET_COLUMNS=["id","code","name","status","effective_status","display_flg","closed_flg","task_enabled_flg","start_date","end_date","created_at","updated_at"];var MEMBER_COLUMNS=["user_id","user_name","user_email","role","alias","department_name"];function memberItems(body){const list=isRecord(body)?body["list"]:void 0;if(!Array.isArray(list)){throw new ApiResponseError("\u30E1\u30F3\u30D0\u30FC\u4E00\u89A7\u306E\u5FDC\u7B54\u306B list \u914D\u5217\u304C\u3042\u308A\u307E\u305B\u3093\u3002\u63A5\u7D9A\u5148\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002")}
4
4
  return list}var listPaging=envelopePaging({label:"\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u4E00\u89A7"});function listItems(body){return listPaging.items(body)}function projectObject(body){const project=isRecord(body)?body["project"]:void 0;if(!isRecord(project)){throw new ApiResponseError("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u8A73\u7D30\u306E\u5FDC\u7B54\u306B project \u304C\u3042\u308A\u307E\u305B\u3093\u3002\u63A5\u7D9A\u5148\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002")}return project}
5
5
  var projectDomain={name:"project",summary:"\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u4E00\u89A7\u30FB\u8A73\u7D30",operations:[{name:"list",summary:"\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u3092\u4E00\u89A7\u3059\u308B",usage:"twp project list [--all] [--limit <\u4EF6\u6570>] [--cursor <\u30AB\u30FC\u30BD\u30EB>] [--keyword <\u8A9E>] [--status <\u72B6\u614B>]",description:"--output json \u306F API \u304C\u8FD4\u3059\u5168\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u51FA\u3057\u307E\u3059\u3002\n--output table / text / tsv \u306F\u8981\u7D04\u5217\uFF08id / code / name / status / effective_status\uFF09\u3067\u3059\u3002\n\u6B32\u3057\u3044\u5217\u3060\u3051\u3092\
6
6
  \u6A5F\u68B0\u51E6\u7406\u3057\u305F\u3044\u3068\u304D\u306F --query \u3067\u9078\u3093\u3067\u304F\u3060\u3055\u3044\uFF08--query \u306F\u751F\u30C7\u30FC\u30BF\u306B\u5BFE\u3057\u3066\u8A55\u4FA1\u3055\u308C\u307E\u3059\uFF09\u3002\n\n"+LIST_PAGING_HELP,flags:[...LIST_FLAGS,{name:"--keyword",summary:"\u30B3\u30FC\u30C9\u30FB\u540D\u79F0\u306E\u90E8\u5206\u4E00\u81F4\u3067\u7D5E\u308A\u8FBC\u3080",takesValue:true,placeholder:"<\u8A9E>"},{name:"--status",summary:"\u30B9\u30C6\u30FC\u30BF\u30B9\u3067\u7D5E\u308A\u8FBC\u3080\uFF08\u4F8B: active\uFF09",
@@ -1,7 +1,7 @@
1
1
  import { createRequire as __twpCreateRequire } from 'node:module';
2
2
  const require = __twpCreateRequire(import.meta.url);
3
- import{CUSTOMER_LICENSE,INTERACTION_FIELDS,INTERACTION_TYPES,dataOf,levelForbidden}from"./chunk-4CVLBR42.js";import"./chunk-I6DWJXPC.js";import"./chunk-VECUCVIY.js";import"./chunk-DDKZ5IPT.js";import"./chunk-SN6YG4SF.js";import{createFlags,fieldBody,hasAnyField,resolveRefFields,updateFlags}from"./chunk-KA3EE4TJ.js";import{repeatedValues}from"./chunk-IOGVQVGD.js";import"./chunk-UDPJ2IGK.js";import{PROSPECTS_PATH}from"./chunk-ZST7XESB.js";import{
4
- MultipartBody}from"./chunk-IF2K4PM5.js";import{isSafePathSegment}from"./chunk-GMBJTG6A.js";import"./chunk-J7QYPKVK.js";import"./chunk-4VZKNEVN.js";import"./chunk-QQRJLH6B.js";import"./chunk-NHYMHCAT.js";import"./chunk-GY7KI5E5.js";import{LIST_FLAGS,LIST_PAGING_HELP,envelopePaging,nonEmpty,positiveInteger}from"./chunk-R53CMVWR.js";import"./chunk-II5RVJQN.js";import{requireResolved,singleRef,withResolved}from"./chunk-ZN5EFDH7.js";import{acknowledgement,
3
+ import{CUSTOMER_LICENSE,INTERACTION_FIELDS,INTERACTION_TYPES,dataOf,levelForbidden}from"./chunk-57HDZYSN.js";import"./chunk-I6DWJXPC.js";import"./chunk-VECUCVIY.js";import"./chunk-DDKZ5IPT.js";import"./chunk-ADQD5OPN.js";import{createFlags,fieldBody,hasAnyField,resolveRefFields,updateFlags}from"./chunk-IRT7VFG4.js";import{repeatedValues}from"./chunk-IOGVQVGD.js";import"./chunk-UDPJ2IGK.js";import{PROSPECTS_PATH}from"./chunk-ZST7XESB.js";import{
4
+ MultipartBody}from"./chunk-IF2K4PM5.js";import{isSafePathSegment}from"./chunk-GMBJTG6A.js";import"./chunk-J7QYPKVK.js";import"./chunk-4VZKNEVN.js";import"./chunk-QQRJLH6B.js";import"./chunk-NHYMHCAT.js";import"./chunk-GY7KI5E5.js";import{LIST_FLAGS,LIST_PAGING_HELP,envelopePaging,nonEmpty,positiveInteger}from"./chunk-5R4SEO3I.js";import"./chunk-II5RVJQN.js";import{requireResolved,singleRef,withResolved}from"./chunk-ZN5EFDH7.js";import{acknowledgement,
5
5
  isRecord,pick}from"./chunk-ZWVYVS2A.js";import{ApiRejectedError,ApiResponseError,UsageError}from"./chunk-7WSNIXTQ.js";import"./chunk-RZVI6PMW.js";import"./chunk-VSJBJXZO.js";import fs from"fs";import path from"path";var VIEW_FORBIDDEN=levelForbidden(CUSTOMER_LICENSE,"\u30A2\u30D7\u30ED\u30FC\u30C1\u5148\u3092\u898B\u308B\u306B\u306F\u9867\u5BA2\u7BA1\u7406\u306E\u6A29\u9650\u304C\u8981\u308A\u307E\u3059\u3002\u30C6\u30CA\u30F3\u30C8\u7BA1\u7406\u8005\u306B\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002");var EDIT_FORBIDDEN=levelForbidden(CUSTOMER_LICENSE,"\u30A2\u30D7\u30ED\u30FC\u30C1\u5148\u306E\u767B\u9332\u30FB\u66F4\u65B0\u306B\u306F\u9867\u5BA2\u7BA1\u7406\u306E\u6A29\u9650\u304C\u300C\u7DE8\u96C6\u8005\u300D\u4EE5\u4E0A\u3067\u3042\u308B\u3053\u3068\u304C\u8981\u308A\u307E\u3059\u3002\u30C6\u30CA\u30F3\u30C8\u7BA1\u7406\u8005\u306B\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002");
6
6
  function adminForbidden(what){return levelForbidden(CUSTOMER_LICENSE,`${what}\u306B\u306F\u9867\u5BA2\u7BA1\u7406\u306E\u6A29\u9650\u304C\u300C\u7BA1\u7406\u8005\u300D\u3067\u3042\u308B\u3053\u3068\u304C\u8981\u308A\u307E\u3059\uFF08\u300C\u7DE8\u96C6\u8005\u300D\u3067\u306F\u3067\u304D\u307E\u305B\u3093\uFF09\u3002\u30C6\u30CA\u30F3\u30C8\u7BA1\u7406\u8005\u306B\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002`)}var ASSIGNABLE_STATUSES=["new","approaching","responded","appointment","reject\
7
7
  ed","on_hold"];var FILTER_STATUSES=[...ASSIGNABLE_STATUSES,"promoted"];var NEXT_ACTION_FILTERS=["overdue","today","this_week"];var STATUS_HELP="new=\u672A\u30A2\u30D7\u30ED\u30FC\u30C1 / approaching=\u30A2\u30D7\u30ED\u30FC\u30C1\u4E2D / responded=\u53CD\u5FDC\u3042\u308A / appointment=\u30A2\u30DD\u7372\u5F97 / rejected=\u62D2\u5426\u30FB\u898B\u8FBC\u307F\u306A\u3057 / on_hold=\u4FDD\u7559";var ASSIGNEE_FIELD={kind:"ref",flag:"--assignee",key:"assignee_user_id",summary:"\u55B6\u696D\u62C5\u5F53\uFF08\u30E6\u30FC\u30B6\u30FC\u3002ID\u30FB\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u30FB\u793E\u54E1\
@@ -1,3 +1,3 @@
1
1
  import { createRequire as __twpCreateRequire } from 'node:module';
2
2
  const require = __twpCreateRequire(import.meta.url);
3
- import{loadDomain}from"./chunk-R64SA5WZ.js";import"./chunk-VSJBJXZO.js";export{loadDomain};
3
+ import{loadDomain}from"./chunk-GLBQAXWC.js";import"./chunk-VSJBJXZO.js";export{loadDomain};
@@ -0,0 +1,3 @@
1
+ import { createRequire as __twpCreateRequire } from 'node:module';
2
+ const require = __twpCreateRequire(import.meta.url);
3
+ import{renderDocument,renderOutput}from"./chunk-FEOST3GF.js";import"./chunk-BUZKNZ45.js";import"./chunk-K2ONOH3L.js";import"./chunk-WVS4W5FY.js";import"./chunk-NHYMHCAT.js";import"./chunk-VSJBJXZO.js";export{renderDocument,renderOutput};
@@ -1,6 +1,6 @@
1
1
  import { createRequire as __twpCreateRequire } from 'node:module';
2
2
  const require = __twpCreateRequire(import.meta.url);
3
- import{charCount,readBody}from"./chunk-HGTG5XQ7.js";import{REPORTS_PATH}from"./chunk-ZST7XESB.js";import"./chunk-IF2K4PM5.js";import{UUID_RE,isSafePathSegment}from"./chunk-GMBJTG6A.js";import"./chunk-J7QYPKVK.js";import"./chunk-4VZKNEVN.js";import"./chunk-NHYMHCAT.js";import{LIST_FLAGS,LIST_PAGING_HELP,envelopePaging,nonEmpty,positiveInteger}from"./chunk-R53CMVWR.js";import"./chunk-II5RVJQN.js";import{requireResolved,singleRef,withResolved}from"./chunk-ZN5EFDH7.js";
3
+ import{charCount,readBody}from"./chunk-HGTG5XQ7.js";import{REPORTS_PATH}from"./chunk-ZST7XESB.js";import"./chunk-IF2K4PM5.js";import{UUID_RE,isSafePathSegment}from"./chunk-GMBJTG6A.js";import"./chunk-J7QYPKVK.js";import"./chunk-4VZKNEVN.js";import"./chunk-NHYMHCAT.js";import{LIST_FLAGS,LIST_PAGING_HELP,envelopePaging,nonEmpty,positiveInteger}from"./chunk-5R4SEO3I.js";import"./chunk-II5RVJQN.js";import{requireResolved,singleRef,withResolved}from"./chunk-ZN5EFDH7.js";
4
4
  import{isRecord,pick}from"./chunk-ZWVYVS2A.js";import{ApiResponseError,UsageError}from"./chunk-7WSNIXTQ.js";import"./chunk-RZVI6PMW.js";import"./chunk-VSJBJXZO.js";var LABEL="\u30EC\u30DD\u30FC\u30C8";var STATUSES={new:"\u4E0B\u66F8\u304D",completed:"\u63D0\u51FA\u6E08\u307F",reviewed:"\u78BA\u8A8D\u6E08\u307F",rejected:"\u5DEE\u3057\u623B\u3057"};var STATUS_HELP=`\u72B6\u614B: ${Object.entries(STATUSES).map(([key,name])=>`${key}\uFF08${name}\uFF09`).join(" / ")}`;var TITLE_MAX_CHARS=200;var CONTENT_MAX_CHARS=1e6;var CONTENT_KEYS=["title","content"];var ULID_RE=/^[0-9A-HJKMNP-TV-Z]{26}$/i;var LIST_COLUMNS=["id","title","format_name","status","created_at","\
5
5
  updated_at","completed_at"];var GET_COLUMNS=["id","title","format_name","status","status_label","created_at","updated_at","completed_at","reviewed_at","reviewed_by_name","rejected_by_name"];var WRITE_COLUMNS=["id","title","format_id","status","status_label","created_at","updated_at","completed_at"];var FORMAT_COLUMNS=["id","code","name","is_available","title_editable","writer","reviewer","admin"];var FORMAT_FLAG={name:"--format",summary:"\u30EC\u30DD\u30FC\u30C8\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u306E\u540D\u524D\u30FB\u30B3\u30FC\u30C9\uFF08RF-000001\uFF09\u30FBID",
6
6
  takesValue:true,placeholder:"<\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8>"};var CONTENT_FILE_FLAG={name:"--content-file",summary:"\u30EC\u30DD\u30FC\u30C8\u306E\u5185\u5BB9\u306E JSON \u30D5\u30A1\u30A4\u30EB\uFF08title / content\u30FB- \u3067\u6A19\u6E96\u5165\u529B\uFF09",takesValue:true,placeholder:"<\u30D1\u30B9>"};var SKELETON_FLAG={name:"--generate-cli-skeleton",summary:"\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u306E\u5165\u529B\u9805\u76EE\u304B\u3089 --content-file \u306E\u3072\u306A\u5F62\u3092\u51FA\u3057\u3066\u7D42\u4E86\u3059\u308B\uFF08\u30EC\u30DD\u30FC\u30C8\u306F\u4F5C\u3089\u306A\u3044\uFF09",
@@ -1,4 +1,4 @@
1
1
  import { createRequire as __twpCreateRequire } from 'node:module';
2
2
  const require = __twpCreateRequire(import.meta.url);
3
- import{CURATED_PAGING_VOCABULARY,buildPrepareContext,exitCodeFor,fetchAllPages,outputValue,reportError,requiresYes,resolvePaging,runDomain}from"./chunk-KSWRKHKU.js";import"./chunk-6NEQ6PZZ.js";import"./chunk-BUZKNZ45.js";import"./chunk-R64SA5WZ.js";import"./chunk-GDM2QUBL.js";import"./chunk-IOGVQVGD.js";import"./chunk-ZST7XESB.js";import"./chunk-IF2K4PM5.js";import"./chunk-GMBJTG6A.js";import"./chunk-TAN5I2DP.js";import"./chunk-XNLIEUAW.js";
4
- import"./chunk-J7QYPKVK.js";import"./chunk-4VZKNEVN.js";import"./chunk-523KROGI.js";import"./chunk-QQRJLH6B.js";import"./chunk-K2ONOH3L.js";import"./chunk-WVS4W5FY.js";import"./chunk-NHYMHCAT.js";import"./chunk-R53CMVWR.js";import"./chunk-II5RVJQN.js";import"./chunk-7WSNIXTQ.js";import"./chunk-RZVI6PMW.js";import"./chunk-VSJBJXZO.js";export{CURATED_PAGING_VOCABULARY,buildPrepareContext,exitCodeFor,fetchAllPages,outputValue,reportError,requiresYes,resolvePaging,runDomain};
3
+ import{CURATED_PAGING_VOCABULARY,buildPrepareContext,exitCodeFor,fetchAllPages,outputValue,reportError,requiresYes,resolvePaging,runDomain}from"./chunk-LS7P3IWP.js";import"./chunk-GDM2QUBL.js";import"./chunk-FEOST3GF.js";import"./chunk-BUZKNZ45.js";import"./chunk-GLBQAXWC.js";import"./chunk-IOGVQVGD.js";import"./chunk-ZST7XESB.js";import"./chunk-IF2K4PM5.js";import"./chunk-GMBJTG6A.js";import"./chunk-TAN5I2DP.js";import"./chunk-XNLIEUAW.js";
4
+ import"./chunk-J7QYPKVK.js";import"./chunk-4VZKNEVN.js";import"./chunk-O4NSYHR4.js";import"./chunk-QQRJLH6B.js";import"./chunk-K2ONOH3L.js";import"./chunk-WVS4W5FY.js";import"./chunk-NHYMHCAT.js";import"./chunk-5R4SEO3I.js";import"./chunk-II5RVJQN.js";import"./chunk-7WSNIXTQ.js";import"./chunk-RZVI6PMW.js";import"./chunk-VSJBJXZO.js";export{CURATED_PAGING_VOCABULARY,buildPrepareContext,exitCodeFor,fetchAllPages,outputValue,reportError,requiresYes,resolvePaging,runDomain};
@@ -1,4 +1,4 @@
1
1
  import { createRequire as __twpCreateRequire } from 'node:module';
2
2
  const require = __twpCreateRequire(import.meta.url);
3
- import{estimateDomain,featureLicenseGuidance,invoiceDomain,licenseForbidden}from"./chunk-SN6YG4SF.js";import"./chunk-IOGVQVGD.js";import"./chunk-UDPJ2IGK.js";import"./chunk-ZST7XESB.js";import"./chunk-IF2K4PM5.js";import"./chunk-GMBJTG6A.js";import"./chunk-J7QYPKVK.js";import"./chunk-4VZKNEVN.js";import"./chunk-QQRJLH6B.js";import"./chunk-NHYMHCAT.js";import"./chunk-R53CMVWR.js";import"./chunk-II5RVJQN.js";import"./chunk-ZN5EFDH7.js";
3
+ import{estimateDomain,featureLicenseGuidance,invoiceDomain,licenseForbidden}from"./chunk-ADQD5OPN.js";import"./chunk-IOGVQVGD.js";import"./chunk-UDPJ2IGK.js";import"./chunk-ZST7XESB.js";import"./chunk-IF2K4PM5.js";import"./chunk-GMBJTG6A.js";import"./chunk-J7QYPKVK.js";import"./chunk-4VZKNEVN.js";import"./chunk-QQRJLH6B.js";import"./chunk-NHYMHCAT.js";import"./chunk-5R4SEO3I.js";import"./chunk-II5RVJQN.js";import"./chunk-ZN5EFDH7.js";
4
4
  import"./chunk-ZWVYVS2A.js";import"./chunk-7WSNIXTQ.js";import"./chunk-RZVI6PMW.js";import"./chunk-VSJBJXZO.js";export{estimateDomain,featureLicenseGuidance,invoiceDomain,licenseForbidden};