twenty 2.59.0 → 2.61.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 (96) hide show
  1. package/dist/app-template/yarn.lock +39 -39
  2. package/dist/app-worker.cjs +1 -1
  3. package/dist/chunks/application-source-globs-FUknjGdt.cjs +1 -0
  4. package/dist/chunks/{build-source-manifest-Ddwa8ath.cjs → build-source-manifest-DQ5YF5PV.cjs} +1 -1
  5. package/dist/chunks/{build-source-snapshot-CUsEVNsQ.cjs → build-source-snapshot-DIjGWX_5.cjs} +19 -19
  6. package/dist/chunks/{cli-version.constant-y_3mZ4gx.cjs → cli-version.constant-Dn-WFWf8.cjs} +1 -1
  7. package/dist/chunks/collect-watch-inputs-Cj9epSJw.cjs +1 -0
  8. package/dist/chunks/compile-application-translations-CDykMbFf.cjs +58 -0
  9. package/dist/chunks/create-metadata-client-CrOsu4u3.cjs +6 -0
  10. package/dist/chunks/{create-rest-client-HbzXSfhZ.cjs → create-rest-client-D3ZXtAxc.cjs} +1 -1
  11. package/dist/chunks/extract-manifest-from-file-B3pazFD1.cjs +1 -0
  12. package/dist/chunks/{extract-source-translations-B-XmoSt7.cjs → extract-source-translations-b9c2CH4w.cjs} +1 -1
  13. package/dist/chunks/{fetch-metadata-inspection-ooyNi2DN.cjs → fetch-metadata-inspection-DN8am1j0.cjs} +1 -1
  14. package/dist/chunks/{fetch-signed-in-identity-nCzWXunB.cjs → fetch-signed-in-identity-kgzejZg2.cjs} +1 -1
  15. package/dist/chunks/fetch-workspace-or-throw-BIu0K3A-.cjs +1 -0
  16. package/dist/chunks/fs-utils-BcNux7fF.cjs +2 -0
  17. package/dist/chunks/{get-client-generation-skip-reason-BZiAtHwa.cjs → get-client-generation-skip-reason-C_oaO89K.cjs} +1 -1
  18. package/dist/chunks/get-mismatched-remote-url-D5jFYvVx.cjs +1 -0
  19. package/dist/chunks/global-flags.constant-JcdNC5G1.cjs +1 -0
  20. package/dist/chunks/is-exported-manifest-BHA_mGa6.cjs +1 -0
  21. package/dist/chunks/{is-valid-package-name-Ds0DY5qP.cjs → is-valid-package-name-o_jWsuUX.cjs} +1 -1
  22. package/dist/chunks/isRestorableApplicationSourcePath-Du_zM55R.cjs +1 -0
  23. package/dist/chunks/parse-app-export-B9Ocghe1.cjs +1 -0
  24. package/dist/chunks/pull-minimum-sdk-version.constant-DOAFtDDD.cjs +6 -0
  25. package/dist/chunks/pull-source-B5Hot5CI.cjs +1 -0
  26. package/dist/chunks/{read-app-identity-Cny6sAGs.cjs → read-app-identity-M47izSWp.cjs} +1 -1
  27. package/dist/chunks/{read-application-identifier-C4U2JsfD.cjs → read-application-identifier-BlEwa2gR.cjs} +1 -1
  28. package/dist/chunks/read-application-identity-CYKNL1g5.cjs +1 -0
  29. package/dist/chunks/{read-infer-deletion-option-Hv5V-A47.cjs → read-infer-deletion-option-DeyWsiCS.cjs} +1 -1
  30. package/dist/chunks/{read-source-identity-CG9W0pSt.cjs → read-source-identity-bo4jC2Dh.cjs} +1 -1
  31. package/dist/chunks/read-watch-input-stamp-DKJ-Plk2.cjs +1 -0
  32. package/dist/chunks/record-pull-base-DKrQDDmc.cjs +1 -0
  33. package/dist/chunks/{record-typecheck-config-inputs-U2RUjjp9.cjs → record-typecheck-config-inputs-BMV55iFx.cjs} +1 -1
  34. package/dist/chunks/{resolve-command-target-CLqjjxCT.cjs → resolve-command-target-B9QG8OZs.cjs} +1 -1
  35. package/dist/chunks/{resolve-project-typescript-DO4LrLr-.cjs → resolve-project-typescript-DjMUr6ks.cjs} +1 -1
  36. package/dist/chunks/{resolve-source-sdk-C4Hu045V.cjs → resolve-source-sdk-BDwffWHb.cjs} +1 -1
  37. package/dist/chunks/{run-app-add-command-b9sm20rn.cjs → run-app-add-command-De3cIhU0.cjs} +1 -1
  38. package/dist/chunks/{run-app-apply-command-CD7NOdiR.cjs → run-app-apply-command-BXVHKrW3.cjs} +2 -2
  39. package/dist/chunks/{run-app-build-command-C8ubC2GH.cjs → run-app-build-command-BMwzOOov.cjs} +1 -1
  40. package/dist/chunks/run-app-dev-command-Bg4zIJnX.cjs +3 -0
  41. package/dist/chunks/{run-app-exec-command-cw4vPVHE.cjs → run-app-exec-command-BOhA0aZN.cjs} +1 -1
  42. package/dist/chunks/{run-app-generate-client-command-BVRFtPni.cjs → run-app-generate-client-command-B7p5M_hN.cjs} +1 -1
  43. package/dist/chunks/{run-app-init-command-DuxE1JhM.cjs → run-app-init-command-DJ0UipFh.cjs} +1 -1
  44. package/dist/chunks/{run-app-install-command-DlcUupwk.cjs → run-app-install-command-CsK8l0Ou.cjs} +1 -1
  45. package/dist/chunks/{run-app-logs-command-CaLIVesh.cjs → run-app-logs-command-COAdNMuL.cjs} +1 -1
  46. package/dist/chunks/{run-app-operation-DKPh4r7b.cjs → run-app-operation-B4JecUV7.cjs} +1 -1
  47. package/dist/chunks/{run-app-plan-command-BGQ7vJZT.cjs → run-app-plan-command-hASkfDaJ.cjs} +1 -1
  48. package/dist/chunks/{run-app-publish-command-BGNJVIBl.cjs → run-app-publish-command-ClsjL5OP.cjs} +1 -1
  49. package/dist/chunks/{run-app-pull-command-NbZ8fjhE.cjs → run-app-pull-command-BfHIuJ1m.cjs} +2 -2
  50. package/dist/chunks/{run-app-translations-extract-command-CGIFvpC1.cjs → run-app-translations-extract-command-DHIEEFXs.cjs} +1 -1
  51. package/dist/chunks/{run-app-typecheck-command-D0KV3hFS.cjs → run-app-typecheck-command--4NoTac-.cjs} +1 -1
  52. package/dist/chunks/{run-app-uninstall-command-CepQk4_4.cjs → run-app-uninstall-command-ClRoCRjv.cjs} +1 -1
  53. package/dist/chunks/run-auth-login-command-p9VHNoqZ.cjs +1 -0
  54. package/dist/chunks/{run-auth-status-command-Dr4YQuLn.cjs → run-auth-status-command-CdqOc2-Q.cjs} +1 -1
  55. package/dist/chunks/{run-cli-oUabLHNz.cjs → run-cli-CgBPkP_r.cjs} +3 -3
  56. package/dist/chunks/{run-commands-command-DYm9TuAx.cjs → run-commands-command-BF3y7Dz2.cjs} +1 -1
  57. package/dist/chunks/{run-data-export-command-C4_7rc0v.cjs → run-data-export-command-ca_JYOnT.cjs} +1 -1
  58. package/dist/chunks/{run-data-get-command-CcEYQ4xO.cjs → run-data-get-command-BZTsbTvb.cjs} +1 -1
  59. package/dist/chunks/{run-data-list-command-D0K7HFD-.cjs → run-data-list-command-UI5hngdt.cjs} +1 -1
  60. package/dist/chunks/{run-doctor-command-fHf5vCGl.cjs → run-doctor-command-B_bcpjAT.cjs} +2 -2
  61. package/dist/chunks/run-local-start-command-B8N5Jgjd.cjs +1 -0
  62. package/dist/chunks/{run-metadata-field-describe-command-nfKhj-m_.cjs → run-metadata-field-describe-command-CH7Yob_y.cjs} +1 -1
  63. package/dist/chunks/{run-metadata-field-list-command-CW2I6hmh.cjs → run-metadata-field-list-command-BzxIj9tX.cjs} +1 -1
  64. package/dist/chunks/{run-metadata-object-describe-command-WLxcOe4T.cjs → run-metadata-object-describe-command-BF9FzF06.cjs} +1 -1
  65. package/dist/chunks/{run-metadata-object-list-command-Q4pwAEwO.cjs → run-metadata-object-list-command-Tk_Fjfc5.cjs} +1 -1
  66. package/dist/chunks/{run-open-command-DPrz3N1e.cjs → run-open-command-BldBUk02.cjs} +1 -1
  67. package/dist/chunks/{run-version-command-BWTSv9_Y.cjs → run-version-command-B_6F7XYT.cjs} +1 -1
  68. package/dist/chunks/{sign-in-to-remote-again-DFQr-xvw.cjs → sign-in-to-remote-again-BqU_-38L.cjs} +1 -1
  69. package/dist/chunks/standard-object-fields.constant-CA16BdJ2.cjs +1 -0
  70. package/dist/chunks/{typecheck-application-8A504oUF.cjs → typecheck-application-CiGxmS69.cjs} +1 -1
  71. package/dist/cli.cjs +1 -1
  72. package/docs/commands.md +45 -17
  73. package/package.json +2 -2
  74. package/src/app/bundles/README.md +6 -0
  75. package/src/app/dev/README.md +13 -1
  76. package/src/app/pull/README.md +51 -18
  77. package/dist/chunks/FileFolder-BmCXp_bX.cjs +0 -1
  78. package/dist/chunks/collect-watch-inputs-DfWAkX1r.cjs +0 -1
  79. package/dist/chunks/compile-application-translations-C9UZQCAb.cjs +0 -58
  80. package/dist/chunks/create-metadata-client-FopHnDj0.cjs +0 -6
  81. package/dist/chunks/extract-manifest-from-file-DPDIhnyg.cjs +0 -1
  82. package/dist/chunks/fetch-workspace-or-throw-DHoa_BYF.cjs +0 -1
  83. package/dist/chunks/fs-utils-DoSmCBu8.cjs +0 -2
  84. package/dist/chunks/global-flags.constant-DMHyA_PD.cjs +0 -1
  85. package/dist/chunks/is-exported-manifest-C4lO285q.cjs +0 -1
  86. package/dist/chunks/list-application-source-files-DcyU-HrX.cjs +0 -1
  87. package/dist/chunks/parse-app-export-BC81wdmc.cjs +0 -1
  88. package/dist/chunks/pull-minimum-sdk-version.constant-DUMi_IUD.cjs +0 -6
  89. package/dist/chunks/pull-source-CXQQf8Lw.cjs +0 -1
  90. package/dist/chunks/read-application-identity-5sO-Mqb1.cjs +0 -1
  91. package/dist/chunks/read-watch-input-stamp-BxeOb0vI.cjs +0 -1
  92. package/dist/chunks/record-pull-base-8bIoAoiB.cjs +0 -1
  93. package/dist/chunks/run-app-dev-command-D1JOfJv6.cjs +0 -2
  94. package/dist/chunks/run-auth-login-command-DpS1bUdL.cjs +0 -1
  95. package/dist/chunks/run-local-start-command-DsFS9_ew.cjs +0 -1
  96. package/dist/chunks/standard-object-fields.constant-C4AVX0t2.cjs +0 -1
@@ -1 +1 @@
1
- const e=require("./isDefined-CJctgvfE.cjs"),t=require("./cli-error-CrUD8uMp.cjs"),n=require("./read-command-values-l5T9Lba4.cjs");require("./resolve-request-url-CfvGDGkw.cjs");const r=require("./style-BR52fK4V.cjs"),i=require("./to-cli-error-4pSpVaW9.cjs");require("./result-item-limit.constant-QX3teiuy.cjs");const a=require("./create-metadata-client-FopHnDj0.cjs"),o=require("./format-data-value-D_1TNU-r.cjs"),s=require("./to-public-target-BltDNpJN.cjs"),c=require("./format-table-4drtI5sP.cjs"),l=require("./resolve-metadata-object-7DhvIcEm.cjs"),u=require("./create-rest-client-HbzXSfhZ.cjs");var d=({recordCount:e,bytes:n})=>{if(e>1e4||n>16777216)throw new t.t({code:`RESULT_LIMIT_EXCEEDED`,exitCode:t.n.USAGE,message:`Records exceed the 10,000-item or 16 MiB result limit.`,hint:`Use data list <object> --all --format ndjson to stream records, or request fewer records.`,details:{recordCount:e,bytes:n}})},f=[`id`,`name`],p=new Set([`deletedAt`]),m=(e,t)=>o.t(Object.hasOwn(e,t)?e[t]:void 0),h=({page:e,options:t})=>{let n=Object.keys(e.records[0]??{}),i=t.fields??[...f.filter(e=>n.includes(e)),...n.filter(e=>!f.includes(e)&&!p.has(e))].slice(0,5),a=c.n.ROW_INDENT.length,s=0;for(let t of i){let n=o.t(t),r=n.length;s+=Buffer.byteLength(n,`utf8`)-n.length;for(let n of e.records){let e=m(n,t);r=Math.max(r,e.length),s+=Buffer.byteLength(e,`utf8`)-e.length}a+=r+c.n.COLUMN_GAP.length}d({recordCount:e.records.length,bytes:a*(e.records.length+1)+s});let l=e.records.length===0?`No records.`:c.t({rows:e.records,columns:i.map(e=>({header:o.t(e),value:t=>m(t,e)}))}),u=`${e.records.length} of ${e.totalCount} records`;return`${l}\n${r.i(e.pageInfo.hasNextPage?`${u} · --all for every page · --json for the next cursor`:u)}`};async function*g({fetchPage:e,cursor:n,signal:r}){let i=n,a=n,o=1,s=0,c=!0;for(;c;){r.throwIfAborted();let n=await e(i);r.throwIfAborted();let l=n.pageInfo.endCursor??void 0;if(n.records.length>0&&(l===i||l===a))throw new t.t({code:`INVALID_RESPONSE`,message:`The server returned a repeated pagination cursor.`});c=n.pageInfo.hasNextPage,c&&(s+=1,s===o&&(a=l,o*=2,s=0)),yield n,i=l}}var _=r=>{let i=n.i(r,`limit`)??`50`,a=Number(i),o=n.i(r,`fields`)?.split(`,`).map(e=>e.trim()),s=n.i(r,`cursor`);if(!/^\d+$/.test(i)||!Number.isInteger(a)||a<1||a>200)throw new t.t({code:`USAGE`,exitCode:t.n.USAGE,message:`--limit must be an integer between 1 and 200.`});if(o?.some(e=>e.length===0)||e.t(s)&&s.length===0)throw new t.t({code:`USAGE`,exitCode:t.n.USAGE,message:`--fields and --cursor cannot contain empty values.`});return{limit:a,fields:e.t(o)?[...new Set(o)]:void 0,cursor:s,filter:n.i(r,`filter`),orderBy:n.i(r,`orderBy`),all:n.t(r,`all`)}},v=async({arguments:e,options:r,target:o,signal:c,output:f,outputMode:p})=>{let m=_(r),v=await l.t({client:a.t({target:o,signal:c}),name:n.n(e,0)??``}),y=u.t({target:o,signal:c}),b=p===`ndjson`,x=[],S=0,C=0,w=0,T=m.cursor??null,E={hasNextPage:!1,startCursor:null,endCursor:null},D=0;try{b&&await f.event(`start`,{object:v.namePlural,target:s.t(o)},c);for await(let e of g({cursor:m.cursor,signal:c,fetchPage:async e=>u.n(await y.get(`/rest/${encodeURIComponent(v.namePlural)}`,{query:{limit:m.limit,starting_after:e,filter:m.filter,order_by:m.orderBy}}),v.namePlural,m.limit)})){for(let t of e.records)b?await f.event(`record`,t,c):(w+=Buffer.byteLength(JSON.stringify(t),`utf8`),d({recordCount:S+1,bytes:w+S+Buffer.byteLength(JSON.stringify({records:[],pageInfo:e.pageInfo,totalCount:e.totalCount}),`utf8`)}),x.push(t)),S+=1;if(C+=1,E=e.pageInfo,D=e.totalCount,T=E.endCursor??T,b&&await f.event(`progress`,{recordCount:S,pages:C,resumeCursor:T,pageInfo:E,totalCount:D},c),!m.all)break}}catch(e){let n=i.t(e,c);throw b?new t.t({code:n.code,exitCode:n.exitCode,message:n.message,hint:n.hint,details:{...n.details,recordCount:S,pages:C,resumeCursor:T}}):n}if(b)return{data:{recordCount:S,pages:C,resumeCursor:T,pageInfo:E,totalCount:D}};let O={records:x,pageInfo:E,totalCount:D},k=p===`human`&&x.length>0?(m.fields??[]).filter(e=>!x.some(t=>Object.hasOwn(t,e))):[];return k.length>0&&f.warn({code:`FIELDS_NOT_RETURNED`,message:`No returned record has ${k.join(`, `)}; see twenty metadata field list ${v.namePlural}.`}),{data:O,...p===`human`?{human:h({page:O,options:m})}:{}}};exports.runDataListCommand=v;
1
+ const e=require("./isDefined-CJctgvfE.cjs"),t=require("./cli-error-CrUD8uMp.cjs"),n=require("./read-command-values-l5T9Lba4.cjs");require("./resolve-request-url-CfvGDGkw.cjs");const r=require("./style-BR52fK4V.cjs"),i=require("./to-cli-error-4pSpVaW9.cjs");require("./result-item-limit.constant-QX3teiuy.cjs");const a=require("./create-metadata-client-CrOsu4u3.cjs"),o=require("./format-data-value-D_1TNU-r.cjs"),s=require("./to-public-target-BltDNpJN.cjs"),c=require("./format-table-4drtI5sP.cjs"),l=require("./resolve-metadata-object-7DhvIcEm.cjs"),u=require("./create-rest-client-D3ZXtAxc.cjs");var d=({recordCount:e,bytes:n})=>{if(e>1e4||n>16777216)throw new t.t({code:`RESULT_LIMIT_EXCEEDED`,exitCode:t.n.USAGE,message:`Records exceed the 10,000-item or 16 MiB result limit.`,hint:`Use data list <object> --all --format ndjson to stream records, or request fewer records.`,details:{recordCount:e,bytes:n}})},f=[`id`,`name`],p=new Set([`deletedAt`]),m=(e,t)=>o.t(Object.hasOwn(e,t)?e[t]:void 0),h=({page:e,options:t})=>{let n=Object.keys(e.records[0]??{}),i=t.fields??[...f.filter(e=>n.includes(e)),...n.filter(e=>!f.includes(e)&&!p.has(e))].slice(0,5),a=c.n.ROW_INDENT.length,s=0;for(let t of i){let n=o.t(t),r=n.length;s+=Buffer.byteLength(n,`utf8`)-n.length;for(let n of e.records){let e=m(n,t);r=Math.max(r,e.length),s+=Buffer.byteLength(e,`utf8`)-e.length}a+=r+c.n.COLUMN_GAP.length}d({recordCount:e.records.length,bytes:a*(e.records.length+1)+s});let l=e.records.length===0?`No records.`:c.t({rows:e.records,columns:i.map(e=>({header:o.t(e),value:t=>m(t,e)}))}),u=`${e.records.length} of ${e.totalCount} records`;return`${l}\n${r.i(e.pageInfo.hasNextPage?`${u} · --all for every page · --json for the next cursor`:u)}`};async function*g({fetchPage:e,cursor:n,signal:r}){let i=n,a=n,o=1,s=0,c=!0;for(;c;){r.throwIfAborted();let n=await e(i);r.throwIfAborted();let l=n.pageInfo.endCursor??void 0;if(n.records.length>0&&(l===i||l===a))throw new t.t({code:`INVALID_RESPONSE`,message:`The server returned a repeated pagination cursor.`});c=n.pageInfo.hasNextPage,c&&(s+=1,s===o&&(a=l,o*=2,s=0)),yield n,i=l}}var _=r=>{let i=n.i(r,`limit`)??`50`,a=Number(i),o=n.i(r,`fields`)?.split(`,`).map(e=>e.trim()),s=n.i(r,`cursor`);if(!/^\d+$/.test(i)||!Number.isInteger(a)||a<1||a>200)throw new t.t({code:`USAGE`,exitCode:t.n.USAGE,message:`--limit must be an integer between 1 and 200.`});if(o?.some(e=>e.length===0)||e.t(s)&&s.length===0)throw new t.t({code:`USAGE`,exitCode:t.n.USAGE,message:`--fields and --cursor cannot contain empty values.`});return{limit:a,fields:e.t(o)?[...new Set(o)]:void 0,cursor:s,filter:n.i(r,`filter`),orderBy:n.i(r,`orderBy`),all:n.t(r,`all`)}},v=async({arguments:e,options:r,target:o,signal:c,output:f,outputMode:p})=>{let m=_(r),v=await l.t({client:a.t({target:o,signal:c}),name:n.n(e,0)??``}),y=u.t({target:o,signal:c}),b=p===`ndjson`,x=[],S=0,C=0,w=0,T=m.cursor??null,E={hasNextPage:!1,startCursor:null,endCursor:null},D=0;try{b&&await f.event(`start`,{object:v.namePlural,target:s.t(o)},c);for await(let e of g({cursor:m.cursor,signal:c,fetchPage:async e=>u.n(await y.get(`/rest/${encodeURIComponent(v.namePlural)}`,{query:{limit:m.limit,starting_after:e,filter:m.filter,order_by:m.orderBy}}),v.namePlural,m.limit)})){for(let t of e.records)b?await f.event(`record`,t,c):(w+=Buffer.byteLength(JSON.stringify(t),`utf8`),d({recordCount:S+1,bytes:w+S+Buffer.byteLength(JSON.stringify({records:[],pageInfo:e.pageInfo,totalCount:e.totalCount}),`utf8`)}),x.push(t)),S+=1;if(C+=1,E=e.pageInfo,D=e.totalCount,T=E.endCursor??T,b&&await f.event(`progress`,{recordCount:S,pages:C,resumeCursor:T,pageInfo:E,totalCount:D},c),!m.all)break}}catch(e){let n=i.t(e,c);throw b?new t.t({code:n.code,exitCode:n.exitCode,message:n.message,hint:n.hint,details:{...n.details,recordCount:S,pages:C,resumeCursor:T}}):n}if(b)return{data:{recordCount:S,pages:C,resumeCursor:T,pageInfo:E,totalCount:D}};let O={records:x,pageInfo:E,totalCount:D},k=p===`human`&&x.length>0?(m.fields??[]).filter(e=>!x.some(t=>Object.hasOwn(t,e))):[];return k.length>0&&f.warn({code:`FIELDS_NOT_RETURNED`,message:`No returned record has ${k.join(`, `)}; see twenty metadata field list ${v.namePlural}.`}),{data:O,...p===`human`?{human:h({page:O,options:m})}:{}}};exports.runDataListCommand=v;
@@ -1,2 +1,2 @@
1
- const e=require("./build--4zYt4wd.cjs"),t=require("./check-node-requirement-CIDuA1s-.cjs"),n=require("./cli-node-version-range.constant-D3XrqV07.cjs"),r=require("./isDefined-CJctgvfE.cjs"),i=require("./isPlainObject-fJEJm71P.cjs"),a=require("./isNonEmptyArray-v52xg4Xj.cjs"),o=require("./read-json-object-BMftwGZ5.cjs"),s=require("./list-ancestor-directories-BtB2hNt6.cjs"),c=require("./cli-error-CrUD8uMp.cjs"),l=require("./resolve-source-sdk-C4Hu045V.cjs"),u=require("./parse-api-url-B5c0Gh_n.cjs"),d=require("./read-command-values-l5T9Lba4.cjs"),f=require("./target-environment-variable.constant-D7z8AihP.cjs"),p=require("./style-BR52fK4V.cjs"),m=require("./resolve-app-project-B4IjfcM-.cjs"),h=require("./cli-version.constant-y_3mZ4gx.cjs"),g=require("./to-public-target-BltDNpJN.cjs"),_=require("./select-target-Ck9mdMLQ.cjs"),v=require("./get-config-path-C-D-QHuX.cjs"),y=require("./read-config-6GnzcpJm.cjs"),b=require("./is-access-token-expiring-BvJhEqtV.cjs"),x=require("./config-file-mode.constant-DLBzKKUl.cjs"),S=require("./resolve-proxy-headers-DipR9jft.cjs"),C=require("./fetch-signed-in-identity-nCzWXunB.cjs");let w=require("node:fs/promises"),T=require("node:path"),E=require("node:fs");var D={pass:`green`,warning:`yellow`,fail:`red`,skipped:`yellow`},O=(e,t=process.stdout)=>e.map(e=>{let n=r.t(e.hint)?`\n ${e.hint}`:``;return`${p.n(D[e.status],`[${e.status.toUpperCase()}]`,t)} ${e.id}: ${e.message}${n}`}).join(`
2
- `),k=e.t(),A={AUTH_REQUIRED:{message:`The metadata endpoint rejected these credentials.`,hint:`Check the configured credentials, or sign in again.`},PERMISSION_DENIED:{message:`The metadata endpoint denied access to the workspace identity.`,hint:`Check the selected remote and the permissions granted to its credentials.`},INVALID_RESPONSE:{message:`The server did not return a valid metadata API response.`,hint:`Check the API URL and base path, and whether a proxy returned another page.`},UNSUPPORTED_RESPONSE_TYPE:{message:`The metadata endpoint returned an unsupported response type.`,hint:`Check the API URL and base path, and whether a proxy returned another page.`},REDIRECT_NOT_FOLLOWED:{message:`The metadata endpoint redirected the request. No redirect was followed.`,hint:`Configure the final Twenty API URL, including the correct protocol and base path.`},PROXY_AUTH_REQUIRED:{message:`An authenticating proxy in front of the server redirected the request to its sign-in page.`,hint:`Configure proxy headers for this connection. See "Authenticating proxies" in the CLI docs.`},PROXY_HEADERS_FAILED:{message:`The proxy header command failed, so no request was sent.`,hint:`Run the command yourself to check it prints "Name: value" lines.`},TIMEOUT:{message:`The metadata endpoint did not respond before the request timed out.`,hint:`Check server availability and the network connection.`},NETWORK_ERROR:{message:`Could not connect to the metadata endpoint.`,hint:`Check the API URL, network connection, server availability and TLS configuration.`}},j={ENOTFOUND:`DNS could not resolve the metadata endpoint hostname.`,EAI_AGAIN:`DNS resolution of the metadata endpoint temporarily failed.`,ECONNREFUSED:`The metadata endpoint refused the connection.`,ECONNRESET:`The connection to the metadata endpoint was reset.`,EHOSTUNREACH:`The metadata endpoint host is unreachable.`,ENETUNREACH:`The network containing the metadata endpoint is unreachable.`,ETIMEDOUT:`The connection to the metadata endpoint timed out.`,UND_ERR_CONNECT_TIMEOUT:`The connection to the metadata endpoint timed out.`,CERT_HAS_EXPIRED:`The metadata endpoint TLS certificate has expired.`,ERR_TLS_CERT_ALTNAME_INVALID:`The metadata endpoint TLS certificate does not match its hostname.`,DEPTH_ZERO_SELF_SIGNED_CERT:`The metadata endpoint uses an untrusted self-signed TLS certificate.`,SELF_SIGNED_CERT_IN_CHAIN:`The metadata endpoint TLS certificate chain contains an untrusted self-signed certificate.`,UNABLE_TO_VERIFY_LEAF_SIGNATURE:`The metadata endpoint TLS certificate chain could not be verified.`,UNABLE_TO_GET_ISSUER_CERT_LOCALLY:`The metadata endpoint TLS certificate issuer is not trusted locally.`},M=e=>{let t=e instanceof c.t?e.code:`INTERNAL_ERROR`,n=A[t]??{message:`The metadata endpoint could not be verified (${t}).`,hint:`Check the API URL and server availability.`},i=e instanceof c.t&&t===`NETWORK_ERROR`?e.details?.networkCode:void 0,a=(0,k.isString)(i)&&Object.hasOwn(j,i)?j[i]:void 0;return{id:`metadata-api`,status:`fail`,code:t,message:a??n.message,hint:e instanceof c.t&&t===`AUTH_REQUIRED`&&r.t(e.hint)?e.hint:n.hint,...r.t(a)?{details:{networkCode:i}}:{}}},N=async({configPath:e,environment:t,remoteFlag:n,offline:i,signal:a})=>{let o=[],s,l;a.throwIfAborted();try{if(s=await y.t(e),o.push({id:`configuration`,status:`pass`,message:`CLI configuration checked at ${e}.`,details:{path:e,remoteCount:Object.keys(s.remotes).length,defaultRemote:s.defaultRemote??null}}),process.platform!==`win32`){let t=await(0,w.stat)(e).catch(()=>void 0);r.t(t)&&t.mode&63&&o.push({id:`configuration-permissions`,status:`warning`,message:`Other users may access the CLI configuration file.`,hint:`Review its permissions; ${x.t.PRIVATE_FILE.toString(8)} is the expected mode. Doctor does not change them.`})}}catch(t){l=t,o.push({id:`configuration`,status:`fail`,code:t instanceof c.t?t.code:`INVALID_CONFIG`,message:t instanceof c.t?t.message:`The CLI configuration is unreadable or invalid.`,hint:t instanceof c.t?t.hint:`Check ${e}. Doctor does not overwrite it.`})}let d;try{let e=await _.t({environment:t,remoteFlag:n,loadConfig:async()=>{if(!r.t(s))throw l;return s},warn:e=>o.push({id:`target-precedence`,status:`warning`,code:e.code,message:e.message})}),i=u.t({rawUrl:e.source===`remote`?e.remote.apiUrl:e.apiUrl,sourceName:e.source===`remote`?`The URL of remote ${e.remoteName}`:f.t.API_URL}),a={apiUrl:i,source:e.source,remote:e.source===`remote`?e.remoteName:null};o.push({id:`target`,status:`pass`,message:`Selected ${i} from ${e.source}.`,details:a});let c=e.source===`remote`?e.remote.twentyCLIAccessToken:void 0,p=(0,k.isNonEmptyString)(c)?`oauth`:`apiKey`,m=e.source===`remote`?e.remote.apiKey:e.apiKey,h=(0,k.isNonEmptyString)(c)?c:m;if(!(0,k.isNonEmptyString)(h))return o.push({id:`credentials`,status:`fail`,code:`AUTH_REQUIRED`,message:`The selected remote has no saved credentials.`,hint:`Sign in with twenty auth login, then rerun doctor.`}),[...o,{id:`metadata-api`,status:`skipped`,message:`No credentials are available.`}];let g=p===`oauth`?b.t(h):void 0;if(r.t(g)&&g<=Date.now()){let t=e.source===`remote`&&(0,k.isNonEmptyString)(e.remote.twentyCLIRefreshToken);return o.push({id:`credentials`,status:t?`warning`:`fail`,code:`AUTH_REQUIRED`,message:t?`The OAuth access token has expired. A refresh token is saved, but renewal has not been verified.`:`The saved OAuth access token has expired and no refresh token is available.`,hint:`Run twenty auth status with the same remote to refresh the session, or sign in again. Doctor does not refresh credentials.`}),[...o,{id:`metadata-api`,status:`skipped`,message:`The access token has expired.`}]}let v=e.source===`remote`?S.r({remote:e.remote,remoteName:e.remoteName}):void 0;d={apiUrl:i,source:e.source,...e.source===`remote`?{remoteName:e.remoteName}:{},credentialKind:p,bearerToken:h,proxyHeaders:S.t({environment:t,savedSettings:v})},o.push({id:`credentials`,status:`pass`,message:`${p===`oauth`?`OAuth token`:`API key`} configured; acceptance is checked separately.`,details:{kind:p}})}catch(e){a.throwIfAborted();let t=e instanceof c.t?e.code:`INTERNAL_ERROR`;return o.push({id:`target`,status:t===`TARGET_REQUIRED`?`skipped`:`fail`,code:t,message:e instanceof c.t?e.message:`Could not select a workspace.`,hint:e instanceof c.t?e.hint:void 0}),[...o,{id:`credentials`,status:`skipped`,message:`No workspace was selected.`},{id:`metadata-api`,status:`skipped`,message:`No workspace was selected.`}]}if(i)return[...o,{id:`metadata-api`,status:`skipped`,message:`Network checks disabled by --offline.`}];try{a.throwIfAborted(),await C.t({target:d,signal:a}),o.push({id:`metadata-api`,status:`pass`,message:`The metadata endpoint accepted the configured credentials.`,details:{...g.t(d)}})}catch(e){a.throwIfAborted(),o.push(M(e))}return o},P=async e=>{for(let t of s.t((0,T.dirname)(e))){let n=await o.t((0,T.join)(t,`package.json`));if(!r.t(n))continue;let a=n.bin,s=(0,k.isString)(a)&&n.name===`twenty`?a:void 0,c=i.t(a)&&(0,k.isString)(a.twenty)?a.twenty:s;if(r.t(c)&&await(0,w.realpath)((0,T.resolve)(t,c)).catch(()=>void 0)===e)return{name:(0,k.isString)(n.name)?n.name:`unknown`,version:(0,k.isString)(n.version)?n.version:`unknown`}}return null},F=async({environment:e,workingDirectory:t,signal:n})=>{let i=[],o=process.platform===`win32`?[`twenty.exe`,`twenty.cmd`,`twenty.bat`,`twenty`]:[`twenty`],s=r.t(e.PATH)?e.PATH.split(T.delimiter):[];for(let e of new Set(s))for(let r of o){n.throwIfAborted();let a=(0,T.resolve)(t,e,r);if(!await(0,w.access)(a,E.constants.X_OK).then(()=>(0,w.stat)(a).then(e=>e.isFile()),()=>!1))continue;let o=await(0,w.realpath)(a);i.push({path:a,resolvedPath:o,owner:await P(o)})}let c=i[0],l=process.argv[1],u=r.t(l)?await(0,w.realpath)((0,T.resolve)(t,l)).catch(()=>void 0):void 0,d=i.filter(e=>e.owner?.name===`twenty-sdk`);return a.t(d)?{id:`path`,status:`warning`,message:`PATH contains legacy twenty-sdk executable(s) named twenty: ${d.map(e=>e.path).join(`, `)}.`,hint:`If this is a global twenty-sdk installation, remove it before installing the twenty CLI so the CLI owns the twenty name. Removing the SDK afterward can remove that executable link. Keep app-local SDK dependencies; use the intended CLI by its full path when needed. Doctor does not change installations.`,details:{candidates:i}}:r.t(c)?r.t(u)&&c.resolvedPath!==u?{id:`path`,status:`warning`,message:`${c.path} is first on PATH and differs from the running CLI.`,hint:`Use the intended executable by its full path, or review PATH order. Shell aliases, functions and command caches are not inspected.`,details:{candidates:i,runningPath:u}}:{id:`path`,status:c.owner?.name===`twenty`?`pass`:`warning`,message:r.t(c.owner)?`First twenty executable on PATH: ${c.path} (${c.owner.name} ${c.owner.version}).`:`First twenty executable on PATH: ${c.path}. Its package owner could not be determined.`,hint:`Shell aliases, functions and command caches are not inspected.`,details:{candidates:i}}:{id:`path`,status:`warning`,message:`No executable named twenty was found on PATH.`,hint:`Use the CLI entry point shown above, or your package manager to invoke the installed CLI.`,details:{candidates:i}}},I=async({explicitPath:e,workingDirectory:t,signal:n})=>{let i;n.throwIfAborted();try{i=await m.t({explicitPath:e,workingDirectory:t})}catch(t){return n.throwIfAborted(),[{id:`project`,status:!r.t(e)&&t instanceof c.t&&(t.code===`APP_NOT_FOUND`||t.code===`APP_PATH_REQUIRED`)?`skipped`:`fail`,message:t instanceof c.t?t.message:`Could not inspect the app directory.`,hint:`Use --path <app directory> to check a specific app.`},{id:`sdk`,status:`skipped`,message:`No app was selected.`}]}let a={id:`project`,status:`pass`,message:`${i.name} at ${i.path}.`,details:{name:i.name,path:i.path}};try{n.throwIfAborted();let e=[],t=await l.t({appPath:i.path,warn:t=>e.push(t)}),[o]=e,s={version:t.version,path:t.packagePath};return[a,r.t(o)?{id:`sdk`,status:`warning`,code:o.code,message:o.message,hint:`Builds continue. If one fails, switch to a Node version in that range.`,details:s}:{id:`sdk`,status:`pass`,message:`twenty-sdk ${t.version} provides the authoring exports required by the CLI.`,details:s}]}catch(e){return n.throwIfAborted(),[a,{id:`sdk`,status:`fail`,code:e instanceof c.t?e.code:`INTERNAL_ERROR`,message:e instanceof c.t?e.message:`Could not inspect the app SDK installation.`,hint:e instanceof c.t?e.hint:`Check that the app dependencies are installed and readable.`}]}},L=()=>{let e=t.t({version:process.versions.node,range:n.t})===`satisfied`;return[{id:`node`,status:e?`pass`:`fail`,message:`Node ${process.versions.node}, required ${n.t}.`,...e?{}:{hint:`Switch to a supported Node version and rerun doctor.`},details:{version:process.versions.node,required:n.t}},{id:`cli`,status:`pass`,message:`twenty ${h.t}, entry point ${process.argv[1]??`unknown`}.`,details:{version:h.t,nodeExecutable:process.execPath,entryPoint:process.argv[1]??null,platform:process.platform,arch:process.arch}}]},R=async({options:e,signal:t,outputMode:n})=>{let r=L(),i=process.cwd();try{r.push(await F({environment:process.env,workingDirectory:i,signal:t}))}catch{t.throwIfAborted(),r.push({id:`path`,status:`fail`,message:`Could not inspect executables on PATH.`})}r.push(...await I({explicitPath:d.i(e,`path`),workingDirectory:i,signal:t})),r.push(...await N({environment:process.env,configPath:v.t(),remoteFlag:d.i(e,`remote`),offline:d.t(e,`offline`),signal:t})),t.throwIfAborted();let o=r.filter(e=>e.status===`fail`),s=O(r,a.t(o)?process.stderr:process.stdout);if(a.t(o))throw new c.t({code:`DOCTOR_FAILED`,message:`${o.length} doctor ${o.length===1?`check`:`checks`} failed.`,hint:n===`human`?s:`Read error.details.checks for the failures and recovery hints.`,details:{checks:r}});return{data:{checks:r},human:s}};exports.runDoctorCommand=R;
1
+ const e=require("./build--4zYt4wd.cjs"),t=require("./check-node-requirement-CIDuA1s-.cjs"),n=require("./cli-node-version-range.constant-D3XrqV07.cjs"),r=require("./isDefined-CJctgvfE.cjs"),i=require("./isNonEmptyArray-v52xg4Xj.cjs"),a=require("./isPlainObject-fJEJm71P.cjs"),o=require("./read-json-object-BMftwGZ5.cjs"),s=require("./list-ancestor-directories-BtB2hNt6.cjs"),c=require("./cli-error-CrUD8uMp.cjs"),l=require("./resolve-source-sdk-BDwffWHb.cjs"),u=require("./parse-api-url-B5c0Gh_n.cjs"),d=require("./read-command-values-l5T9Lba4.cjs"),f=require("./target-environment-variable.constant-D7z8AihP.cjs"),p=require("./style-BR52fK4V.cjs"),m=require("./resolve-app-project-B4IjfcM-.cjs"),h=require("./cli-version.constant-Dn-WFWf8.cjs"),g=require("./to-public-target-BltDNpJN.cjs"),_=require("./select-target-Ck9mdMLQ.cjs"),v=require("./get-config-path-C-D-QHuX.cjs"),y=require("./read-config-6GnzcpJm.cjs"),b=require("./is-access-token-expiring-BvJhEqtV.cjs"),x=require("./config-file-mode.constant-DLBzKKUl.cjs"),S=require("./resolve-proxy-headers-DipR9jft.cjs"),C=require("./fetch-signed-in-identity-kgzejZg2.cjs");let w=require("node:fs/promises"),T=require("node:path"),E=require("node:fs");var D={pass:`green`,warning:`yellow`,fail:`red`,skipped:`yellow`},O=(e,t=process.stdout)=>e.map(e=>{let n=r.t(e.hint)?`\n ${e.hint}`:``;return`${p.n(D[e.status],`[${e.status.toUpperCase()}]`,t)} ${e.id}: ${e.message}${n}`}).join(`
2
+ `),k=e.t(),A={AUTH_REQUIRED:{message:`The metadata endpoint rejected these credentials.`,hint:`Check the configured credentials, or sign in again.`},PERMISSION_DENIED:{message:`The metadata endpoint denied access to the workspace identity.`,hint:`Check the selected remote and the permissions granted to its credentials.`},INVALID_RESPONSE:{message:`The server did not return a valid metadata API response.`,hint:`Check the API URL and base path, and whether a proxy returned another page.`},UNSUPPORTED_RESPONSE_TYPE:{message:`The metadata endpoint returned an unsupported response type.`,hint:`Check the API URL and base path, and whether a proxy returned another page.`},REDIRECT_NOT_FOLLOWED:{message:`The metadata endpoint redirected the request. No redirect was followed.`,hint:`Configure the final Twenty API URL, including the correct protocol and base path.`},PROXY_AUTH_REQUIRED:{message:`An authenticating proxy in front of the server redirected the request to its sign-in page.`,hint:`Configure proxy headers for this connection. See "Authenticating proxies" in the CLI docs.`},PROXY_HEADERS_FAILED:{message:`The proxy header command failed, so no request was sent.`,hint:`Run the command yourself to check it prints "Name: value" lines.`},TIMEOUT:{message:`The metadata endpoint did not respond before the request timed out.`,hint:`Check server availability and the network connection.`},NETWORK_ERROR:{message:`Could not connect to the metadata endpoint.`,hint:`Check the API URL, network connection, server availability and TLS configuration.`}},j={ENOTFOUND:`DNS could not resolve the metadata endpoint hostname.`,EAI_AGAIN:`DNS resolution of the metadata endpoint temporarily failed.`,ECONNREFUSED:`The metadata endpoint refused the connection.`,ECONNRESET:`The connection to the metadata endpoint was reset.`,EHOSTUNREACH:`The metadata endpoint host is unreachable.`,ENETUNREACH:`The network containing the metadata endpoint is unreachable.`,ETIMEDOUT:`The connection to the metadata endpoint timed out.`,UND_ERR_CONNECT_TIMEOUT:`The connection to the metadata endpoint timed out.`,CERT_HAS_EXPIRED:`The metadata endpoint TLS certificate has expired.`,ERR_TLS_CERT_ALTNAME_INVALID:`The metadata endpoint TLS certificate does not match its hostname.`,DEPTH_ZERO_SELF_SIGNED_CERT:`The metadata endpoint uses an untrusted self-signed TLS certificate.`,SELF_SIGNED_CERT_IN_CHAIN:`The metadata endpoint TLS certificate chain contains an untrusted self-signed certificate.`,UNABLE_TO_VERIFY_LEAF_SIGNATURE:`The metadata endpoint TLS certificate chain could not be verified.`,UNABLE_TO_GET_ISSUER_CERT_LOCALLY:`The metadata endpoint TLS certificate issuer is not trusted locally.`},M=e=>{let t=e instanceof c.t?e.code:`INTERNAL_ERROR`,n=A[t]??{message:`The metadata endpoint could not be verified (${t}).`,hint:`Check the API URL and server availability.`},i=e instanceof c.t&&t===`NETWORK_ERROR`?e.details?.networkCode:void 0,a=(0,k.isString)(i)&&Object.hasOwn(j,i)?j[i]:void 0;return{id:`metadata-api`,status:`fail`,code:t,message:a??n.message,hint:e instanceof c.t&&t===`AUTH_REQUIRED`&&r.t(e.hint)?e.hint:n.hint,...r.t(a)?{details:{networkCode:i}}:{}}},N=async({configPath:e,environment:t,remoteFlag:n,offline:i,signal:a})=>{let o=[],s,l;a.throwIfAborted();try{if(s=await y.t(e),o.push({id:`configuration`,status:`pass`,message:`CLI configuration checked at ${e}.`,details:{path:e,remoteCount:Object.keys(s.remotes).length,defaultRemote:s.defaultRemote??null}}),process.platform!==`win32`){let t=await(0,w.stat)(e).catch(()=>void 0);r.t(t)&&t.mode&63&&o.push({id:`configuration-permissions`,status:`warning`,message:`Other users may access the CLI configuration file.`,hint:`Review its permissions; ${x.t.PRIVATE_FILE.toString(8)} is the expected mode. Doctor does not change them.`})}}catch(t){l=t,o.push({id:`configuration`,status:`fail`,code:t instanceof c.t?t.code:`INVALID_CONFIG`,message:t instanceof c.t?t.message:`The CLI configuration is unreadable or invalid.`,hint:t instanceof c.t?t.hint:`Check ${e}. Doctor does not overwrite it.`})}let d;try{let e=await _.t({environment:t,remoteFlag:n,loadConfig:async()=>{if(!r.t(s))throw l;return s},warn:e=>o.push({id:`target-precedence`,status:`warning`,code:e.code,message:e.message})}),i=u.t({rawUrl:e.source===`remote`?e.remote.apiUrl:e.apiUrl,sourceName:e.source===`remote`?`The URL of remote ${e.remoteName}`:f.t.API_URL}),a={apiUrl:i,source:e.source,remote:e.source===`remote`?e.remoteName:null};o.push({id:`target`,status:`pass`,message:`Selected ${i} from ${e.source}.`,details:a});let c=e.source===`remote`?e.remote.twentyCLIAccessToken:void 0,p=(0,k.isNonEmptyString)(c)?`oauth`:`apiKey`,m=e.source===`remote`?e.remote.apiKey:e.apiKey,h=(0,k.isNonEmptyString)(c)?c:m;if(!(0,k.isNonEmptyString)(h))return o.push({id:`credentials`,status:`fail`,code:`AUTH_REQUIRED`,message:`The selected remote has no saved credentials.`,hint:`Sign in with twenty auth login, then rerun doctor.`}),[...o,{id:`metadata-api`,status:`skipped`,message:`No credentials are available.`}];let g=p===`oauth`?b.t(h):void 0;if(r.t(g)&&g<=Date.now()){let t=e.source===`remote`&&(0,k.isNonEmptyString)(e.remote.twentyCLIRefreshToken);return o.push({id:`credentials`,status:t?`warning`:`fail`,code:`AUTH_REQUIRED`,message:t?`The OAuth access token has expired. A refresh token is saved, but renewal has not been verified.`:`The saved OAuth access token has expired and no refresh token is available.`,hint:`Run twenty auth status with the same remote to refresh the session, or sign in again. Doctor does not refresh credentials.`}),[...o,{id:`metadata-api`,status:`skipped`,message:`The access token has expired.`}]}let v=e.source===`remote`?S.r({remote:e.remote,remoteName:e.remoteName}):void 0;d={apiUrl:i,source:e.source,...e.source===`remote`?{remoteName:e.remoteName}:{},credentialKind:p,bearerToken:h,proxyHeaders:S.t({environment:t,savedSettings:v})},o.push({id:`credentials`,status:`pass`,message:`${p===`oauth`?`OAuth token`:`API key`} configured; acceptance is checked separately.`,details:{kind:p}})}catch(e){a.throwIfAborted();let t=e instanceof c.t?e.code:`INTERNAL_ERROR`;return o.push({id:`target`,status:t===`TARGET_REQUIRED`?`skipped`:`fail`,code:t,message:e instanceof c.t?e.message:`Could not select a workspace.`,hint:e instanceof c.t?e.hint:void 0}),[...o,{id:`credentials`,status:`skipped`,message:`No workspace was selected.`},{id:`metadata-api`,status:`skipped`,message:`No workspace was selected.`}]}if(i)return[...o,{id:`metadata-api`,status:`skipped`,message:`Network checks disabled by --offline.`}];try{a.throwIfAborted(),await C.t({target:d,signal:a}),o.push({id:`metadata-api`,status:`pass`,message:`The metadata endpoint accepted the configured credentials.`,details:{...g.t(d)}})}catch(e){a.throwIfAborted(),o.push(M(e))}return o},P=async e=>{for(let t of s.t((0,T.dirname)(e))){let n=await o.t((0,T.join)(t,`package.json`));if(!r.t(n))continue;let i=n.bin,s=(0,k.isString)(i)&&n.name===`twenty`?i:void 0,c=a.t(i)&&(0,k.isString)(i.twenty)?i.twenty:s;if(r.t(c)&&await(0,w.realpath)((0,T.resolve)(t,c)).catch(()=>void 0)===e)return{name:(0,k.isString)(n.name)?n.name:`unknown`,version:(0,k.isString)(n.version)?n.version:`unknown`}}return null},F=async({environment:e,workingDirectory:t,signal:n})=>{let a=[],o=process.platform===`win32`?[`twenty.exe`,`twenty.cmd`,`twenty.bat`,`twenty`]:[`twenty`],s=r.t(e.PATH)?e.PATH.split(T.delimiter):[];for(let e of new Set(s))for(let r of o){n.throwIfAborted();let i=(0,T.resolve)(t,e,r);if(!await(0,w.access)(i,E.constants.X_OK).then(()=>(0,w.stat)(i).then(e=>e.isFile()),()=>!1))continue;let o=await(0,w.realpath)(i);a.push({path:i,resolvedPath:o,owner:await P(o)})}let c=a[0],l=process.argv[1],u=r.t(l)?await(0,w.realpath)((0,T.resolve)(t,l)).catch(()=>void 0):void 0,d=a.filter(e=>e.owner?.name===`twenty-sdk`);return i.t(d)?{id:`path`,status:`warning`,message:`PATH contains legacy twenty-sdk executable(s) named twenty: ${d.map(e=>e.path).join(`, `)}.`,hint:`If this is a global twenty-sdk installation, remove it before installing the twenty CLI so the CLI owns the twenty name. Removing the SDK afterward can remove that executable link. Keep app-local SDK dependencies; use the intended CLI by its full path when needed. Doctor does not change installations.`,details:{candidates:a}}:r.t(c)?r.t(u)&&c.resolvedPath!==u?{id:`path`,status:`warning`,message:`${c.path} is first on PATH and differs from the running CLI.`,hint:`Use the intended executable by its full path, or review PATH order. Shell aliases, functions and command caches are not inspected.`,details:{candidates:a,runningPath:u}}:{id:`path`,status:c.owner?.name===`twenty`?`pass`:`warning`,message:r.t(c.owner)?`First twenty executable on PATH: ${c.path} (${c.owner.name} ${c.owner.version}).`:`First twenty executable on PATH: ${c.path}. Its package owner could not be determined.`,hint:`Shell aliases, functions and command caches are not inspected.`,details:{candidates:a}}:{id:`path`,status:`warning`,message:`No executable named twenty was found on PATH.`,hint:`Use the CLI entry point shown above, or your package manager to invoke the installed CLI.`,details:{candidates:a}}},I=async({explicitPath:e,workingDirectory:t,signal:n})=>{let i;n.throwIfAborted();try{i=await m.t({explicitPath:e,workingDirectory:t})}catch(t){return n.throwIfAborted(),[{id:`project`,status:!r.t(e)&&t instanceof c.t&&(t.code===`APP_NOT_FOUND`||t.code===`APP_PATH_REQUIRED`)?`skipped`:`fail`,message:t instanceof c.t?t.message:`Could not inspect the app directory.`,hint:`Use --path <app directory> to check a specific app.`},{id:`sdk`,status:`skipped`,message:`No app was selected.`}]}let a={id:`project`,status:`pass`,message:`${i.name} at ${i.path}.`,details:{name:i.name,path:i.path}};try{n.throwIfAborted();let e=[],t=await l.t({appPath:i.path,warn:t=>e.push(t)}),[o]=e,s={version:t.version,path:t.packagePath};return[a,r.t(o)?{id:`sdk`,status:`warning`,code:o.code,message:o.message,hint:`Builds continue. If one fails, switch to a Node version in that range.`,details:s}:{id:`sdk`,status:`pass`,message:`twenty-sdk ${t.version} provides the authoring exports required by the CLI.`,details:s}]}catch(e){return n.throwIfAborted(),[a,{id:`sdk`,status:`fail`,code:e instanceof c.t?e.code:`INTERNAL_ERROR`,message:e instanceof c.t?e.message:`Could not inspect the app SDK installation.`,hint:e instanceof c.t?e.hint:`Check that the app dependencies are installed and readable.`}]}},L=()=>{let e=t.t({version:process.versions.node,range:n.t})===`satisfied`;return[{id:`node`,status:e?`pass`:`fail`,message:`Node ${process.versions.node}, required ${n.t}.`,...e?{}:{hint:`Switch to a supported Node version and rerun doctor.`},details:{version:process.versions.node,required:n.t}},{id:`cli`,status:`pass`,message:`twenty ${h.t}, entry point ${process.argv[1]??`unknown`}.`,details:{version:h.t,nodeExecutable:process.execPath,entryPoint:process.argv[1]??null,platform:process.platform,arch:process.arch}}]},R=async({options:e,signal:t,outputMode:n})=>{let r=L(),a=process.cwd();try{r.push(await F({environment:process.env,workingDirectory:a,signal:t}))}catch{t.throwIfAborted(),r.push({id:`path`,status:`fail`,message:`Could not inspect executables on PATH.`})}r.push(...await I({explicitPath:d.i(e,`path`),workingDirectory:a,signal:t})),r.push(...await N({environment:process.env,configPath:v.t(),remoteFlag:d.i(e,`remote`),offline:d.t(e,`offline`),signal:t})),t.throwIfAborted();let o=r.filter(e=>e.status===`fail`),s=O(r,i.t(o)?process.stderr:process.stdout);if(i.t(o))throw new c.t({code:`DOCTOR_FAILED`,message:`${o.length} doctor ${o.length===1?`check`:`checks`} failed.`,hint:n===`human`?s:`Read error.details.checks for the failures and recovery hints.`,details:{checks:r}});return{data:{checks:r},human:s}};exports.runDoctorCommand=R;
@@ -0,0 +1 @@
1
+ const e=require("./rolldown-runtime-mLOUI7ql.cjs"),t=require("./satisfies-Jm-ashRt.cjs"),n=require("./isDefined-CJctgvfE.cjs"),r=require("./cli-error-CrUD8uMp.cjs"),i=require("./read-command-values-l5T9Lba4.cjs"),a=require("./get-config-path-C-D-QHuX.cjs"),o=require("./read-config-6GnzcpJm.cjs"),s=require("./get-mismatched-remote-url-D5jFYvVx.cjs"),c=require("./read-local-container-Cs3cWspd.cjs"),l=require("./wait-for-local-environment-zNEJcWA1.cjs");var u=e.r(t.t()),d=async({apiUrl:e,remoteName:t})=>{let i=`twenty auth login --url ${e} --name ${t}`;try{let r=s.t({config:await o.t(a.t()),remoteName:t,apiUrl:e});if(n.t(r))return`Saved remote "${t}" currently points to ${r}.\nTo sign in at ${e} and update saved remote "${t}", run:\n ${i} --replace`}catch(e){if(!(e instanceof r.t)||![`INVALID_CONFIG`,`INVALID_API_URL`].includes(e.code))throw e}return`Sign in: ${i}`},f=async({options:e,arguments:t,output:a,signal:o})=>{let{environment:s,port:f}=c.r(e),p=i.n(t,0),m=n.t(p)?l.r(p):void 0;await c.o(o);let h=await c.n({environment:s,signal:o}),g=h?.port??f??s.port;if(n.t(h)&&(n.t(f)&&f!==h.port||n.t(m)&&m!==h.image))throw new r.t({code:`CONFLICT`,message:`${s.name} already uses ${h.image} on port ${h.port}.`,hint:`Omit --port to reuse this instance. Use twenty local upgrade to change its version.`});let _=n.t(h)?l.i():void 0;if(n.t(h)&&n.t(_)){let e;try{e=await l.a({imageId:h.imageId,signal:o})}catch(e){if(o.throwIfAborted(),!(e instanceof r.t)||e.code!==`INVALID_RESPONSE`)throw e}(!n.t(e)||!(0,u.default)(e,_))&&a.warn({code:`LOCAL_VERSION_MISMATCH`,message:`The existing image ${h.image} does not establish compatibility with engines.twenty ${_}. Use twenty local upgrade to change version.`})}if(n.t(h)&&!h.isRunning&&(a.progress({message:`Starting the existing local environment…`}),await c.s({args:[`start`,h.id],signal:o})),!n.t(h)){let e=m??await l.n({version:void 0,signal:o});a.progress({message:`Pulling ${e}…`}),await c.s({args:[`pull`,e],signal:o}),a.progress({message:`Starting ${e} on http://localhost:${g}…`}),await l.s({environment:s,image:e,port:g,signal:o})}a.progress({message:`Waiting for the local environment to be ready…`});let v=await l.t({environment:{...s,port:g},signal:o}),y=await d({apiUrl:v.url,remoteName:e.test?`local-test`:`local`});return{data:v,human:`Local Twenty is ready at ${v.url}\n${y}`}};exports.runLocalStartCommand=f;
@@ -1,3 +1,3 @@
1
- const e=require("./build--4zYt4wd.cjs"),t=require("./isDefined-CJctgvfE.cjs"),n=require("./isNonEmptyArray-v52xg4Xj.cjs"),r=require("./cli-error-CrUD8uMp.cjs"),i=require("./read-command-values-l5T9Lba4.cjs"),a=require("./format-details-COEwKz_M.cjs"),o=require("./format-table-4drtI5sP.cjs"),s=require("./format-metadata-owner-ByoX2plp.cjs"),c=require("./fetch-metadata-inspection-ooyNi2DN.cjs"),l=require("./format-metadata-fields-DmRandPR.cjs");var u=e.t(),d=e=>t.t(e)?String(e):`unknown`,f=async({arguments:e,target:f,signal:p,output:m})=>{let h=i.n(e,1)??``,{object:g,fields:_}=await c.t({objectName:i.n(e,0)??``,target:f,signal:p,output:m}),v=_.filter(e=>e.name===h);if(v.length>1)throw new r.t({code:`AMBIGUOUS_RESOURCE`,exitCode:r.n.USAGE,message:`More than one field has the API name ${h} on ${g.namePlural}.`});let y=v[0];if(!t.t(y))throw new r.t({code:`NOT_FOUND`,exitCode:r.n.NOT_FOUND,message:`No field has the API name ${h} on ${g.namePlural}.`,hint:`Use an exact API name from twenty metadata field list ${g.namePlural} --all.`});let b=l.r(y);return{data:{object:g,field:y},human:[`${y.label} (${y.name}) on ${g.namePlural}`,a.t([[`ID`,y.id],[`Type`,y.type],[`Owner`,s.t(y.owner)],[`Active`,d(y.isActive)],[`System`,d(y.isSystem)],[`Nullable`,d(y.isNullable)],[`Unique`,d(y.isUnique)],[`Default`,JSON.stringify(y.defaultValue??null)]]),y.description??``,l.n(y),n.t(b)?o.t({rows:b,columns:[{header:`OPTION`,value:e=>String(e.label??``)},{header:`VALUE`,value:e=>String(e.value??``)},{header:`COLOR`,value:e=>String(e.color??``)}]}):``].filter(u.isNonEmptyString).join(`
1
+ const e=require("./build--4zYt4wd.cjs"),t=require("./isDefined-CJctgvfE.cjs"),n=require("./isNonEmptyArray-v52xg4Xj.cjs"),r=require("./cli-error-CrUD8uMp.cjs"),i=require("./read-command-values-l5T9Lba4.cjs"),a=require("./format-details-COEwKz_M.cjs"),o=require("./format-table-4drtI5sP.cjs"),s=require("./format-metadata-owner-ByoX2plp.cjs"),c=require("./fetch-metadata-inspection-DN8am1j0.cjs"),l=require("./format-metadata-fields-DmRandPR.cjs");var u=e.t(),d=e=>t.t(e)?String(e):`unknown`,f=async({arguments:e,target:f,signal:p,output:m})=>{let h=i.n(e,1)??``,{object:g,fields:_}=await c.t({objectName:i.n(e,0)??``,target:f,signal:p,output:m}),v=_.filter(e=>e.name===h);if(v.length>1)throw new r.t({code:`AMBIGUOUS_RESOURCE`,exitCode:r.n.USAGE,message:`More than one field has the API name ${h} on ${g.namePlural}.`});let y=v[0];if(!t.t(y))throw new r.t({code:`NOT_FOUND`,exitCode:r.n.NOT_FOUND,message:`No field has the API name ${h} on ${g.namePlural}.`,hint:`Use an exact API name from twenty metadata field list ${g.namePlural} --all.`});let b=l.r(y);return{data:{object:g,field:y},human:[`${y.label} (${y.name}) on ${g.namePlural}`,a.t([[`ID`,y.id],[`Type`,y.type],[`Owner`,s.t(y.owner)],[`Active`,d(y.isActive)],[`System`,d(y.isSystem)],[`Nullable`,d(y.isNullable)],[`Unique`,d(y.isUnique)],[`Default`,JSON.stringify(y.defaultValue??null)]]),y.description??``,l.n(y),n.t(b)?o.t({rows:b,columns:[{header:`OPTION`,value:e=>String(e.label??``)},{header:`VALUE`,value:e=>String(e.value??``)},{header:`COLOR`,value:e=>String(e.color??``)}]}):``].filter(u.isNonEmptyString).join(`
2
2
 
3
3
  `)}};exports.runMetadataFieldDescribeCommand=f;
@@ -1,3 +1,3 @@
1
- const e=require("./read-command-values-l5T9Lba4.cjs"),t=require("./fetch-metadata-inspection-ooyNi2DN.cjs"),n=require("./format-metadata-fields-DmRandPR.cjs");var r=({fields:e,includeSystemFields:t})=>{let n=e.filter(e=>t||e.isSystem!==!0);return{fields:n,hiddenSystemFieldCount:e.length-n.length}},i=async({arguments:i,options:a,target:o,signal:s,output:c})=>{let l=await t.t({objectName:e.n(i,0)??``,target:o,signal:s,output:c}),{object:u}=l,{fields:d,hiddenSystemFieldCount:f}=r({fields:l.fields,includeSystemFields:e.t(a,`all`)});return{data:{object:u,fields:d,hiddenSystemFieldCount:f},human:[`${u.labelPlural} (${u.namePlural})`,n.t({fields:d,hiddenSystemFieldCount:f,labelIdentifierFieldMetadataId:u.labelIdentifierFieldMetadataId})].join(`
1
+ const e=require("./read-command-values-l5T9Lba4.cjs"),t=require("./fetch-metadata-inspection-DN8am1j0.cjs"),n=require("./format-metadata-fields-DmRandPR.cjs");var r=({fields:e,includeSystemFields:t})=>{let n=e.filter(e=>t||e.isSystem!==!0);return{fields:n,hiddenSystemFieldCount:e.length-n.length}},i=async({arguments:i,options:a,target:o,signal:s,output:c})=>{let l=await t.t({objectName:e.n(i,0)??``,target:o,signal:s,output:c}),{object:u}=l,{fields:d,hiddenSystemFieldCount:f}=r({fields:l.fields,includeSystemFields:e.t(a,`all`)});return{data:{object:u,fields:d,hiddenSystemFieldCount:f},human:[`${u.labelPlural} (${u.namePlural})`,n.t({fields:d,hiddenSystemFieldCount:f,labelIdentifierFieldMetadataId:u.labelIdentifierFieldMetadataId})].join(`
2
2
 
3
3
  `)}};exports.runMetadataFieldListCommand=i;
@@ -1,3 +1,3 @@
1
- const e=require("./build--4zYt4wd.cjs"),t=require("./read-command-values-l5T9Lba4.cjs"),n=require("./style-BR52fK4V.cjs"),r=require("./format-data-value-D_1TNU-r.cjs"),i=require("./format-details-COEwKz_M.cjs"),a=require("./format-metadata-owner-ByoX2plp.cjs"),o=require("./fetch-metadata-inspection-ooyNi2DN.cjs");var s=e.t(),c=async({arguments:e,target:c,signal:l,output:u})=>{let{object:d}=await o.t({objectName:t.n(e,0)??``,target:c,signal:l,output:u});return{data:{object:d},human:[`${d.labelPlural} (${d.namePlural})`,i.t([[`ID`,d.id],[`API names`,`${d.nameSingular} / ${d.namePlural}`],...(0,s.isNonEmptyString)(d.description)?[[`Description`,r.r(d.description)]]:[],[`Owner`,a.t(d.owner)],[`Active`,String(d.isActive)],[`System`,String(d.isSystem)],[`Searchable`,String(d.isSearchable)]]),`Fields: ${n.r(`twenty metadata field list ${d.namePlural}`)}`].join(`
1
+ const e=require("./build--4zYt4wd.cjs"),t=require("./read-command-values-l5T9Lba4.cjs"),n=require("./style-BR52fK4V.cjs"),r=require("./format-data-value-D_1TNU-r.cjs"),i=require("./format-details-COEwKz_M.cjs"),a=require("./format-metadata-owner-ByoX2plp.cjs"),o=require("./fetch-metadata-inspection-DN8am1j0.cjs");var s=e.t(),c=async({arguments:e,target:c,signal:l,output:u})=>{let{object:d}=await o.t({objectName:t.n(e,0)??``,target:c,signal:l,output:u});return{data:{object:d},human:[`${d.labelPlural} (${d.namePlural})`,i.t([[`ID`,d.id],[`API names`,`${d.nameSingular} / ${d.namePlural}`],...(0,s.isNonEmptyString)(d.description)?[[`Description`,r.r(d.description)]]:[],[`Owner`,a.t(d.owner)],[`Active`,String(d.isActive)],[`System`,String(d.isSystem)],[`Searchable`,String(d.isSearchable)]]),`Fields: ${n.r(`twenty metadata field list ${d.namePlural}`)}`].join(`
2
2
 
3
3
  `)}};exports.runMetadataObjectDescribeCommand=c;
@@ -1,2 +1,2 @@
1
- const e=require("./read-command-values-l5T9Lba4.cjs"),t=require("./style-BR52fK4V.cjs"),n=require("./create-metadata-client-FopHnDj0.cjs"),r=require("./format-table-4drtI5sP.cjs"),i=require("./metadata-page.constant-D4-pGQWp.cjs"),a=require("./format-metadata-owner-ByoX2plp.cjs");var o=[`standard`,`application`,`custom`,`unknown`],s=(e,t)=>e.query({objects:{__args:{paging:{first:i.t,after:t},filter:{}},pageInfo:{hasNextPage:!0,endCursor:!0},edges:{node:{nameSingular:!0,namePlural:!0,labelSingular:!0,labelPlural:!0,isSystem:!0,isActive:!0,applicationId:!0}}},currentWorkspace:{workspaceCustomApplicationId:!0}}),c=async({options:c,output:l,target:u,signal:d})=>{let f=e.t(c,`all`),p=n.t({target:u,signal:d}),[{objects:m,currentWorkspace:h},{applications:g,areOwnersNamed:_}]=await Promise.all([s(p),a.r(p)]),v=await i.n(async e=>e===void 0?m:(await s(p,e)).objects);_||l.warn({code:`OWNERS_UNAVAILABLE`,message:`Owners other than Custom show as unknown: listing apps needs the Workspace Apps permission.`});let y=a.n({applications:g,workspaceCustomApplicationId:h.workspaceCustomApplicationId}),b=v.map(({applicationId:e,...t})=>({...t,owner:y(e)})),x=b.filter(e=>f||!e.isSystem).sort((e,t)=>{let n=o.indexOf(e.owner.kind)-o.indexOf(t.owner.kind);return n===0?e.namePlural.localeCompare(t.namePlural):n}),S=b.length-x.length;return{data:{objects:x,hiddenSystemObjectCount:S},human:[r.t({rows:x,columns:[{header:`API NAME`,value:e=>e.namePlural},{header:`LABEL`,value:e=>e.isActive?e.labelPlural:`${e.labelPlural} ${t.i(`(inactive)`)}`},{header:`OWNER`,value:e=>a.t(e.owner)}]}),t.i(S>0?`${x.length} objects · ${S} system objects hidden, show them with --all`:`${x.length} objects`)].join(`
1
+ const e=require("./read-command-values-l5T9Lba4.cjs"),t=require("./style-BR52fK4V.cjs"),n=require("./create-metadata-client-CrOsu4u3.cjs"),r=require("./format-table-4drtI5sP.cjs"),i=require("./metadata-page.constant-D4-pGQWp.cjs"),a=require("./format-metadata-owner-ByoX2plp.cjs");var o=[`standard`,`application`,`custom`,`unknown`],s=(e,t)=>e.query({objects:{__args:{paging:{first:i.t,after:t},filter:{}},pageInfo:{hasNextPage:!0,endCursor:!0},edges:{node:{nameSingular:!0,namePlural:!0,labelSingular:!0,labelPlural:!0,isSystem:!0,isActive:!0,applicationId:!0}}},currentWorkspace:{workspaceCustomApplicationId:!0}}),c=async({options:c,output:l,target:u,signal:d})=>{let f=e.t(c,`all`),p=n.t({target:u,signal:d}),[{objects:m,currentWorkspace:h},{applications:g,areOwnersNamed:_}]=await Promise.all([s(p),a.r(p)]),v=await i.n(async e=>e===void 0?m:(await s(p,e)).objects);_||l.warn({code:`OWNERS_UNAVAILABLE`,message:`Owners other than Custom show as unknown: listing apps needs the Workspace Apps permission.`});let y=a.n({applications:g,workspaceCustomApplicationId:h.workspaceCustomApplicationId}),b=v.map(({applicationId:e,...t})=>({...t,owner:y(e)})),x=b.filter(e=>f||!e.isSystem).sort((e,t)=>{let n=o.indexOf(e.owner.kind)-o.indexOf(t.owner.kind);return n===0?e.namePlural.localeCompare(t.namePlural):n}),S=b.length-x.length;return{data:{objects:x,hiddenSystemObjectCount:S},human:[r.t({rows:x,columns:[{header:`API NAME`,value:e=>e.namePlural},{header:`LABEL`,value:e=>e.isActive?e.labelPlural:`${e.labelPlural} ${t.i(`(inactive)`)}`},{header:`OWNER`,value:e=>a.t(e.owner)}]}),t.i(S>0?`${x.length} objects · ${S} system objects hidden, show them with --all`:`${x.length} objects`)].join(`
2
2
  `)}};exports.runMetadataObjectListCommand=c;
@@ -1 +1 @@
1
- const e=require("./build--4zYt4wd.cjs"),t=require("./isDefined-CJctgvfE.cjs"),n=require("./isPlainObject-fJEJm71P.cjs"),r=require("./cli-error-CrUD8uMp.cjs"),i=require("./api-url-protocols.constant-EEmR3Pmg.cjs"),a=require("./read-command-values-l5T9Lba4.cjs"),o=require("./resolve-request-url-CfvGDGkw.cjs"),s=require("./is-interaction-allowed-BQLOG8RG.cjs"),c=require("./create-metadata-client-FopHnDj0.cjs"),l=require("./open-browser-LPuVspT7.cjs");var u=({workspaceUrl:e,page:n})=>{if(!t.t(n))return e.href;let i=URL.parse(n,e);if(!t.t(i)||i.origin!==e.origin||i.pathname.startsWith(`//`))throw new r.t({code:`USAGE`,exitCode:r.n.USAGE,message:`${n} is not a page of the workspace.`,hint:`Pass a path inside the workspace, for example settings/applications.`});return i.href},d=e.t(),f=(e,n)=>{let a=(0,d.isNonEmptyString)(e)?URL.parse(e):null;if(!t.t(a)||!i.t.includes(a.protocol))throw new r.t({code:`INVALID_RESPONSE`,message:`${n} did not return a web address for this workspace.`});return a},p=async({target:e,signal:t})=>{let{currentWorkspace:r}=await c.t({target:e,signal:t}).query({currentWorkspace:{workspaceUrls:{customUrl:!0,subdomainUrl:!0}}}),i=r?.workspaceUrls,a=(0,d.isNonEmptyString)(i?.customUrl)?i.customUrl:i?.subdomainUrl;if((0,d.isNonEmptyString)(a))return f(a,e.apiUrl);let s=await o.r({apiUrl:e.apiUrl,proxyHeaders:e.proxyHeaders,signal:t})(o.t({apiUrl:e.apiUrl,path:`/.well-known/oauth-authorization-server`}),{headers:{Accept:`application/json`}}),l=await o.n(s),u=f(s.ok&&n.t(l)?l.authorization_endpoint:void 0,e.apiUrl);return new URL(u.origin)},m=async({arguments:e,options:t,outputMode:n,target:i,signal:o})=>{let c=a.t(t,`urlOnly`);if(!c&&!s.t({options:t,outputMode:n}))throw new r.t({code:`USAGE`,exitCode:r.n.USAGE,message:`twenty open only opens a browser in an interactive terminal, not with --no-input, JSON output, redirected stdin or in CI.`,hint:`Add --url-only to print the address instead.`});let d=u({workspaceUrl:await p({target:i,signal:o}),page:a.n(e,0)});return c?{data:{url:d},human:d}:(l.t(d),{data:{url:d},human:`Opening ${d} in your browser.`})};exports.runOpenCommand=m;
1
+ const e=require("./build--4zYt4wd.cjs"),t=require("./isDefined-CJctgvfE.cjs"),n=require("./isPlainObject-fJEJm71P.cjs"),r=require("./cli-error-CrUD8uMp.cjs"),i=require("./api-url-protocols.constant-EEmR3Pmg.cjs"),a=require("./read-command-values-l5T9Lba4.cjs"),o=require("./resolve-request-url-CfvGDGkw.cjs"),s=require("./is-interaction-allowed-BQLOG8RG.cjs"),c=require("./create-metadata-client-CrOsu4u3.cjs"),l=require("./open-browser-LPuVspT7.cjs");var u=({workspaceUrl:e,page:n})=>{if(!t.t(n))return e.href;let i=URL.parse(n,e);if(!t.t(i)||i.origin!==e.origin||i.pathname.startsWith(`//`))throw new r.t({code:`USAGE`,exitCode:r.n.USAGE,message:`${n} is not a page of the workspace.`,hint:`Pass a path inside the workspace, for example settings/applications.`});return i.href},d=e.t(),f=(e,n)=>{let a=(0,d.isNonEmptyString)(e)?URL.parse(e):null;if(!t.t(a)||!i.t.includes(a.protocol))throw new r.t({code:`INVALID_RESPONSE`,message:`${n} did not return a web address for this workspace.`});return a},p=async({target:e,signal:t})=>{let{currentWorkspace:r}=await c.t({target:e,signal:t}).query({currentWorkspace:{workspaceUrls:{customUrl:!0,subdomainUrl:!0}}}),i=r?.workspaceUrls,a=(0,d.isNonEmptyString)(i?.customUrl)?i.customUrl:i?.subdomainUrl;if((0,d.isNonEmptyString)(a))return f(a,e.apiUrl);let s=await o.r({apiUrl:e.apiUrl,proxyHeaders:e.proxyHeaders,signal:t})(o.t({apiUrl:e.apiUrl,path:`/.well-known/oauth-authorization-server`}),{headers:{Accept:`application/json`}}),l=await o.n(s),u=f(s.ok&&n.t(l)?l.authorization_endpoint:void 0,e.apiUrl);return new URL(u.origin)},m=async({arguments:e,options:t,outputMode:n,target:i,signal:o})=>{let c=a.t(t,`urlOnly`);if(!c&&!s.t({options:t,outputMode:n}))throw new r.t({code:`USAGE`,exitCode:r.n.USAGE,message:`twenty open only opens a browser in an interactive terminal, not with --no-input, JSON output, redirected stdin or in CI.`,hint:`Add --url-only to print the address instead.`});let d=u({workspaceUrl:await p({target:i,signal:o}),page:a.n(e,0)});return c?{data:{url:d},human:d}:(l.t(d),{data:{url:d},human:`Opening ${d} in your browser.`})};exports.runOpenCommand=m;
@@ -1 +1 @@
1
- const e=require("./style-BR52fK4V.cjs"),t=require("./cli-version.constant-y_3mZ4gx.cjs");var n=async()=>{let n={version:t.t,node:process.versions.node,platform:process.platform,arch:process.arch};return{data:n,human:`twenty ${n.version} ${e.i(`(node ${n.node}, ${n.platform}-${n.arch})`)}`}};exports.runVersionCommand=n;
1
+ const e=require("./style-BR52fK4V.cjs"),t=require("./cli-version.constant-Dn-WFWf8.cjs");var n=async()=>{let n={version:t.t,node:process.versions.node,platform:process.platform,arch:process.arch};return{data:n,human:`twenty ${n.version} ${e.i(`(node ${n.node}, ${n.platform}-${n.arch})`)}`}};exports.runVersionCommand=n;
@@ -1 +1 @@
1
- const e=require("./isDefined-CJctgvfE.cjs"),t=require("./cli-error-CrUD8uMp.cjs"),n=require("./parse-api-url-B5c0Gh_n.cjs"),r=require("./confirm-in-terminal-D2e1lKUY.cjs"),i=require("./read-config-6GnzcpJm.cjs"),a=require("./get-credential-kind-qxy7oLdW.cjs"),o=require("./sign-in-with-browser-TQANmPyb.cjs"),s=require("./update-config-Bk0qgzgZ.cjs"),c=require("./fetch-signed-in-identity-nCzWXunB.cjs");var l=(r,i,o)=>{let s=Object.hasOwn(r.remotes,o)?r.remotes[o]:void 0;if(!e.t(s)||a.t(s)!==`oauth`||s.twentyCLIAccessToken!==i.bearerToken||n.t({rawUrl:s.apiUrl,sourceName:o})!==i.apiUrl)throw new t.t({code:`CONFLICT`,exitCode:t.n.CONFLICT,message:`Remote ${o} changed while signing in again. No credentials were saved.`,hint:`Run the command again.`});return s},u=async({target:e,remoteName:t,error:n,configPath:a,output:u,signal:d})=>{if(l(await i.t(a),e,t),!await r.t({question:`Your session on ${t} is no longer valid. Sign in again now?`,signal:d}))throw n;let f=await o.t({apiUrl:e.apiUrl,proxyHeaders:e.proxyHeaders,output:u,signal:d}),p={...e,bearerToken:f.accessToken};return await c.t({target:p,signal:d}),await s.t({configPath:a,signal:d,update:n=>{let r=l(n,e,t);return{result:void 0,config:{...n,remotes:{...n.remotes,[t]:o.n({remote:r,credentials:{kind:`oauth`,...f}})}}}}}),p};exports.signInToRemoteAgain=u;
1
+ const e=require("./isDefined-CJctgvfE.cjs"),t=require("./cli-error-CrUD8uMp.cjs"),n=require("./parse-api-url-B5c0Gh_n.cjs"),r=require("./confirm-in-terminal-D2e1lKUY.cjs"),i=require("./read-config-6GnzcpJm.cjs"),a=require("./get-credential-kind-qxy7oLdW.cjs"),o=require("./sign-in-with-browser-TQANmPyb.cjs"),s=require("./update-config-Bk0qgzgZ.cjs"),c=require("./fetch-signed-in-identity-kgzejZg2.cjs");var l=(r,i,o)=>{let s=Object.hasOwn(r.remotes,o)?r.remotes[o]:void 0;if(!e.t(s)||a.t(s)!==`oauth`||s.twentyCLIAccessToken!==i.bearerToken||n.t({rawUrl:s.apiUrl,sourceName:o})!==i.apiUrl)throw new t.t({code:`CONFLICT`,exitCode:t.n.CONFLICT,message:`Remote ${o} changed while signing in again. No credentials were saved.`,hint:`Run the command again.`});return s},u=async({target:e,remoteName:t,error:n,configPath:a,output:u,signal:d})=>{if(l(await i.t(a),e,t),!await r.t({question:`Your session on ${t} is no longer valid. Sign in again now?`,signal:d}))throw n;let f=await o.t({apiUrl:e.apiUrl,proxyHeaders:e.proxyHeaders,output:u,signal:d}),p={...e,bearerToken:f.accessToken};return await c.t({target:p,signal:d}),await s.t({configPath:a,signal:d,update:n=>{let r=l(n,e,t);return{result:void 0,config:{...n,remotes:{...n.remotes,[t]:o.n({remote:r,credentials:{kind:`oauth`,...f}})}}}}}),p};exports.signInToRemoteAgain=u;
@@ -0,0 +1 @@
1
+ const e=require("./isDefined-CJctgvfE.cjs"),t=require("./get-field-universal-identifier.util-d1401qKf.cjs"),n=require("./TwentyStandardApplicationUniversalIdentifier-Cm4vo0D3.cjs");var r=function(e){return e.VIEW=`VIEW`,e.IFRAME=`IFRAME`,e.FIELD=`FIELD`,e.FIELDS=`FIELDS`,e.GRAPH=`GRAPH`,e.STANDALONE_RICH_TEXT=`STANDALONE_RICH_TEXT`,e.TIMELINE=`TIMELINE`,e.TASKS=`TASKS`,e.NOTES=`NOTES`,e.FILES=`FILES`,e.EMAILS=`EMAILS`,e.CALENDAR=`CALENDAR`,e.FIELD_RICH_TEXT=`FIELD_RICH_TEXT`,e.WORKFLOW=`WORKFLOW`,e.WORKFLOW_VERSION=`WORKFLOW_VERSION`,e.WORKFLOW_RUN=`WORKFLOW_RUN`,e.FRONT_COMPONENT=`FRONT_COMPONENT`,e.RECORD_TABLE=`RECORD_TABLE`,e.EMAIL_THREAD=`EMAIL_THREAD`,e.CALL_RECORDING_SUMMARY=`CALL_RECORDING_SUMMARY`,e.CALL_RECORDING_TRANSCRIPT=`CALL_RECORDING_TRANSCRIPT`,e.MESSAGE_CAMPAIGN_BODY=`MESSAGE_CAMPAIGN_BODY`,e.MESSAGE_CAMPAIGN_DETAILS=`MESSAGE_CAMPAIGN_DETAILS`,e.FORM_FIELD=`FORM_FIELD`,e.CHAT_THREADS=`CHAT_THREADS`,e.CHAT=`CHAT`,e}({}),i=function(e){return e.IS=`IS`,e.IS_NOT_NULL=`IS_NOT_NULL`,e.IS_NOT=`IS_NOT`,e.LESS_THAN_OR_EQUAL=`LESS_THAN_OR_EQUAL`,e.GREATER_THAN_OR_EQUAL=`GREATER_THAN_OR_EQUAL`,e.IS_BEFORE=`IS_BEFORE`,e.IS_AFTER=`IS_AFTER`,e.CONTAINS=`CONTAINS`,e.DOES_NOT_CONTAIN=`DOES_NOT_CONTAIN`,e.IS_EMPTY=`IS_EMPTY`,e.IS_NOT_EMPTY=`IS_NOT_EMPTY`,e.IS_RELATIVE=`IS_RELATIVE`,e.IS_IN_PAST=`IS_IN_PAST`,e.IS_IN_FUTURE=`IS_IN_FUTURE`,e.IS_TODAY=`IS_TODAY`,e.VECTOR_SEARCH=`VECTOR_SEARCH`,e}({}),a=function(e){return e.GRID=`GRID`,e.VERTICAL_LIST=`VERTICAL_LIST`,e.CANVAS=`CANVAS`,e}({}),o=function(e){return e.RECORD_INDEX=`RECORD_INDEX`,e.RECORD_PAGE=`RECORD_PAGE`,e.DASHBOARD=`DASHBOARD`,e.STANDALONE_PAGE=`STANDALONE_PAGE`,e.RECORD_FORM=`RECORD_FORM`,e}({}),s=({applicationUniversalIdentifier:n,roleUniversalIdentifier:r,fieldUniversalIdentifier:i,rowLevelPermissionPredicateGroupUniversalIdentifier:a})=>t.n({entityNamespace:`fieldPermission`,value:[r,i,...e.t(a)?[a]:[]].join(`:`),applicationUniversalIdentifier:n}),c=({applicationUniversalIdentifier:e,roleUniversalIdentifier:n,objectUniversalIdentifier:r})=>t.n({entityNamespace:`objectPermission`,value:`${n}:${r}`,applicationUniversalIdentifier:e}),l=({applicationUniversalIdentifier:e,objectUniversalIdentifier:n,relationTargetObjectUniversalIdentifier:r})=>t.n({entityNamespace:`fieldMetadata`,value:`${n}:systemRelation:${r}`,applicationUniversalIdentifier:e}),u={INDEX:`INDEX`,FIELDS_WIDGET:`FIELDS_WIDGET`},d=({objectMetadataApplicationUniversalIdentifier:e,objectUniversalIdentifier:n,viewKey:r})=>t.n({entityNamespace:`view`,value:`${n}:${r}`,applicationUniversalIdentifier:e}),f={API_KEYS_AND_WEBHOOKS:`beb99803-9a0e-588d-9c4b-3dd14d9cdf21`,WORKSPACE:`86a58859-a539-5fa8-ba18-a6aaddc811b6`,WORKSPACE_MEMBERS:`ec342166-2df7-53e7-aa9b-64992d6cb35f`,ROLES:`80f1e5ab-484c-5660-a5a1-0ee7413d8190`,DATA_MODEL:`f0c08013-3c9a-5489-bd45-a641fe5f085d`,SECURITY:`4a8b6016-1d3d-5c94-bbe8-a74c5f32335a`,WORKFLOWS:`6189e7bd-4051-5752-b6b1-5f31358fbaf1`,IMPERSONATE:`dd2274d1-bbd5-551d-bcf2-3147539cef11`,SSO_BYPASS:`2e9cfdc0-4669-58ab-b241-b6c3c14d96df`,APPLICATIONS:`9faa55f7-2606-566b-9e1d-aefbedbd0136`,MARKETPLACE_APPS:`3a37e2f5-d3e4-56d6-b541-adf0237468ff`,LAYOUTS:`458d1ee5-ba12-5f4e-9d17-6f8c11fcd7fd`,BILLING:`24b66701-ed97-51e4-aa63-794e1b31414c`,AI_SETTINGS:`e8cc4a30-c120-5925-8f5d-73d6a2247fee`,AI:`1c7f09a7-367d-568b-a0e8-c274eccd6ee3`,VIEWS:`c68354c4-535d-53a9-848a-e3a6774b5fb8`,UPLOAD_FILE:`dc6931a9-44bd-5164-a983-3db5db837f54`,DOWNLOAD_FILE:`6edf252f-228e-5e2f-9706-7bab7a796fd3`,SEND_EMAIL_TOOL:`19f382a8-689d-5792-a18c-737f0ce9025f`,CREATE_CALENDAR_EVENT_TOOL:`5b8c104e-24d3-4e89-986b-1d9208df6cf4`,HTTP_REQUEST_TOOL:`1bf49cf1-bb8f-5eb9-809a-5f34ea79fc6a`,CODE_INTERPRETER_TOOL:`11f31c3a-7042-54b7-a2dd-ae31dd9e9fa2`,IMPORT_CSV:`c4912536-a4db-5af9-85ac-be2919c24c5e`,EXPORT_CSV:`88efced9-ca6d-5316-a695-f1b9158e7370`,CONNECTED_ACCOUNTS:`e5f63b2d-5369-5df6-8f32-a8bd9e79e653`,PROFILE_INFORMATION:`7c13f23f-78d8-5e7d-8963-a7c8772fb4e8`,READ_PRIVATE_CHANNELS:`a0b3ee37-a031-50ff-8092-a3653cdfeeec`},p={agentChatThread:`fab0fff8-0c90-4116-9bb0-7dbc07392633`,agentChatThreadTarget:`9f2a5bf4-3a57-4e61-b561-eaf5a5b86973`,agentChatThreadParticipant:`a043622a-48ef-426f-b55d-3fdcf4ae52f2`,agentTurn:`63697477-8606-415e-86cb-be078d7fcf7e`,agentMessage:`62d0354c-3b99-4769-b0f5-4e2651c2ca7d`,agentMessagePart:`214bacb0-df89-494e-be42-e5b11c99cff6`,agentMessageReaction:`7d34e524-cbaf-4a53-b021-eb0313397f22`,campaignDelivery:`0c76066d-26f7-4f57-b0bd-0eb61465fb1a`,messageSuppression:`41410724-723c-48ab-8312-9b85131b4d84`,timelineActivity:`20202020-6736-4337-b5c4-8b39fae325a5`,attachment:`20202020-bd3d-4c60-8dca-571c71d4447a`,blocklist:`20202020-0408-4f38-b8a8-4d5e3e26e24d`,calendarChannelEventAssociation:`20202020-491b-4aaa-9825-afd1bae6ae00`,calendarEvent:`20202020-8f1d-4eef-9f85-0d1965e27221`,calendarEventTarget:`6a9b9656-3e23-4234-94a4-b913c5dde668`,calendarEventParticipant:`20202020-a1c3-47a6-9732-27e5b1e8436d`,callRecording:`ce19efb9-710f-45b2-b141-473abbeea60b`,noteTarget:`20202020-fff0-4b44-be82-bda313884400`,taskTarget:`20202020-5a9a-44e8-95df-771cd06d0fb1`,person:`20202020-e674-48e5-a542-72570eee7213`,recordShare:`fecdb92c-d150-4544-81f8-f1158d18a7a2`,accessGroup:`47f4ed44-4312-467f-b6f5-787f91037a1d`,company:`20202020-b374-4779-a561-80086cb2e17f`,opportunity:`20202020-9549-49dd-b2b2-883999db8938`,note:`20202020-0b00-45cd-b6f6-6cd806fc6804`,task:`20202020-1ba1-48ba-bc83-ef7e5990ed10`,workflow:`20202020-62be-406c-b9ca-8caa50d51392`,workflowAutomatedTrigger:`20202020-3319-4234-a34c-7f3b9d2e4d1f`,workflowVersion:`20202020-d65d-4ab9-9344-d77bfb376a3d`,workflowRun:`20202020-4e28-4e95-a9d7-6c00874f843c`,workspaceMember:`20202020-3319-4234-a34c-82d5c0e881a6`,dashboard:`20202020-3840-4b6d-9425-0c5188b05ca8`,message:`20202020-3f6b-4425-80ab-e468899ab4b2`,messageChannelMessageAssociation:`20202020-ad1e-4127-bccb-d83ae04d2ccb`,messageChannelMessageAssociationMessageFolder:`20202020-a1b0-40b0-8ab0-5b6c7d8e9f0a`,messageList:`826561ea-4816-411c-baa0-eec5e6ca8866`,messageListMember:`27773d24-8ce3-40f8-aa6c-1f590f2c08d2`,messageCampaign:`238acb94-dd4c-4036-bc55-19b99d821efd`,shortLink:`22c96608-d1b1-49a2-b328-3e738d61d82d`,messageParticipant:`20202020-a433-4456-aa2d-fd9cb26b774a`,messageThread:`20202020-849a-4c3e-84f5-a25a7d802271`,messageThreadTarget:`378ad1b0-592d-4084-80ee-86fef44725b9`},m=[`id`,`createdAt`,`updatedAt`,`deletedAt`,`createdBy`,`updatedBy`,`position`,`searchVector`],h=e=>Object.fromEntries(m.map(r=>[r,{universalIdentifier:t.t({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:e,name:r})}])),g=e=>{let{id:t,createdAt:n,updatedAt:r,deletedAt:i}=h(e);return{id:t,createdAt:n,updatedAt:r,deletedAt:i}},_={agentChatThread:{...g(p.agentChatThread),archivedAt:{universalIdentifier:`b42eaf6f-240f-41ef-af61-51d5ac9cde7d`},workspaceMember:{universalIdentifier:`6f3ed3b5-0642-4a2a-9558-98376adb60f4`},title:{universalIdentifier:`9283c05e-127c-46ec-82e9-6424a7c0a2f1`},conversationType:{universalIdentifier:`66f93c2f-ae10-4c1a-8510-355a521f7899`},directMessageFirstWorkspaceMemberId:{universalIdentifier:`dd7e093b-06af-47f3-a246-57ae2de33244`},directMessageSecondWorkspaceMemberId:{universalIdentifier:`730c7491-35fa-4bce-90e1-29901e08eba3`},isAssistantParticipant:{universalIdentifier:`d901f5bc-23ba-48ac-9103-145da4b76afe`},totalInputTokens:{universalIdentifier:`2705f4af-24b8-4660-a8a8-8eff689298d1`},totalOutputTokens:{universalIdentifier:`77790c9c-0e91-4142-8482-d70576b8093b`},contextWindowTokens:{universalIdentifier:`c58dc0b0-bd0e-4ee2-8a80-615a2d8fc7c8`},conversationSize:{universalIdentifier:`f34617ff-a0de-4116-a5ad-7cfd1d0c6d5a`},totalInputCredits:{universalIdentifier:`3c0a9aa3-01b8-4191-bce4-dc9e77e2fe7a`},totalOutputCredits:{universalIdentifier:`40b2f6e5-eced-44f7-b391-0278ea7df7ef`},totalCacheReadTokens:{universalIdentifier:`494abfc8-d2f6-452c-913e-1f55d148f47f`},totalCacheCreationTokens:{universalIdentifier:`68bdb978-5ccb-4f64-9df2-8203b100c76a`},activeStreamId:{universalIdentifier:`bcead20f-75b3-45be-92b9-ea7ec4bddfcd`},pendingQuestionMessageId:{universalIdentifier:`51a9b421-7d90-4a59-9712-036ea9721e65`},turns:{universalIdentifier:`d5c88fbc-d318-4ee1-b70a-751a925bef5b`},messages:{universalIdentifier:`5c851a60-e5d9-4b1e-9926-c2eab6fc9e62`},attachments:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.agentChatThread,relationTargetObjectUniversalIdentifier:p.attachment})},recordTargets:{universalIdentifier:`5b37eceb-2992-4d27-9897-14af3e3ce9b2`},participants:{universalIdentifier:`2ede85e4-216b-4308-8556-b045971414e7`},assignee:{universalIdentifier:`e77858ef-4b01-4a32-b921-8b88b1fd3020`},channelId:{universalIdentifier:`5a3f55ff-a486-4a69-a673-7873deb306bd`},channelArchivedAt:{universalIdentifier:`ec6f5b94-277e-4f06-85f9-08d724518eda`},channelSnoozedUntil:{universalIdentifier:`6d2963a4-7266-42b9-8d76-a06c3f2b7520`},lastActivityAt:{universalIdentifier:`b3847509-8e98-4038-88de-dd891767d6fc`},lastMessageText:{universalIdentifier:`1c16eaef-172b-4778-b14b-f302bc6021e4`},lastMessageSenderWorkspaceMemberId:{universalIdentifier:`5c3611a7-7324-472e-9b43-4c7779e5e7cf`},writerWorkspaceMemberIds:{universalIdentifier:`c8fe2406-ad9c-4274-aeb5-9beb74d4b353`}},agentChatThreadParticipant:{...g(p.agentChatThreadParticipant),thread:{universalIdentifier:`7d0282a5-11ce-4da8-a165-30909ffdf383`},workspaceMember:{universalIdentifier:`4345764d-878b-4a3a-b1c9-822378f868e6`},lastReadAt:{universalIdentifier:`7e3a8319-c127-4c4f-add4-6feac37ea555`},archivedAt:{universalIdentifier:`ee092c9d-f27e-4fbc-8dad-9ec950936216`},snoozedUntil:{universalIdentifier:`65bc5785-877d-4363-b65c-95175ba20fd0`},isSubscribed:{universalIdentifier:`146b1d5e-6603-4493-944b-c3bd2817569b`},lastMentionedAt:{universalIdentifier:`52a54602-633f-496a-966a-9a70437fa887`},mentionsResolvedAt:{universalIdentifier:`12c0b0c8-86b2-48e5-8e2f-56a9eb9162c4`}},agentChatThreadTarget:{target:{universalIdentifier:`2c4cc537-39a2-4df9-81a1-dda26eb19658`},...g(p.agentChatThreadTarget),thread:{universalIdentifier:`54664c16-3c3d-4d5e-904c-59e1b3707cfb`},targetPerson:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.agentChatThreadTarget,relationTargetObjectUniversalIdentifier:p.person})},targetCompany:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.agentChatThreadTarget,relationTargetObjectUniversalIdentifier:p.company})},targetOpportunity:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.agentChatThreadTarget,relationTargetObjectUniversalIdentifier:p.opportunity})}},agentTurn:{...g(p.agentTurn),agentId:{universalIdentifier:`4ac55a9a-95e8-4fd9-8c03-47ee3b618ae7`},thread:{universalIdentifier:`4e9b4f1f-c1bb-42d0-bb38-eb2b2f830e64`},messages:{universalIdentifier:`737c3559-ea1a-4269-aea4-e672b17afbb1`},status:{universalIdentifier:`c17a4d49-f4f5-40e2-b084-11c5c4bae431`},error:{universalIdentifier:`b0ed90f6-5953-4c85-aff8-407a28ec8cc7`},startedAt:{universalIdentifier:`578977d7-b0d9-48d1-83f7-29ad6215a6f0`},endedAt:{universalIdentifier:`2b13f528-738b-402c-a033-7bbb0cce73a4`},modelId:{universalIdentifier:`b1e1c27b-03dc-40b1-8052-4474c15b8233`},inputTokens:{universalIdentifier:`0e419986-4255-4858-b252-e6a161d55f58`},outputTokens:{universalIdentifier:`3e7f5fb8-f9cf-45b2-b1a7-b36c1e8ff2fd`},cacheReadTokens:{universalIdentifier:`c2bcbbf5-81ce-4679-8f08-f6a3cc00569c`},cacheCreationTokens:{universalIdentifier:`4d9feae2-2a80-43b2-965d-8ad40f129503`},inputCredits:{universalIdentifier:`740456a7-c0be-4bc9-8429-52dc3e3a3707`},outputCredits:{universalIdentifier:`1ca5da82-b797-43a8-a2ee-d1a062a24ca5`},createdBy:{universalIdentifier:`c3d5e8a2-fde8-452d-a74d-04436aaf17bc`}},agentMessage:{...g(p.agentMessage),agentId:{universalIdentifier:`880a91ad-4ab1-4067-87f6-970a53aa2234`},senderWorkspaceMember:{universalIdentifier:`69bea8e1-451d-4c3c-9d34-505b5a67e06e`},senderApplicationId:{universalIdentifier:`d204d45a-6ccc-40cb-8281-b6ed635c247b`},role:{universalIdentifier:`5dc985f3-edad-4ebf-9844-b34ca686855b`},status:{universalIdentifier:`3845ccfa-9394-4cb9-a75c-4ca704414b83`},processedAt:{universalIdentifier:`b1a72274-095e-41f6-95d3-e5b407ff3f0b`},thread:{universalIdentifier:`48ea202f-ed6d-4ad9-8c9b-71a419b96237`},turn:{universalIdentifier:`b36513fc-ffaf-4e99-8686-b1aefca70b76`},parts:{universalIdentifier:`017e4930-118d-4624-8ce4-4e574f89f86d`},reactions:{universalIdentifier:`945e1e83-af08-45c9-8d6c-fb49f1e4a21c`}},agentMessageReaction:{...g(p.agentMessageReaction),message:{universalIdentifier:`18fec29f-89bd-4f33-8b80-f7a83a9a2e31`},workspaceMember:{universalIdentifier:`77265b6b-b634-426a-8972-8601947ca6ad`},agentId:{universalIdentifier:`08851641-cb7e-442c-a698-145ade9dd611`},emoji:{universalIdentifier:`88eeecdd-08a7-4744-bdd1-86b7f4a14394`}},agentMessagePart:{...g(p.agentMessagePart),orderIndex:{universalIdentifier:`d2b3e277-380c-4133-977d-f23f8092aebc`},type:{universalIdentifier:`16a59a7f-dc43-4483-84be-19c8ffd6c7a7`},textContent:{universalIdentifier:`d66ed60a-6c09-4427-a62a-1735e31b02de`},reasoningContent:{universalIdentifier:`34c24bb6-a34a-4373-b8b3-8be22fea3325`},toolName:{universalIdentifier:`ed705120-349b-4fce-afd4-15b8cab0df07`},toolCallId:{universalIdentifier:`151b6115-7071-4a1b-920d-43818907c69b`},toolInput:{universalIdentifier:`14476bb3-8b73-4428-b138-37bd7931e1d6`},toolOutput:{universalIdentifier:`5fe8ca78-52ab-466f-8fe7-cbfa618c5463`},state:{universalIdentifier:`6fa1fb8e-2335-4b48-838b-dd227958cab2`},providerExecuted:{universalIdentifier:`cbfee5eb-748e-4296-88be-ddc13393d88d`},errorMessage:{universalIdentifier:`f910bb7a-d1f8-4893-ad97-40342af62c21`},errorDetails:{universalIdentifier:`b9e6f2cf-b2ce-44fe-9507-d47805582654`},sourceUrlSourceId:{universalIdentifier:`cb66237e-f48a-4858-a882-2330978dcfdc`},sourceUrlUrl:{universalIdentifier:`31a94d35-03f2-41b7-aa2b-5615f286d2bb`},sourceUrlTitle:{universalIdentifier:`ad17f626-17fc-45e0-a09f-a61790a0f906`},sourceDocumentSourceId:{universalIdentifier:`a2afae35-4e3e-4fe5-bc96-9bb654adb810`},sourceDocumentMediaType:{universalIdentifier:`44a4e4f9-d005-493d-9832-3a217730eaf8`},sourceDocumentTitle:{universalIdentifier:`2951cfaa-d05e-47be-af17-c7af4685e4c0`},sourceDocumentFilename:{universalIdentifier:`2cdea0b3-0a4d-4fa8-b713-c0fbf0e0a2d4`},fileFilename:{universalIdentifier:`e908f82c-88d0-477b-a5f2-1798fc4090b8`},fileId:{universalIdentifier:`060b366e-bb3d-40b5-83e6-166629a40444`},providerMetadata:{universalIdentifier:`689d988e-3883-4ab6-9cf3-c36a3002f865`},message:{universalIdentifier:`efd41407-a49d-4a3a-97b4-94fd180e7652`}},campaignDelivery:{...g(p.campaignDelivery),campaignId:{universalIdentifier:`5b3b48cd-71ec-4ff6-bd4f-8ea99965d611`},personId:{universalIdentifier:`d12ac3bc-7d2c-4317-9c80-663e58ffbea2`},recipientEmail:{universalIdentifier:`28e61664-054b-4b41-b33b-d06b2fc7618f`},state:{universalIdentifier:`668eb863-852e-4846-b3f6-f74fc5d25cf9`},skipReason:{universalIdentifier:`86e995b9-467f-4570-a8f8-a647772e0944`},failureReason:{universalIdentifier:`5a080f14-de17-41a8-a2d7-e9287628db30`},claimToken:{universalIdentifier:`66b78eb0-7a53-4ad6-929a-156183490eb3`},claimExpiresAt:{universalIdentifier:`ba84a4ba-65ca-43dd-b72c-4b0f2f5b2f44`},providerMessageId:{universalIdentifier:`a560bd1a-716b-4fc3-b931-a34ff46bca6f`},sentAt:{universalIdentifier:`c4db7935-d927-49bd-80bd-01a6f39685a4`},deliveredAt:{universalIdentifier:`2cba1c4e-df5c-496d-8d0d-9f43fc371b5f`},bouncedAt:{universalIdentifier:`c3db41d4-3c48-4110-b3b3-a68cb82a1a78`},complainedAt:{universalIdentifier:`322301c5-62d6-428a-bc33-89f8eee75a47`},rejectedAt:{universalIdentifier:`de3599c8-d91b-42fb-a76f-34cd1826dd04`},renderingFailedAt:{universalIdentifier:`eca2b84e-a8d0-4641-bf16-48005e1826bd`}},messageSuppression:{...g(p.messageSuppression),emailAddress:{universalIdentifier:`d44cd615-c3ff-4ac5-a0cc-bfbda700df8e`},reason:{universalIdentifier:`2829a0be-f463-423c-810f-abf7b7a38454`},source:{universalIdentifier:`c0111315-babb-44ab-b4bb-8393ca7a4f98`},providerEventId:{universalIdentifier:`4959b0da-3ce2-42f7-8cc0-36fd20799a20`},unsubscribeTopicId:{universalIdentifier:`42c74315-d6d3-47f7-8f72-d7d40e41cc84`}},timelineActivity:{target:{universalIdentifier:`20202020-9a2b-4c3d-a4e5-f6a7b8c9d0e1`},...h(p.timelineActivity),timelineActivityTypeId:{universalIdentifier:`20202020-e5f8-4839-9dcf-781e260624ee`},timelineActivityTypeSnapshot:{universalIdentifier:`20202020-e006-493a-9b07-f2a768a204ca`},happensAt:{universalIdentifier:`20202020-9526-4993-b339-c4318c4d39f0`},properties:{universalIdentifier:`20202020-f142-4b04-b91b-6a2b4af3bf11`},workspaceMember:{universalIdentifier:`20202020-af23-4479-9a30-868edc474b36`},targetPerson:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.timelineActivity,relationTargetObjectUniversalIdentifier:p.person})},targetCompany:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.timelineActivity,relationTargetObjectUniversalIdentifier:p.company})},targetOpportunity:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.timelineActivity,relationTargetObjectUniversalIdentifier:p.opportunity})},targetTask:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.timelineActivity,relationTargetObjectUniversalIdentifier:p.task})},targetNote:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.timelineActivity,relationTargetObjectUniversalIdentifier:p.note})},targetWorkflowRun:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.timelineActivity,relationTargetObjectUniversalIdentifier:p.workflowRun})},targetDashboard:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.timelineActivity,relationTargetObjectUniversalIdentifier:p.dashboard})},targetMessageList:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.timelineActivity,relationTargetObjectUniversalIdentifier:p.messageList})},targetMessageCampaign:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.timelineActivity,relationTargetObjectUniversalIdentifier:p.messageCampaign})},linkedRecordCachedName:{universalIdentifier:`20202020-cfdb-4bef-bbce-a29f41230934`},linkedRecordId:{universalIdentifier:`20202020-2e0e-48c0-b445-ee6c1e61687d`},linkedObjectMetadataId:{universalIdentifier:`20202020-c595-449d-9f89-562758c9ee69`}},attachment:{target:{universalIdentifier:`20202020-f634-435d-ab8d-e1168b375c69`},...h(p.attachment),name:{universalIdentifier:`20202020-87a5-48f8-bbf7-ade388825a57`},file:{universalIdentifier:`20202020-15db-460e-8166-c7b5d87ad4be`},fullPath:{universalIdentifier:`20202020-0d19-453d-8e8d-fbcda8ca3747`},fileCategory:{universalIdentifier:`20202020-8c3f-4d9e-9a1b-2e5f7a8c9d0e`},targetTask:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.attachment,relationTargetObjectUniversalIdentifier:p.task})},targetNote:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.attachment,relationTargetObjectUniversalIdentifier:p.note})},targetPerson:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.attachment,relationTargetObjectUniversalIdentifier:p.person})},targetCompany:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.attachment,relationTargetObjectUniversalIdentifier:p.company})},targetOpportunity:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.attachment,relationTargetObjectUniversalIdentifier:p.opportunity})},targetDashboard:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.attachment,relationTargetObjectUniversalIdentifier:p.dashboard})},targetAgentChatThread:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.attachment,relationTargetObjectUniversalIdentifier:p.agentChatThread})},targetMessage:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.attachment,relationTargetObjectUniversalIdentifier:p.message})}},blocklist:{...h(p.blocklist),handle:{universalIdentifier:`20202020-eef3-44ed-aa32-4641d7fd4a3e`},scope:{universalIdentifier:`20202020-1a5f-4c9e-9b3e-7d2a6f4c8e11`},workspaceMember:{universalIdentifier:`20202020-548d-4084-a947-fa20a39f7c06`}},calendarChannelEventAssociation:{...h(p.calendarChannelEventAssociation),calendarChannelId:{universalIdentifier:`20202020-93ee-4da4-8d58-0282c4a9cb7d`},calendarEvent:{universalIdentifier:`20202020-5aa5-437e-bb86-f42d457783e3`},eventExternalId:{universalIdentifier:`20202020-9ec8-48bb-b279-21d0734a75a1`},recurringEventExternalId:{universalIdentifier:`20202020-c58f-4c69-9bf8-9518fa31aa50`}},calendarEventParticipant:{...h(p.calendarEventParticipant),calendarEvent:{universalIdentifier:`20202020-fe3a-401c-b889-af4f4657a861`},handle:{universalIdentifier:`20202020-8692-4580-8210-9e09cbd031a7`},displayName:{universalIdentifier:`20202020-ee1e-4f9f-8ac1-5c0b2f69691e`},isOrganizer:{universalIdentifier:`20202020-66e7-4e00-9e06-d06c92650580`},responseStatus:{universalIdentifier:`20202020-cec0-4be8-8fba-c366abc23147`},person:{universalIdentifier:`20202020-5761-4842-8186-e1898ef93966`},workspaceMember:{universalIdentifier:`20202020-20e4-4591-93ed-aeb17a4dcbd2`}},calendarEvent:{...h(p.calendarEvent),title:{universalIdentifier:`20202020-080e-49d1-b21d-9702a7e2525c`},isCanceled:{universalIdentifier:`20202020-335b-4e04-b470-43b84b64863c`},isFullDay:{universalIdentifier:`20202020-551c-402c-bb6d-dfe9efe86bcb`},startsAt:{universalIdentifier:`20202020-2c57-4c75-93c5-2ac950a6ed67`},endsAt:{universalIdentifier:`20202020-2554-4ee1-a617-17907f6bab21`},externalCreatedAt:{universalIdentifier:`20202020-9f03-4058-a898-346c62181599`},externalUpdatedAt:{universalIdentifier:`20202020-b355-4c18-8825-ef42c8a5a755`},description:{universalIdentifier:`20202020-52c4-4266-a98f-e90af0b4d271`},location:{universalIdentifier:`20202020-641a-4ffe-960d-c3c186d95b17`},iCalUid:{universalIdentifier:`20202020-f24b-45f4-b6a3-d2f9fcb98714`},conferenceSolution:{universalIdentifier:`20202020-1c3f-4b5a-b526-5411a82179eb`},conferenceLink:{universalIdentifier:`20202020-35da-43ef-9ca0-e936e9dc237b`},calendarChannelEventAssociations:{universalIdentifier:`20202020-bdf8-4572-a2cc-ecbb6bcc3a02`},calendarEventParticipants:{universalIdentifier:`20202020-e07e-4ccb-88f5-6f3d00458eec`},calendarEventTargets:{universalIdentifier:`2b4a0785-3462-485f-b1a8-79ebb2078eab`},callRecordings:{universalIdentifier:`48d6d151-18e2-4111-b405-d85fb9d860d8`}},calendarEventTarget:{target:{universalIdentifier:`676e9f68-7b5c-41e6-b46d-2fb9527b7051`},...h(p.calendarEventTarget),calendarEvent:{universalIdentifier:`a47824b0-0e64-4c1f-bbad-ce45209d119b`},isAutomaticallyAssigned:{universalIdentifier:`b6374fed-9cf2-49ef-b45a-1d6814c16264`},isManuallyAssigned:{universalIdentifier:`6afbd5b8-25b5-4c04-82e5-281e6f90f453`},targetPerson:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.calendarEventTarget,relationTargetObjectUniversalIdentifier:p.person})},targetCompany:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.calendarEventTarget,relationTargetObjectUniversalIdentifier:p.company})},targetOpportunity:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.calendarEventTarget,relationTargetObjectUniversalIdentifier:p.opportunity})}},callRecording:{...h(p.callRecording),title:{universalIdentifier:`4cff8863-a1d1-45fd-a370-4eb6aa1f2a5b`},status:{universalIdentifier:`3e617680-d93e-4309-a54f-90f69528bfd7`},recordingRequestStatus:{universalIdentifier:`7fd681c9-244c-4e98-8939-7b175d472638`},applicationId:{universalIdentifier:`24ec1239-1240-42cb-8a2d-302632378e09`},externalBotId:{universalIdentifier:`0a2da128-9bcc-488b-bc31-65318c41bdf9`},externalRecordingId:{universalIdentifier:`6d17fb71-324b-4625-a5be-b3580607e2c7`},startedAt:{universalIdentifier:`6c56c23f-1987-410a-860a-df3b2b3f9a33`},endedAt:{universalIdentifier:`7a38a9cf-8424-4d6e-b80a-6883d3c662ef`},video:{universalIdentifier:`bb9523d3-457e-4f4b-8c79-27a77afb87da`},audio:{universalIdentifier:`2eafc2d0-8fec-430c-a939-65ca5fbc0f08`},transcript:{universalIdentifier:`27b86d68-57d1-4607-aca0-191896b1ad43`},summary:{universalIdentifier:`adb0f472-756b-4d3f-b21e-ea32bf73a5e4`},calendarEvent:{universalIdentifier:`49e64b28-bd98-4775-80ea-4781bdd45e35`}},company:{...h(p.company),name:{universalIdentifier:`20202020-4d99-4e2e-a84c-4a27837b1ece`},domainName:{universalIdentifier:`20202020-0c28-43d8-8ba5-3659924d3489`},address:{universalIdentifier:`20202020-c5ce-4adc-b7b6-9c0979fc55e7`},linkedinLink:{universalIdentifier:`20202020-ebeb-4beb-b9ad-6848036fb451`},annualRevenue:{universalIdentifier:`60f533b7-2166-4071-a767-ceb0286822fd`},people:{universalIdentifier:`20202020-3213-4ddf-9494-6422bcff8d7c`},accountOwner:{universalIdentifier:`20202020-95b8-4e10-9881-edb5d4765f9d`},taskTargets:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.company,relationTargetObjectUniversalIdentifier:p.taskTarget})},noteTargets:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.company,relationTargetObjectUniversalIdentifier:p.noteTarget})},agentChatThreadTargets:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.company,relationTargetObjectUniversalIdentifier:p.agentChatThreadTarget})},calendarEventTargets:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.company,relationTargetObjectUniversalIdentifier:p.calendarEventTarget})},messageThreadTargets:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.company,relationTargetObjectUniversalIdentifier:p.messageThreadTarget})},opportunities:{universalIdentifier:`20202020-add3-4658-8e23-d70dccb6d0ec`},attachments:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.company,relationTargetObjectUniversalIdentifier:p.attachment})},timelineActivities:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.company,relationTargetObjectUniversalIdentifier:p.timelineActivity})}},dashboard:{...h(p.dashboard),title:{universalIdentifier:`20202020-20ee-4091-95dc-44b57eda3a89`},pageLayoutId:{universalIdentifier:`20202020-bb53-4648-aa36-1d9d54e6f7f2`},timelineActivities:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.dashboard,relationTargetObjectUniversalIdentifier:p.timelineActivity})},attachments:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.dashboard,relationTargetObjectUniversalIdentifier:p.attachment})}},messageCampaign:{...h(p.messageCampaign),name:{universalIdentifier:`dc8bca0e-37c4-4b78-814d-2e91124274e3`},subject:{universalIdentifier:`7251544c-b07a-4f0d-9d0a-48514367f230`},bodyTemplate:{universalIdentifier:`b3a69d08-31ca-4a8d-8359-5ca462899342`},fromAddress:{universalIdentifier:`91e1a33c-c1ff-411a-b720-9085e13c05db`},status:{universalIdentifier:`c7117256-3de6-48e1-87df-c99c32bad610`},scheduledAt:{universalIdentifier:`0b281092-f5a5-4dd6-969b-5229f6620071`},sentAt:{universalIdentifier:`e2315b4f-9edf-4df2-96b9-961e76368671`},sentCount:{universalIdentifier:`2f333d2b-37b8-4ddc-ad0d-c07c6ce066ad`},deliveredCount:{universalIdentifier:`f4ee1d33-7379-42fe-ad63-e023449baea6`},failedCount:{universalIdentifier:`d373fcd7-b1ce-4c77-8031-a5785c475028`},bouncedCount:{universalIdentifier:`20d884a9-34dd-4667-8ecb-ceec224258e2`},complainedCount:{universalIdentifier:`82842cfa-f12a-4bab-bbde-b2cf587d0406`},skippedCount:{universalIdentifier:`a1f4c6d2-5e8b-4a37-9c60-31b7f0d2a984`},uniqueClickCount:{universalIdentifier:`d9a4e1c6-5b3f-4e0a-9c8d-4f7b9a3e6c12`},clickRate:{universalIdentifier:`7999aebc-51f4-4b93-9925-717db707c703`},uniqueOpenCount:{universalIdentifier:`865d188f-3178-4173-a986-80d01a8c7147`},openRate:{universalIdentifier:`77529a55-d723-4c91-9df7-0190fd760e93`},unsubscribeTopicId:{universalIdentifier:`0648e7ad-1769-4ff6-a4d5-72da79ef169c`},list:{universalIdentifier:`cb24dcdf-f0e8-4c71-8cff-70b714e86530`},timelineActivities:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.messageCampaign,relationTargetObjectUniversalIdentifier:p.timelineActivity})},messages:{universalIdentifier:`e5a177a7-512b-4778-928e-69777a528f7c`},recipients:{universalIdentifier:`05a3271c-5b91-493c-8f30-2d27b31d019e`}},messageList:{...h(p.messageList),name:{universalIdentifier:`69b9ed8b-7b26-4108-894f-05700ef7e8ee`},description:{universalIdentifier:`2484463a-12e0-411e-9586-81892bd7721c`},members:{universalIdentifier:`92df3493-91cf-4665-8587-1b08917d299b`},campaigns:{universalIdentifier:`e098d838-31ab-4812-91a8-f055f45a6832`},timelineActivities:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.messageList,relationTargetObjectUniversalIdentifier:p.timelineActivity})}},messageListMember:{...h(p.messageListMember),person:{universalIdentifier:`34288425-8805-42fb-8b98-ee13d09be3d3`},list:{universalIdentifier:`d5402005-e8f9-4fbe-8696-b6723cd85018`}},messageChannelMessageAssociation:{...h(p.messageChannelMessageAssociation),messageChannelId:{universalIdentifier:`20202020-b658-408f-bd46-3bd2d15d7e52`},message:{universalIdentifier:`20202020-da5d-4ac5-8743-342ab0a0336b`},messageExternalId:{universalIdentifier:`20202020-37d6-438f-b6fd-6503596c8f34`},messageThread:{universalIdentifier:`20202020-fac8-42a8-94dd-44dbc920ae16`},messageThreadExternalId:{universalIdentifier:`20202020-35fb-421e-afa0-0b8e8f7f9018`},direction:{universalIdentifier:`75c9b0f7-9e76-44d4-a2f9-47051e61eec7`},messageFolders:{universalIdentifier:`9bfc9da7-ae2d-44fd-9563-ede90c5d6222`}},messageChannelMessageAssociationMessageFolder:{...h(p.messageChannelMessageAssociationMessageFolder),messageChannelMessageAssociation:{universalIdentifier:`7411cfa3-4fd9-4b90-a636-940015fd7243`},messageFolderId:{universalIdentifier:`b3369d31-3856-4a7a-b007-ee353918127c`}},messageParticipant:{...h(p.messageParticipant),message:{universalIdentifier:`20202020-985b-429a-9db9-9e55f4898a2a`},role:{universalIdentifier:`20202020-65d1-42f4-8729-c9ec1f52aecd`},handle:{universalIdentifier:`20202020-2456-464e-b422-b965a4db4a0b`},displayName:{universalIdentifier:`20202020-36dd-4a4f-ac02-228425be9fac`},person:{universalIdentifier:`20202020-249d-4e0f-82cd-1b9df5cd3da2`},workspaceMember:{universalIdentifier:`20202020-77a7-4845-99ed-1bcbb478be6f`},messageCampaign:{universalIdentifier:`5bc768db-919f-41da-8c43-df08084d526f`}},messageThread:{...h(p.messageThread),messages:{universalIdentifier:`20202020-3115-404f-aade-e1154b28e35a`},messageChannelMessageAssociations:{universalIdentifier:`20202020-314e-40a4-906d-a5d5d6c285f6`},subject:{universalIdentifier:`a8ddbf8c-1137-45d1-b89e-5ffbd83f67c8`},messageThreadTargets:{universalIdentifier:`8d7c8b17-b835-4082-96bd-de704c491d49`}},messageThreadTarget:{target:{universalIdentifier:`e85e853d-c26e-41b3-bec0-7afc4bdbc2f7`},...h(p.messageThreadTarget),messageThread:{universalIdentifier:`23ca09e6-149d-452f-bed7-a4aad24d1314`},isAutomaticallyAssigned:{universalIdentifier:`04403730-e960-415a-8790-f0c0f82f3477`},isManuallyAssigned:{universalIdentifier:`16efa36f-d195-42e9-959f-6928164f2395`},targetPerson:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.messageThreadTarget,relationTargetObjectUniversalIdentifier:p.person})},targetCompany:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.messageThreadTarget,relationTargetObjectUniversalIdentifier:p.company})},targetOpportunity:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.messageThreadTarget,relationTargetObjectUniversalIdentifier:p.opportunity})}},message:{...h(p.message),headerMessageId:{universalIdentifier:`20202020-72b5-416d-aed8-b55609067d01`},messageThread:{universalIdentifier:`20202020-30f2-4ccd-9f5c-e41bb9d26214`},subject:{universalIdentifier:`20202020-52d1-4036-b9ae-84bd722bb37a`},text:{universalIdentifier:`20202020-d2ee-4e7e-89de-9a0a9044a143`},receivedAt:{universalIdentifier:`20202020-140a-4a2a-9f86-f13b6a979afc`},messageParticipants:{universalIdentifier:`20202020-7cff-4a74-b63c-73228448cbd9`},messageChannelMessageAssociations:{universalIdentifier:`20202020-3cef-43a3-82c6-50e7cfbc9ae4`},messageCampaign:{universalIdentifier:`77cff00b-a0ba-48d6-80de-0d5ccf14e45b`},isDraft:{universalIdentifier:`20202020-4d3a-4b6e-9c1f-2a5e7b9d0c34`},attachments:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.message,relationTargetObjectUniversalIdentifier:p.attachment})}},note:{...h(p.note),title:{universalIdentifier:`20202020-faeb-4c76-8ba6-ccbb0b4a965f`},bodyV2:{universalIdentifier:`20202020-a7bb-4d94-be51-8f25181502c8`},noteTargets:{universalIdentifier:`20202020-1f25-43fe-8b00-af212fdde823`},attachments:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.note,relationTargetObjectUniversalIdentifier:p.attachment})},timelineActivities:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.note,relationTargetObjectUniversalIdentifier:p.timelineActivity})}},noteTarget:{target:{universalIdentifier:`20202020-f635-435d-ab8d-e1168b375c70`},...h(p.noteTarget),note:{universalIdentifier:`20202020-57f3-4f50-9599-fc0f671df003`},targetPerson:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.noteTarget,relationTargetObjectUniversalIdentifier:p.person})},targetCompany:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.noteTarget,relationTargetObjectUniversalIdentifier:p.company})},targetOpportunity:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.noteTarget,relationTargetObjectUniversalIdentifier:p.opportunity})}},opportunity:{...h(p.opportunity),name:{universalIdentifier:`20202020-8609-4f65-a2d9-44009eb422b5`},amount:{universalIdentifier:`20202020-583e-4642-8533-db761d5fa82f`},closeDate:{universalIdentifier:`20202020-527e-44d6-b1ac-c4158d307b97`},stage:{universalIdentifier:`20202020-6f76-477d-8551-28cd65b2b4b9`},pointOfContact:{universalIdentifier:`20202020-8dfb-42fc-92b6-01afb759ed16`},company:{universalIdentifier:`20202020-cbac-457e-b565-adece5fc815f`},owner:{universalIdentifier:`20202020-be7e-4d1e-8e19-3d5c7c4b9f2a`},taskTargets:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.opportunity,relationTargetObjectUniversalIdentifier:p.taskTarget})},noteTargets:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.opportunity,relationTargetObjectUniversalIdentifier:p.noteTarget})},agentChatThreadTargets:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.opportunity,relationTargetObjectUniversalIdentifier:p.agentChatThreadTarget})},calendarEventTargets:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.opportunity,relationTargetObjectUniversalIdentifier:p.calendarEventTarget})},messageThreadTargets:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.opportunity,relationTargetObjectUniversalIdentifier:p.messageThreadTarget})},attachments:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.opportunity,relationTargetObjectUniversalIdentifier:p.attachment})},timelineActivities:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.opportunity,relationTargetObjectUniversalIdentifier:p.timelineActivity})}},person:{...h(p.person),name:{universalIdentifier:`20202020-3875-44d5-8c33-a6239011cab8`},emails:{universalIdentifier:`20202020-3c51-43fa-8b6e-af39e29368ab`},linkedinLink:{universalIdentifier:`20202020-f1af-48f7-893b-2007a73dd508`},jobTitle:{universalIdentifier:`20202020-b0d0-415a-bef9-640a26dacd9b`},phones:{universalIdentifier:`20202020-0638-448e-8825-439134618022`},avatarUrl:{universalIdentifier:`20202020-b8a6-40df-961c-373dc5d2ec21`},avatarFile:{universalIdentifier:`20202020-a7c9-4e3d-8f1b-2d5a6b7c8e9f`},company:{universalIdentifier:`20202020-e2f3-448e-b34c-2d625f0025fd`},pointOfContactForOpportunities:{universalIdentifier:`20202020-911b-4a7d-b67b-918aa9a5b33a`},taskTargets:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.person,relationTargetObjectUniversalIdentifier:p.taskTarget})},noteTargets:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.person,relationTargetObjectUniversalIdentifier:p.noteTarget})},agentChatThreadTargets:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.person,relationTargetObjectUniversalIdentifier:p.agentChatThreadTarget})},calendarEventTargets:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.person,relationTargetObjectUniversalIdentifier:p.calendarEventTarget})},messageThreadTargets:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.person,relationTargetObjectUniversalIdentifier:p.messageThreadTarget})},attachments:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.person,relationTargetObjectUniversalIdentifier:p.attachment})},messageParticipants:{universalIdentifier:`20202020-498e-4c61-8158-fa04f0638334`},calendarEventParticipants:{universalIdentifier:`20202020-52ee-45e9-a702-b64b3753e3a9`},timelineActivities:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.person,relationTargetObjectUniversalIdentifier:p.timelineActivity})},listMemberships:{universalIdentifier:`8b8d1be0-4c94-4413-a2c9-c7ede205a81d`}},accessGroup:{...h(p.accessGroup),objectMetadataId:{universalIdentifier:`a1e1a495-ed2e-4e8d-8814-6ef0d1e484d0`},roleId:{universalIdentifier:`0f8c81b0-6d46-4593-97cb-97216de930ff`},rowLevelPermissionPredicateGroupId:{universalIdentifier:`03f12114-2b40-4dc0-9963-6c2e059bc4b3`},memberFieldValues:{universalIdentifier:`a0d519f8-cc6b-4bb5-b107-89213d683705`},groupHash:{universalIdentifier:`04687cce-1268-4774-b47e-04076a152630`}},recordShare:{...h(p.recordShare),recordId:{universalIdentifier:`01edb657-6339-475c-b581-784a0c3e0509`},objectMetadataId:{universalIdentifier:`504cec47-6aae-4e5b-85fd-1581b62602e3`},principalId:{universalIdentifier:`c1849ee2-1d2a-409e-800d-16fc16621257`},principalType:{universalIdentifier:`556161f6-1a01-478e-8f01-acc413102e44`},accessLevel:{universalIdentifier:`943b9926-9620-43de-8a46-8ebfee74dea3`},rowCause:{universalIdentifier:`be27640e-f739-4d07-8979-dba4526e406a`},sourceId:{universalIdentifier:`534a2244-9feb-4d21-afd9-c9a20052b300`}},shortLink:{...h(p.shortLink),authoredTemplateUrl:{universalIdentifier:`6f588340-ddff-4113-984b-c37c045d496c`},resolvedDestinationUrl:{universalIdentifier:`5ba068eb-0594-4945-9183-7174a37a9406`},templateAndResolvedUrlHash:{universalIdentifier:`175f7743-b027-4374-b577-6503679d00fc`}},task:{...h(p.task),title:{universalIdentifier:`20202020-b386-4cb7-aa5a-08d4a4d92680`},bodyV2:{universalIdentifier:`20202020-4aa0-4ae8-898d-7df0afd47ab1`},dueAt:{universalIdentifier:`20202020-fd99-40da-951b-4cb9a352fce3`},status:{universalIdentifier:`20202020-70bc-48f9-89c5-6aa730b151e0`},taskTargets:{universalIdentifier:`20202020-de9c-4d0e-a452-713d4a3e5fc7`},attachments:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.task,relationTargetObjectUniversalIdentifier:p.attachment})},assignee:{universalIdentifier:`20202020-065a-4f42-a906-e20422c1753f`},timelineActivities:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.task,relationTargetObjectUniversalIdentifier:p.timelineActivity})}},taskTarget:{target:{universalIdentifier:`20202020-f636-435d-ab8d-e1168b375c71`},...h(p.taskTarget),task:{universalIdentifier:`20202020-e881-457a-8758-74aaef4ae78a`},targetPerson:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.taskTarget,relationTargetObjectUniversalIdentifier:p.person})},targetCompany:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.taskTarget,relationTargetObjectUniversalIdentifier:p.company})},targetOpportunity:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.taskTarget,relationTargetObjectUniversalIdentifier:p.opportunity})}},workflowRun:{...h(p.workflowRun),name:{universalIdentifier:`20202020-b840-4253-aef9-4e5013694587`},enqueuedAt:{universalIdentifier:`20202020-f1e3-4de1-a461-b5c4fdbc861d`},startedAt:{universalIdentifier:`20202020-a234-4e2d-bd15-85bcea6bb183`},endedAt:{universalIdentifier:`20202020-e1c1-4b6b-bbbd-b2beaf2e159e`},status:{universalIdentifier:`20202020-6b3e-4f9c-8c2b-2e5b8e6d6f3b`},state:{universalIdentifier:`20202020-611f-45f3-9cde-d64927e8ec57`},stepLogs:{universalIdentifier:`20202020-7c4e-4e1a-8fc1-1e3a55d6c2a1`},coreWorkflowId:{universalIdentifier:`e07d8ac0-6b6e-4685-81fa-50d82ae7f880`},coreWorkflowVersionId:{universalIdentifier:`58e3f476-425d-4c66-b391-779d0412e107`},timelineActivities:{universalIdentifier:l({applicationUniversalIdentifier:n.t,objectUniversalIdentifier:p.workflowRun,relationTargetObjectUniversalIdentifier:p.timelineActivity})}},workspaceMember:{...h(p.workspaceMember),name:{universalIdentifier:`20202020-e914-43a6-9c26-3603c59065f4`},colorScheme:{universalIdentifier:`20202020-66bc-47f2-adac-f2ef7c598b63`},uiScale:{universalIdentifier:`20202020-1581-4bfb-b87d-58fa9cd5b817`},openRecordIn:{universalIdentifier:`20202020-1b16-419d-9323-6f3ea850e5d9`},locale:{universalIdentifier:`20202020-402e-4695-b169-794fa015afbe`},avatarUrl:{universalIdentifier:`20202020-0ced-4c4f-a376-c98a966af3f6`},userEmail:{universalIdentifier:`20202020-4c5f-4e09-bebc-9e624e21ecf4`},jobTitle:{universalIdentifier:`20202020-4dd4-4619-826e-08f6c06b374d`},userId:{universalIdentifier:`20202020-75a9-4dfc-bf25-2e4b43e89820`},assignedTasks:{universalIdentifier:`20202020-61dc-4a1c-99e8-38ebf8d2bbeb`},ownedOpportunities:{universalIdentifier:`20202020-9e4d-4b3a-8c1f-6d7e8f9a0b1c`},accountOwnerForCompanies:{universalIdentifier:`20202020-dc29-4bd4-a3c1-29eafa324bee`},messageParticipants:{universalIdentifier:`20202020-8f99-48bc-a5eb-edd33dd54188`},blocklist:{universalIdentifier:`20202020-6cb2-4161-9f29-a4b7f1283859`},calendarEventParticipants:{universalIdentifier:`20202020-0dbc-4841-9ce1-3e793b5b3512`},timelineActivities:{universalIdentifier:`20202020-e15b-47b8-94fe-8200e3c66615`},agentMessages:{universalIdentifier:`211b2717-450a-4f5f-808f-39695c819319`},agentChatThreads:{universalIdentifier:`fbaf92a6-44ae-4b6d-9d10-2c15d84eaea1`},agentChatThreadParticipants:{universalIdentifier:`d1de909f-a0eb-4e94-8903-abec012864c9`},agentMessageReactions:{universalIdentifier:`9242d7b0-bb3a-4bb6-a830-5e84e722c684`},assignedAgentChatThreads:{universalIdentifier:`a89c46f5-cdb7-40e9-9a87-a8ecf0818c3c`},timeZone:{universalIdentifier:`20202020-2d33-4c21-a86e-5943b050dd54`},dateFormat:{universalIdentifier:`20202020-af13-4e11-b1e7-b8cf5ea13dc0`},timeFormat:{universalIdentifier:`20202020-8acb-4cf8-a851-a6ed443c8d81`},calendarStartDay:{universalIdentifier:`20202020-1ecc-4562-84c9-ff3a2f6cce85`},numberFormat:{universalIdentifier:`20202020-7f40-4e7f-b126-11c0eda6b141`}}};Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return i}});
@@ -1,2 +1,2 @@
1
- const e=require("./rolldown-runtime-mLOUI7ql.cjs"),t=require("./isDefined-CJctgvfE.cjs"),n=require("./validate-app-path-Dau-PC0a.cjs"),r=require("./collect-watch-inputs-DfWAkX1r.cjs"),i=require("./resolve-project-typescript-DO4LrLr-.cjs"),a=require("./cli-error-CrUD8uMp.cjs"),o=require("./get-tooling-error-context-CZKTM7Q6.cjs");let s=require("node:path");var c=e.n({typecheckApplication:()=>d}),l=({diagnostic:e,appPath:n,typescript:r})=>{let i=t.t(e.file)&&t.t(e.start)?e.file.getLineAndCharacterOfPosition(e.start):void 0;return{severity:e.category===r.DiagnosticCategory.Warning?`warning`:`error`,code:`TS${e.code}`,message:r.flattenDiagnosticMessageText(e.messageText,`
1
+ const e=require("./rolldown-runtime-mLOUI7ql.cjs"),t=require("./isDefined-CJctgvfE.cjs"),n=require("./validate-app-path-Dau-PC0a.cjs"),r=require("./collect-watch-inputs-Cj9epSJw.cjs"),i=require("./resolve-project-typescript-DjMUr6ks.cjs"),a=require("./cli-error-CrUD8uMp.cjs"),o=require("./get-tooling-error-context-CZKTM7Q6.cjs");let s=require("node:path");var c=e.n({typecheckApplication:()=>d}),l=({diagnostic:e,appPath:n,typescript:r})=>{let i=t.t(e.file)&&t.t(e.start)?e.file.getLineAndCharacterOfPosition(e.start):void 0;return{severity:e.category===r.DiagnosticCategory.Warning?`warning`:`error`,code:`TS${e.code}`,message:r.flattenDiagnosticMessageText(e.messageText,`
2
2
  `),...t.t(e.file)?{file:(0,s.relative)(n,e.file.fileName)}:{},...t.t(i)?{line:i.line+1,column:i.character+1}:{}}},u=({appPath:e,typescript:n})=>{let i=(0,s.join)(e,`tsconfig.json`),a=(e,t)=>(r.r(e),n.sys.readFile(e,t)),o=n.readConfigFile(i,a);if(t.t(o.error))return[o.error];let c=n.parseJsonConfigFileContent(o.config,{...n.sys,readFile:a},e,{noEmit:!0},i);if(c.errors.length>0)return c.errors;let l=n.createCompilerHost(c.options),u=l.readFile;l.readFile=e=>(r.r(e),u(e));let d=l.fileExists;l.fileExists=e=>{let t=d(e);return t||r.i(e),t};let f=n.createProgram({host:l,rootNames:c.fileNames,options:c.options,projectReferences:c.projectReferences});return n.getPreEmitDiagnostics(f)},d=async({appPath:e,signal:t})=>{let r=await n.t(e);if(!r.success)return r;try{t?.throwIfAborted();let n=await i.t(e);t?.throwIfAborted();let r=u({appPath:e,typescript:n});t?.throwIfAborted();let a=r.map(t=>l({diagnostic:t,appPath:e,typescript:n}));return a.some(e=>e.severity===`error`)?{success:!1,error:{code:`TYPECHECK_FAILED`,message:`Typecheck failed.`},diagnostics:a}:{success:!0,data:null,diagnostics:a}}catch(e){return{success:!1,error:{code:t?.aborted?`CANCELLED`:e instanceof a.t?e.code:`TYPECHECK_FAILED`,message:e instanceof Error?e.message:String(e),...o.t(e)},diagnostics:[]}}};Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return d}});
package/dist/cli.cjs CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const e=require("./chunks/check-node-requirement-CIDuA1s-.cjs"),t=require("./chunks/cli-node-version-range.constant-D3XrqV07.cjs");process.stdout.on(`error`,e=>{if(e.code!==`EPIPE`)throw e;process.exit()}),(async({args:n,nodeVersion:r,loadCli:i})=>{if(e.t({version:r,range:`>=24.5.0`})!==`satisfied`){process.stderr.write(`twenty requires Node.js ${t.t}; this is Node.js ${r}. Switch to a supported Node.js version, then try again.\n`),process.exitCode=1;return}await(await i()).runCli(n)})({args:process.argv.slice(2),nodeVersion:process.versions.node,loadCli:()=>Promise.resolve().then(()=>require("./chunks/run-cli-oUabLHNz.cjs"))});
2
+ const e=require("./chunks/check-node-requirement-CIDuA1s-.cjs"),t=require("./chunks/cli-node-version-range.constant-D3XrqV07.cjs");process.stdout.on(`error`,e=>{if(e.code!==`EPIPE`)throw e;process.exit()}),(async({args:n,nodeVersion:r,loadCli:i})=>{if(e.t({version:r,range:`>=24.5.0`})!==`satisfied`){process.stderr.write(`twenty requires Node.js ${t.t}; this is Node.js ${r}. Switch to a supported Node.js version, then try again.\n`),process.exitCode=1;return}await(await i()).runCli(n)})({args:process.argv.slice(2),nodeVersion:process.versions.node,loadCli:()=>Promise.resolve().then(()=>require("./chunks/run-cli-CgBPkP_r.cjs"))});
package/docs/commands.md CHANGED
@@ -803,6 +803,10 @@ files may be incomplete: fix the problem, then run `twenty app generate-client`,
803
803
  which regenerates the client without syncing again. Ctrl+C exits with 130 and
804
804
  reports the step it interrupted.
805
805
 
806
+ Apply and dev record component and logic function definitions from the manifest
807
+ just synced. They fetch the other baseline metadata without downloading source
808
+ files again.
809
+
806
810
  Remote changes made between the plan and the sync can change what the sync does.
807
811
  Remote changes between the acknowledged sync and the export can also enter the
808
812
  saved baseline without appearing in local source; this is not an atomic server
@@ -827,8 +831,24 @@ apply.
827
831
 
828
832
  The CLI watches the app folder and the external local files read by definition
829
833
  loading, bundling and typechecking, including linked packages and extended
830
- TypeScript configs. Relative imports of missing external files watch the nearest
831
- existing parent, so creating the file can recover a failed build.
834
+ TypeScript configs. Existing external paths use native filesystem events.
835
+ Watchers reattach after atomic saves. Missing or deleted paths use exact-path
836
+ recovery checks once per second, stopped as soon as native watching resumes.
837
+ Recovery does not expand into parent directories.
838
+ Relative imports of missing external files observe the nearest allowed directory
839
+ to recover when the file is created.
840
+
841
+ Home and temporary directory roots, their ancestors and filesystem roots are
842
+ excluded from automatic directory observation, including symlink aliases.
843
+ Known files in those locations remain watched. If an unresolved import needs an
844
+ excluded directory, dev prints `WATCH_SCOPE_LIMITED`; after fixing the import,
845
+ edit an app file or restart dev.
846
+
847
+ Use `twenty app dev --verbose` to list the app folder, external files, shallow
848
+ external directories and excluded directories. The list appears after the first
849
+ build attempt and whenever those paths change, including after a failed build.
850
+ With `--format ndjson`, `watch-scope` progress events include `appPath`,
851
+ `filePaths`, `directoryPaths` and `excludedDirectoryPaths`.
832
852
 
833
853
  The last successful input graph stays watched after a failure. `.git`,
834
854
  `.twenty`, `node_modules`, root `dist`, editor temporary files and `.DS_Store`
@@ -952,18 +972,19 @@ dependencies automatically.
952
972
 
953
973
  ### What is restored
954
974
 
955
- | Content | Local result | Limits |
956
- | ----------------------------------- | ---------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
957
- | Supported metadata and translations | App definitions and locale catalogs | Unsupported metadata is reported, not regenerated |
958
- | Workflows | `defineWorkflow` files in `src/workflows` | Unsupported steps or references leave the local file intact |
959
- | Skills and agents | `defineSkill` and `defineAgent` files in `src/skills` and `src/agents` | Definitions the server cannot reproduce become coverage gaps |
960
- | Front component entry source | Original TSX, preserving identifiers and supported widget references | Missing source becomes a coverage gap; imported local files are not pulled yet |
961
- | Dependencies | `package.json` and `yarn.lock` at the project root | Only the stored `dependencies` pair is restored |
962
- | Public assets | Exact image, font and other asset bytes under `public/` | Only `public-asset` files with safe paths are accepted |
975
+ | Content | Local result | Limits |
976
+ | ----------------------------------- | ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
977
+ | Supported metadata and translations | App definitions and locale catalogs | Unsupported metadata is reported, not regenerated |
978
+ | Workflows | `defineWorkflow` files in `src/workflows` | Unsupported steps or references leave the local file intact |
979
+ | Skills and agents | `defineSkill` and `defineAgent` files in `src/skills` and `src/agents` | Definitions the server cannot reproduce become coverage gaps |
980
+ | Front component source | Original TSX, preserving identifiers and supported widget references | Inventoried local imports, configs and assets are restored; missing source becomes a coverage gap |
981
+ | Logic function source | Original definitions, handlers and inventoried local imports | Requires a source inventory from the current CLI; missing or stale sources become coverage gaps |
982
+ | Dependencies | `package.json` and `yarn.lock` at the project root | Only the stored `dependencies` pair is restored |
983
+ | Public assets | Exact image, font and other asset bytes under `public/` | Only `public-asset` files with safe paths are accepted |
963
984
 
964
- Logic-function source is not exported yet. Only declared front component source
965
- paths are accepted. Record attachments and other file categories are refused
966
- before writing. Each export response is limited to 16 MiB.
985
+ Only declared frontend component and logic function source paths are accepted.
986
+ Record attachments and other file categories are refused before writing. Each
987
+ export response is limited to 16 MiB.
967
988
 
968
989
  A workflow changed in the workflow builder is normally a coverage gap. The
969
990
  workspace custom application is the exception: its workflows are pulled from
@@ -971,10 +992,17 @@ their active version, and apply publishes changed definitions as new versions.
971
992
  An agent on more than one role is another example of a coverage gap. These gaps
972
993
  preserve the corresponding local files.
973
994
 
974
- Front component imports are preserved. Restore missing imported files and
975
- install dependencies before building or applying. If exported `package.json`
976
- omits `twenty-sdk`, as the workspace custom application does, pull keeps the
977
- local SDK dependency. The installed generated client is left alone.
995
+ Frontend component and logic function imports keep their original paths. New
996
+ deployments include local helpers, type declarations, TypeScript configs, CSS
997
+ and imported assets; shared files are restored once. Older frontend deployments
998
+ without an inventory still export only the entry file. Logic functions without
999
+ an inventory remain coverage gaps until the application is applied with the
1000
+ current CLI. Changes made to a function's stored metadata after that apply also
1001
+ produce a coverage gap, so pull does not silently restore an outdated trigger
1002
+ or timeout. Files no longer inventoried stay untouched locally. Install
1003
+ dependencies before building or applying. If exported `package.json` omits
1004
+ `twenty-sdk`, as the workspace custom application does, pull keeps the local
1005
+ SDK dependency. The installed generated client is left alone.
978
1006
 
979
1007
  Run `yarn install` after pulling dependency changes into an existing project.
980
1008
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "twenty",
3
- "version": "2.59.0",
3
+ "version": "2.61.0",
4
4
  "description": "The Twenty command line.",
5
5
  "homepage": "https://twenty.com",
6
6
  "repository": {
@@ -35,7 +35,7 @@
35
35
  "semver": "7.6.3",
36
36
  "signal-exit": "^4.1.0",
37
37
  "string-width": "^8.2.0",
38
- "twenty-client-sdk": "2.59.0",
38
+ "twenty-client-sdk": "2.61.0",
39
39
  "twenty-shared": "0.0.0",
40
40
  "undici": "^7.30.1",
41
41
  "uuid": "^13.0.2",
@@ -34,6 +34,12 @@ targets) are excluded from the inventory without rejecting existing builds.
34
34
  Retained paths and file bytes are preserved. A fresh build replaces the
35
35
  inventory.
36
36
 
37
+ Each frontend component and logic function also records its own `sourceFiles`
38
+ subset. Helpers shared with other entries are stored once. The server saves
39
+ this inventory with the deployed entry path and bundle checksum after sync, so
40
+ pull can restore its files without enumerating unrelated storage. The same sync
41
+ path handles direct apply, dev and package installs.
42
+
37
43
  Direct apply uploads these artifacts, and package installs require all
38
44
  inventoried sources while accepting older packages without an inventory.
39
45
  Snapshot copies dereference symlinks. Each upload artifact records its role,
@@ -26,7 +26,19 @@ unrelated ancestor directories.
26
26
  Inputs have stamps captured before reads; after attaching the watcher, changed
27
27
  stamps invalidate the result. A successful graph replaces the previous graph; a
28
28
  failure watches the last successful graph plus only that attempt's inputs.
29
- External directory observation is shallow.
29
+ Existing external inputs use native events. Each event reattaches the watcher
30
+ to handle file replacement. Missing files and deleted directories use exact-path
31
+ recovery checks once per second, stopped as soon as native watching resumes.
32
+ Directory stamps include the directory identity and immediate entries. A
33
+ one-time check after attachment catches changes before native events are ready.
34
+ Home and temporary directory roots, their ancestors and filesystem roots are
35
+ excluded from external directory observation; symlink aliases use the same
36
+ restriction. Known files there remain watched, and dev warns when missing-import
37
+ recovery would require an excluded directory.
38
+
39
+ `app dev --verbose` reports the effective scope after updates. Reports include
40
+ retained successful inputs after failures and appear only when paths change.
41
+ NDJSON exposes the same paths in `watch-scope` progress events.
30
42
 
31
43
  ## Apply and client generation
32
44
 
@@ -142,20 +142,22 @@ otherwise it is reported as `UNSUPPORTED` coverage, so its local file is kept.
142
142
  ## Exported files and compatibility
143
143
 
144
144
  Pull requests
145
- `exportApplication(shouldIncludeDependencies: true, shouldIncludeSourceFiles: true, shouldIncludePublicAssets: true)`.
145
+ `exportApplication(shouldIncludeDependencies: true, shouldIncludeSourceFiles: true, shouldIncludeSourceDependencies: true, shouldIncludeLogicFunctionSources: true, shouldIncludePublicAssets: true)`.
146
146
  Existing clients that do not request source files continue to receive coverage
147
147
  gaps for frontend components and their widgets, without reading component source
148
148
  from storage.
149
149
 
150
- Apply baseline recording opts in to source export too, so a later pull compares
151
- the same supported components. Pull restores `dependencies/package.json` and
152
- `dependencies/yarn.lock` to the project root, in the same transaction as
153
- metadata and the baseline.
150
+ Apply and dev record the source definitions from the manifest just synced,
151
+ alongside the remote metadata export. Recording this baseline does not download
152
+ component or function sources. Pull restores
153
+ `dependencies/package.json` and `dependencies/yarn.lock` to the project root,
154
+ in the same transaction as metadata and the baseline.
154
155
 
155
156
  Exact folder and filename checks accept only that dependency pair, declared
156
- frontend component sources, and `public-asset` files under `public/`. Public
157
- assets travel as base64 and are restored as bytes, preserving images and fonts.
158
- Record attachments and unrelated files are refused.
157
+ frontend component and logic function entries and their inventoried sources,
158
+ and `public-asset` files under `public/`. Public assets travel as base64 and
159
+ are restored as bytes, preserving images and fonts. Record attachments and
160
+ unrelated files are refused.
159
161
 
160
162
  Public assets unchanged on the server preserve local edits; remote changes use
161
163
  the usual overwrite report. Missing remote assets leave local files untouched.
@@ -169,26 +171,43 @@ remote changes replace local contents and use the usual overwrite report.
169
171
  Missing remote files leave local files untouched.
170
172
 
171
173
  After project setup, reconciliation does not install dependencies, generate the
172
- typed client or write logic-function source. Export responses have a 16 MiB cap.
174
+ typed client. Export responses have a 16 MiB cap.
173
175
  Pull does not modify the workspace. Because pull is partial, `app apply` of the
174
176
  workspace custom application only deletes entities missing from source with
175
177
  `--prune`.
176
178
 
177
- ## Front component source
179
+ ## Frontend component and logic function sources
178
180
 
179
181
  Front component entry files are restored from their stored original TSX, at
180
- their original path or the existing local definition's path. No JSX is
182
+ their original path. Legacy entry-only exports can use the existing local
183
+ definition's path. No JSX is
181
184
  regenerated. Export reports missing source, computed identifiers, and
182
185
  unsupported widget availability as coverage gaps; widgets referencing those
183
186
  components remain unexported.
184
187
 
185
- Imports are preserved without checking whether they can be resolved. Imported
186
- local files are not pulled yet; missing dependencies must be restored before
187
- building or applying. Support for imported local files is tracked separately in
188
- [#29462](https://github.com/twentyhq/twenty/issues/29462).
189
-
190
- An explicit GraphQL rejection of the source-export argument retries once without
191
- it, preserving older servers' metadata pull.
188
+ New builds attach a source inventory to each frontend component and logic
189
+ function. Export reads that deployed inventory, verifies checksums, and
190
+ includes its local imports, type declarations, TypeScript configs, nested CSS
191
+ and imported images/fonts. Paths and bytes are preserved; shared files are
192
+ restored once. Imported binary files use base64 with an explicit encoding.
193
+ Source files remain private Source artifacts, even when their extensions match
194
+ public assets.
195
+
196
+ Only files in an exported definition's inventory are read. Stale storage files
197
+ and record attachments are not exported. Inventory
198
+ files missing from storage or with mismatched checksums make the definition a
199
+ coverage gap. Files no longer inventoried remain untouched locally.
200
+
201
+ Frontend components deployed without a per-component inventory still export
202
+ only their entry files. Apply or publish them again to retain imported files.
203
+ Imports outside the app and installed packages are not copied; reinstall
204
+ package dependencies before building. Pull refuses a locally moved entry with
205
+ an inventory, since restoring its helpers at their original paths would break
206
+ relative imports.
207
+
208
+ Explicit GraphQL rejection of a file-export option retries without that option.
209
+ Older clients receive entry-only frontend exports unless they opt into source
210
+ dependencies. Older servers retain their existing pull behavior.
192
211
 
193
212
  Pull records remote source hashes separately from local fingerprints. Unchanged
194
213
  remote source preserves local edits, including after repeated pulls; changed
@@ -199,6 +218,20 @@ An occupied destination or a missing declared source aborts the entire pull
199
218
  before writes. Supported page-layout widgets keep their component identifiers.
200
219
  Run `yarn install` after dependency changes before building the pulled TSX.
201
220
 
221
+ Logic functions require a per-function inventory. The server records their
222
+ deployed `updatedAt` revision after successful sync. Export compares that revision
223
+ and validates every source checksum. Converter changes alone do not invalidate
224
+ the inventory. Missing inventories, changed metadata or stale builds become
225
+ coverage gaps; pull never invents a handler or replaces a newer workspace edit
226
+ with an older definition. Apply the app with the current CLI to refresh its
227
+ inventory. Original definitions, including install hooks, keep their SDK
228
+ exports and identifiers.
229
+
230
+ `shouldIncludeLogicFunctionSources` is a separate opt-in so older clients never
231
+ receive source kinds they cannot restore. It shares the existing 12 MiB encoded
232
+ file budget with frontend sources, dependency files and public assets. Shared
233
+ helpers are returned once across both kinds.
234
+
202
235
  ## Verification
203
236
 
204
237
  Tests cover writers, planning and reconciliation. Command tests build the actual
@@ -1 +0,0 @@
1
- var e=function(e){return e.RecordExport=`record-export`,e.CorePicture=`core-picture`,e.AgentChat=`agent-chat`,e.BuiltLogicFunction=`built-logic-function`,e.BuiltFrontComponent=`built-front-component`,e.PublicAsset=`public-asset`,e.Source=`source`,e.FilesField=`files-field`,e.Dependencies=`dependencies`,e.Workflow=`workflow`,e.EmailAttachment=`email-attachment`,e.EmailImage=`email-image`,e.AppTarball=`app-tarball`,e.GeneratedSdkClient=`generated-sdk-client`,e.Dpa=`dpa`,e.WorkspaceDataExport=`workspace-data-export`,e}({});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return e}});
@@ -1 +0,0 @@
1
- const e=require("./rolldown-runtime-mLOUI7ql.cjs"),t=require("./isDefined-CJctgvfE.cjs"),n=require("./read-watch-input-stamp-BxeOb0vI.cjs");let r=require("node:async_hooks"),i=require("node:path"),a=require("node:fs");var o=e.n({collectWatchInputs:()=>c,getWatchInputPlugins:()=>p,recordWatchFile:()=>d,recordWatchProbe:()=>f}),s=new r.AsyncLocalStorage,c=async e=>{let t=new Map,n=new Map,r=await s.run({inputs:t,probes:n},e),a=new Set([...t.values()].filter(e=>e.kind===`file`&&e.stamp!==null).map(e=>(0,i.dirname)(e.path)));for(let[e,r]of n)a.has((0,i.dirname)(r.path))&&!t.has(e)&&t.set(e,r);return{result:r,watchInputs:[...t.values()]}},l=(e,t,r)=>{let o;try{o=(0,a.realpathSync)(t)}catch{o=(0,i.resolve)(t)}if(n.n(o))return;let s=`${r}:${o}`;if(!e.has(s)){let t={path:o,kind:r};e.set(s,{...t,stamp:n.t(t)})}return o},u=(e,t)=>{let n=(0,i.dirname)(t);for(;(0,i.dirname)(n)!==n;){try{if((0,a.statSync)(n).isDirectory()){l(e,n,`directory`);return}}catch{}n=(0,i.dirname)(n)}},d=e=>{let n=s.getStore();if(!t.t(n))return;let r=l(n.inputs,e,`file`);t.t(r)&&u(n.inputs,r)},f=e=>{let n=s.getStore();t.t(n)&&l(n.probes,e,`file`)},p=()=>{let e=s.getStore();if(!t.t(e))return[];let{inputs:n}=e;return[{name:`collect-watch-inputs`,setup:e=>{e.onLoad({filter:/.*/,namespace:`file`},({path:e})=>{let r=l(n,e,`file`);t.t(r)&&u(n,r)}),e.onResolve({filter:/^\./},({path:e,resolveDir:t})=>{t.length>0&&u(n,(0,i.resolve)(t,e))})}}]};Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return o}});