superacli 1.1.22 → 1.1.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.beads/.br_history/{issues.20260427_104638_898729442.jsonl → issues.20260427_114912_061702372.jsonl} +65 -65
- package/.beads/.br_history/{issues.20260427_104638_209211116.jsonl → issues.20260427_115013_063113906.jsonl} +66 -66
- package/.beads/.br_history/{issues.20260427_104637_752744777.jsonl → issues.20260427_115114_208497343.jsonl} +67 -67
- package/.beads/.br_history/{issues.20260427_104615_669652069.jsonl → issues.20260427_115215_176080241.jsonl} +68 -68
- package/.beads/.br_history/issues.20260427_115316_481573328.jsonl +261 -0
- package/.beads/.br_history/issues.20260427_115335_866978652.jsonl +261 -0
- package/.beads/.br_history/issues.20260427_115436_866087391.jsonl +261 -0
- package/.beads/.br_history/issues.20260427_115538_016094860.jsonl +261 -0
- package/.beads/.br_history/issues.20260427_115638_932947449.jsonl +261 -0
- package/.beads/.br_history/issues.20260427_115739_982932603.jsonl +261 -0
- package/.beads/.br_history/issues.20260427_115840_963681039.jsonl +261 -0
- package/.beads/.br_history/issues.20260427_115941_912431509.jsonl +261 -0
- package/.beads/.br_history/issues.20260427_120043_043356448.jsonl +261 -0
- package/.beads/.br_history/issues.20260427_120144_955596968.jsonl +261 -0
- package/.beads/.br_history/issues.20260427_120246_060733977.jsonl +261 -0
- package/.beads/.br_history/issues.20260427_120307_717985017.jsonl +261 -0
- package/.beads/.br_history/issues.20260427_120408_871846736.jsonl +261 -0
- package/.beads/.br_history/issues.20260427_121003_963750732.jsonl +261 -0
- package/.beads/.br_history/issues.20260427_121006_018509431.jsonl +261 -0
- package/.beads/.br_history/issues.20260427_121019_617062931.jsonl +261 -0
- package/.beads/.br_history/issues.20260427_121021_689536311.jsonl +261 -0
- package/.beads/.br_history/issues.20260428_172005_240631447.jsonl +261 -0
- package/.beads/.br_history/issues.20260430_073641_144807989.jsonl +262 -0
- package/.beads/.br_history/issues.20260430_073642_807075699.jsonl +263 -0
- package/.beads/.br_history/issues.20260430_073645_625754223.jsonl +264 -0
- package/.beads/.br_history/issues.20260430_090639_154646058.jsonl +265 -0
- package/.beads/.br_history/issues.20260430_090640_350560318.jsonl +266 -0
- package/.beads/.br_history/issues.20260430_090641_509319001.jsonl +267 -0
- package/.beads/.br_history/issues.20260430_095140_396749398.jsonl +268 -0
- package/.beads/.br_history/issues.20260501_230041_334056077.jsonl +269 -0
- package/.beads/.br_recovery/beads.db-wal.20260427_121006_010373120.rebuild-failed +0 -0
- package/.beads/.br_recovery/beads.db.20260427_121006_010373120.rebuild-failed +0 -0
- package/.beads/beads.db.corrupted +0 -0
- package/.beads/issues.jsonl +46 -37
- package/.supercli/adapters/test-cli-adapter.js +19 -0
- package/cli/adapters/mcp.js +89 -3
- package/cli/adapters/openapi.js +71 -2
- package/cli/config.js +69 -1
- package/cli/daemon.js +349 -0
- package/cli/plugins-manager.js +41 -1
- package/cli/server-command.js +174 -4
- package/cli/supercli.js +35 -15
- package/docs/changelog-2026-04.html +6 -0
- package/docs/index.html +95 -8
- package/docs/plugins.html +30 -0
- package/docs/server.md +80 -0
- package/graphify-out/GRAPH_REPORT.md +140 -128
- package/graphify-out/cache/036077d325d5aa25fc6ad7f01ca32721b02e3f981231f67fb22f59380063572b.json +1 -0
- package/graphify-out/cache/11938479cfbdb8e52bf5f0f3c132d56204245ebb19aefe89bb0394feb36dbd5e.json +1 -0
- package/graphify-out/cache/141362b25039dee7a4959ef475befea0a25671aae66f3d14917e711e597ffbf6.json +1 -0
- package/graphify-out/cache/362adb1b6b483f56d09feaf652f4122366e568aaede752f48383b76d61f5d9d6.json +1 -0
- package/graphify-out/cache/42bc8f64d69d2cd9ecf64e92e38f89f7ea479f69c947de5984919e2fd5a716ee.json +1 -0
- package/graphify-out/cache/4b5cffce31d9193b7d0a8f15e8a41c66f6733a6490ebaeff2c8ca19701c72c0e.json +1 -0
- package/graphify-out/cache/5262fb95a8855fc90efbfff767eb3aacca82c4da5799605a969554580a255404.json +1 -0
- package/graphify-out/cache/5ef4e31750d9e7bc4ff4a7b535f247d9ab5ab9627d72e20794779ec4be424c66.json +1 -0
- package/graphify-out/cache/68e2b11c95ede4f05b88d001040008cb3ac72d7bd27f351497c87e128fb3b221.json +1 -0
- package/graphify-out/cache/6d5023ecffa52382d31152c8c06e86e286789228a3d4f7fde72087f3eafa11bc.json +1 -0
- package/graphify-out/cache/6e5776e123142a78f50fa0bfd5ae2d289282051a9b392ae507de7aa9017f95d4.json +1 -0
- package/graphify-out/cache/75982dc60fa7353600ca48a3b33f5ba497eea9d5743daac6e61e9cf4f64774be.json +1 -0
- package/graphify-out/cache/7796066b51d3a99071debdfb5f40c854400b5bf3aa7c1e83dd6ae88eddca0370.json +1 -0
- package/graphify-out/cache/8308aa47b396b929d5b896051ca91422afdde4861108d6f18f5094901093df79.json +1 -0
- package/graphify-out/cache/8ccd3b557a1ea98005fba84433f160ccd4a951fbdb6a4c9b7d7ba894f905b06b.json +1 -0
- package/graphify-out/cache/90ab53b8f1f3306e7c3a1f92ec628717ea90f4e684db764f7d7aa8e884fe2cae.json +1 -0
- package/graphify-out/cache/9832101a7622924f58b9e7d7752b41518049447171f7955e4c50dfd386574e12.json +1 -0
- package/graphify-out/cache/9fa6604cc820f3857c55c753ca0024788e4cbb61c4e12ba7ce0e4a1ce4ee0655.json +1 -0
- package/graphify-out/cache/a1e24a07beede2876e688cdb6c14e2d24abb22064862a6420cac321efabd3efd.json +1 -0
- package/graphify-out/cache/a418312f2805259c33007a18b36b6ae3b6a4da376ccae6006a3b9999262495db.json +1 -0
- package/graphify-out/cache/a6d9c029bd31a99b67357291305e27b01c5ef388925f7f2a6e985fec4efa8024.json +1 -0
- package/graphify-out/cache/a6ed52b709dd79f98adf72c483e8dfb6098203d7327470b82feb5e11390a5cf4.json +1 -0
- package/graphify-out/cache/b045ae4443d972ee8f47b91a0d61c984a190195b38ae1d331430b4c51c43acfd.json +1 -0
- package/graphify-out/cache/b849fb88344c2f88f3d22e42b67516e071c7d1e65f77f4ca23f25af6edfca3b3.json +1 -0
- package/graphify-out/cache/bc514f4074f89d2f7e7834670602e50bba0f24b8cd8c9d21ff4d361d3fd4d558.json +1 -0
- package/graphify-out/cache/be3fc87936f9f24d2d4f4b22b9d2a16f33f538cef1a181663120e23ecf16b81a.json +1 -0
- package/graphify-out/cache/c5a4822edbe3a95a56f9f943eed1567e5a5c913d59b1fa3df4ad54ffd9b02697.json +1 -0
- package/graphify-out/cache/cf411f1ddde50ee97c1c501f59ed7985bcdc022134574816bcce37ac20848e64.json +1 -0
- package/graphify-out/cache/d88625b5813742ca941ce8155cb77afb02425632002f621aca34f217440a392d.json +1 -0
- package/graphify-out/cache/da97fdc8af2a3306c292921110f84648bba2b0e85d27473b460b0e8a862ff225.json +1 -0
- package/graphify-out/cache/e88de9f1ae117f26fd217c3717eff7e525a284cc942b5f4d26ef2c4d65db59bd.json +1 -0
- package/graphify-out/cache/ebf6bd96ef2d8d396389ac7199e6ba818ee2d0c5dfc131fab7cdece9fb710f11.json +1 -0
- package/graphify-out/cache/f2a302550a6fe0649d36b8ef0b04b77673bca9f115732af8ae89751944dc9cc6.json +1 -0
- package/graphify-out/cache/f9ee11f4395cb41b6f6900079cb7e94297c89b1b0b4798398d2f7a2e244c683b.json +1 -0
- package/graphify-out/cache/fb46bd3ef530273918fc8915842453f21b418d536653d3b705b75b417255c246.json +1 -0
- package/graphify-out/cache/fcfdab94fe91af1f21fcefdba5a96674b9a16bb768288f3573fe68765163c765.json +1 -0
- package/graphify-out/graph.json +2420 -1157
- package/package.json +1 -1
- package/plugins/bluebuild/install-guidance.json +11 -0
- package/plugins/bluebuild/meta.json +5 -0
- package/plugins/bluebuild/plugin.json +99 -0
- package/plugins/bluebuild/skills/quickstart/SKILL.md +47 -0
- package/plugins/cargo-public-api/install-guidance.json +11 -0
- package/plugins/cargo-public-api/meta.json +5 -0
- package/plugins/cargo-public-api/plugin.json +88 -0
- package/plugins/cargo-public-api/skills/quickstart/SKILL.md +51 -0
- package/plugins/context-mode/plugin.json +10 -0
- package/plugins/context-mode/scripts/post-install.js +1 -1
- package/plugins/csview/install-guidance.json +11 -0
- package/plugins/csview/meta.json +5 -0
- package/plugins/csview/plugin.json +67 -0
- package/plugins/csview/skills/quickstart/SKILL.md +51 -0
- package/plugins/cymbal/install-guidance.json +11 -0
- package/plugins/cymbal/meta.json +5 -0
- package/plugins/cymbal/plugin.json +121 -0
- package/plugins/cymbal/skills/quickstart/SKILL.md +54 -0
- package/plugins/difftastic/install-guidance.json +11 -0
- package/plugins/difftastic/meta.json +5 -0
- package/plugins/difftastic/plugin.json +87 -0
- package/plugins/difftastic/skills/quickstart/SKILL.md +53 -0
- package/plugins/dlm/install-guidance.json +11 -0
- package/plugins/dlm/meta.json +5 -0
- package/plugins/dlm/plugin.json +85 -0
- package/plugins/dlm/skills/quickstart/SKILL.md +49 -0
- package/plugins/dofigen/install-guidance.json +11 -0
- package/plugins/dofigen/meta.json +5 -0
- package/plugins/dofigen/plugin.json +84 -0
- package/plugins/dofigen/skills/quickstart/SKILL.md +50 -0
- package/plugins/example-server-resources/meta.json +11 -0
- package/plugins/example-server-resources/plugin.json +46 -0
- package/plugins/http-nu/install-guidance.json +11 -0
- package/plugins/http-nu/meta.json +5 -0
- package/plugins/http-nu/plugin.json +84 -0
- package/plugins/http-nu/skills/quickstart/SKILL.md +52 -0
- package/plugins/hwatch/install-guidance.json +11 -0
- package/plugins/hwatch/meta.json +5 -0
- package/plugins/hwatch/plugin.json +100 -0
- package/plugins/hwatch/skills/quickstart/SKILL.md +54 -0
- package/plugins/hyperfine/install-guidance.json +3 -3
- package/plugins/hyperfine/meta.json +2 -2
- package/plugins/hyperfine/plugin.json +39 -16
- package/plugins/hyperfine/skills/quickstart/SKILL.md +33 -61
- package/plugins/json5/install-guidance.json +12 -0
- package/plugins/json5/meta.json +5 -0
- package/plugins/json5/plugin.json +88 -0
- package/plugins/json5/skills/quickstart/SKILL.md +55 -0
- package/plugins/mdsf/install-guidance.json +11 -0
- package/plugins/mdsf/meta.json +5 -0
- package/plugins/mdsf/plugin.json +101 -0
- package/plugins/mdsf/skills/quickstart/SKILL.md +55 -0
- package/plugins/oha/install-guidance.json +11 -0
- package/plugins/oha/meta.json +5 -0
- package/plugins/oha/plugin.json +67 -0
- package/plugins/oha/skills/quickstart/SKILL.md +44 -0
- package/plugins/pv-migrate/install-guidance.json +11 -0
- package/plugins/pv-migrate/meta.json +5 -0
- package/plugins/pv-migrate/plugin.json +102 -0
- package/plugins/pv-migrate/skills/quickstart/SKILL.md +58 -0
- package/plugins/rash/install-guidance.json +11 -0
- package/plugins/rash/meta.json +5 -0
- package/plugins/rash/plugin.json +85 -0
- package/plugins/rash/skills/quickstart/SKILL.md +46 -0
- package/plugins/rsonpath/install-guidance.json +11 -0
- package/plugins/rsonpath/meta.json +5 -0
- package/plugins/rsonpath/plugin.json +87 -0
- package/plugins/rsonpath/skills/quickstart/SKILL.md +44 -0
- package/plugins/rsql/install-guidance.json +11 -0
- package/plugins/rsql/meta.json +5 -0
- package/plugins/rsql/plugin.json +84 -0
- package/plugins/rsql/skills/quickstart/SKILL.md +52 -0
- package/plugins/temporal/install-guidance.json +11 -0
- package/plugins/temporal/meta.json +5 -0
- package/plugins/temporal/plugin.json +95 -0
- package/plugins/temporal/skills/quickstart/SKILL.md +49 -0
- package/plugins/tkn/install-guidance.json +11 -0
- package/plugins/tkn/meta.json +5 -0
- package/plugins/tkn/plugin.json +98 -0
- package/plugins/tkn/skills/quickstart/SKILL.md +50 -0
- package/plugins/toml2json/install-guidance.json +11 -0
- package/plugins/toml2json/meta.json +5 -0
- package/plugins/toml2json/plugin.json +85 -0
- package/plugins/toml2json/skills/quickstart/SKILL.md +47 -0
- package/plugins/worktrunk/install-guidance.json +11 -0
- package/plugins/worktrunk/meta.json +5 -0
- package/plugins/worktrunk/plugin.json +116 -0
- package/plugins/worktrunk/skills/quickstart/SKILL.md +62 -0
- package/server/app.js +46 -13
- package/server/middleware/auth.js +70 -0
- package/server/routes/adapters.js +3 -11
- package/server/routes/clients.js +46 -0
- package/server/routes/docs.js +10 -0
- package/server/routes/jobs.js +3 -2
- package/server/routes/mcp.js +1 -0
- package/server/routes/plugins.js +109 -26
- package/server/routes/settings.js +93 -0
- package/server/routes/specs.js +8 -3
- package/server/services/adaptersService.js +1 -0
- package/server/services/pluginResourceService.js +262 -0
- package/server/services/pluginsService.js +24 -0
- package/server/uploads/superbackend-openapi.json +47 -0
- package/server/uploads/test-auth-openapi.json +74 -0
- package/server/uploads/test-auth-spec.json +36 -0
- package/server/views/adapters.ejs +1 -0
- package/server/views/api-keys.ejs +147 -0
- package/server/views/clients.ejs +82 -0
- package/server/views/docs.ejs +7 -0
- package/server/views/jobs.ejs +26 -2
- package/server/views/layout.ejs +35 -21
- package/server/views/mcp.ejs +278 -21
- package/server/views/partials/head.ejs +4 -0
- package/server/views/plugins.ejs +33 -32
- package/server/views/settings.ejs +99 -0
- package/server/views/specs.ejs +217 -22
- package/.beads/.br_history/issues.20260427_103259_082222986.jsonl +0 -261
- package/.beads/.br_history/issues.20260427_103400_358332602.jsonl +0 -261
- package/.beads/.br_history/issues.20260427_103419_681839669.jsonl +0 -261
- package/.beads/.br_history/issues.20260427_103522_226669683.jsonl +0 -261
- package/.beads/.br_history/issues.20260427_103623_568379011.jsonl +0 -261
- package/.beads/.br_history/issues.20260427_103724_772051154.jsonl +0 -261
- package/.beads/.br_history/issues.20260427_103825_935228905.jsonl +0 -261
- package/.beads/.br_history/issues.20260427_103927_159626780.jsonl +0 -261
- package/.beads/.br_history/issues.20260427_104028_436388960.jsonl +0 -261
- package/.beads/.br_history/issues.20260427_104129_670562810.jsonl +0 -261
- package/.beads/.br_history/issues.20260427_104230_885162615.jsonl +0 -261
- package/.beads/.br_history/issues.20260427_104332_071213892.jsonl +0 -261
- package/.beads/.br_history/issues.20260427_104349_051129644.jsonl +0 -261
- package/.beads/.br_history/issues.20260427_104450_358444507.jsonl +0 -261
- package/.beads/.br_history/issues.20260427_104555_654123963.jsonl +0 -261
- package/.beads/.br_history/issues.20260427_104559_805009051.jsonl +0 -261
- package/.beads/.br_history/issues.20260427_104600_255068030.jsonl +0 -261
- package/.beads/.br_history/issues.20260427_104600_717042012.jsonl +0 -261
- package/.beads/.br_history/issues.20260427_104601_215845416.jsonl +0 -261
- package/.beads/.br_history/issues.20260427_104601_899140331.jsonl +0 -261
- package/.beads/.br_history/issues.20260427_104606_172300551.jsonl +0 -261
- package/.beads/.br_history/issues.20260427_104606_658098709.jsonl +0 -261
- package/.beads/.br_history/issues.20260427_104607_085798670.jsonl +0 -261
- package/.beads/.br_history/issues.20260427_104607_627598880.jsonl +0 -261
- package/.beads/.br_history/issues.20260427_104608_071298223.jsonl +0 -261
- package/.beads/.br_history/issues.20260427_104615_198124329.jsonl +0 -261
- package/scripts/post-tweet-issues.js +0 -161
- /package/.beads/.br_history/{issues.20260427_103259_082222986.jsonl.meta.json → issues.20260427_114912_061702372.jsonl.meta.json} +0 -0
- /package/.beads/.br_history/{issues.20260427_103400_358332602.jsonl.meta.json → issues.20260427_115013_063113906.jsonl.meta.json} +0 -0
- /package/.beads/.br_history/{issues.20260427_103419_681839669.jsonl.meta.json → issues.20260427_115114_208497343.jsonl.meta.json} +0 -0
- /package/.beads/.br_history/{issues.20260427_103522_226669683.jsonl.meta.json → issues.20260427_115215_176080241.jsonl.meta.json} +0 -0
- /package/.beads/.br_history/{issues.20260427_103623_568379011.jsonl.meta.json → issues.20260427_115316_481573328.jsonl.meta.json} +0 -0
- /package/.beads/.br_history/{issues.20260427_103724_772051154.jsonl.meta.json → issues.20260427_115335_866978652.jsonl.meta.json} +0 -0
- /package/.beads/.br_history/{issues.20260427_103825_935228905.jsonl.meta.json → issues.20260427_115436_866087391.jsonl.meta.json} +0 -0
- /package/.beads/.br_history/{issues.20260427_103927_159626780.jsonl.meta.json → issues.20260427_115538_016094860.jsonl.meta.json} +0 -0
- /package/.beads/.br_history/{issues.20260427_104028_436388960.jsonl.meta.json → issues.20260427_115638_932947449.jsonl.meta.json} +0 -0
- /package/.beads/.br_history/{issues.20260427_104129_670562810.jsonl.meta.json → issues.20260427_115739_982932603.jsonl.meta.json} +0 -0
- /package/.beads/.br_history/{issues.20260427_104230_885162615.jsonl.meta.json → issues.20260427_115840_963681039.jsonl.meta.json} +0 -0
- /package/.beads/.br_history/{issues.20260427_104332_071213892.jsonl.meta.json → issues.20260427_115941_912431509.jsonl.meta.json} +0 -0
- /package/.beads/.br_history/{issues.20260427_104349_051129644.jsonl.meta.json → issues.20260427_120043_043356448.jsonl.meta.json} +0 -0
- /package/.beads/.br_history/{issues.20260427_104450_358444507.jsonl.meta.json → issues.20260427_120144_955596968.jsonl.meta.json} +0 -0
- /package/.beads/.br_history/{issues.20260427_104555_654123963.jsonl.meta.json → issues.20260427_120246_060733977.jsonl.meta.json} +0 -0
- /package/.beads/.br_history/{issues.20260427_104559_805009051.jsonl.meta.json → issues.20260427_120307_717985017.jsonl.meta.json} +0 -0
- /package/.beads/.br_history/{issues.20260427_104600_255068030.jsonl.meta.json → issues.20260427_120408_871846736.jsonl.meta.json} +0 -0
- /package/.beads/.br_history/{issues.20260427_104600_717042012.jsonl.meta.json → issues.20260427_121003_963750732.jsonl.meta.json} +0 -0
- /package/.beads/.br_history/{issues.20260427_104601_215845416.jsonl.meta.json → issues.20260427_121006_018509431.jsonl.meta.json} +0 -0
- /package/.beads/.br_history/{issues.20260427_104601_899140331.jsonl.meta.json → issues.20260427_121019_617062931.jsonl.meta.json} +0 -0
- /package/.beads/.br_history/{issues.20260427_104606_172300551.jsonl.meta.json → issues.20260427_121021_689536311.jsonl.meta.json} +0 -0
- /package/.beads/.br_history/{issues.20260427_104606_658098709.jsonl.meta.json → issues.20260428_172005_240631447.jsonl.meta.json} +0 -0
- /package/.beads/.br_history/{issues.20260427_104607_085798670.jsonl.meta.json → issues.20260430_073641_144807989.jsonl.meta.json} +0 -0
- /package/.beads/.br_history/{issues.20260427_104607_627598880.jsonl.meta.json → issues.20260430_073642_807075699.jsonl.meta.json} +0 -0
- /package/.beads/.br_history/{issues.20260427_104608_071298223.jsonl.meta.json → issues.20260430_073645_625754223.jsonl.meta.json} +0 -0
- /package/.beads/.br_history/{issues.20260427_104615_198124329.jsonl.meta.json → issues.20260430_090639_154646058.jsonl.meta.json} +0 -0
- /package/.beads/.br_history/{issues.20260427_104615_669652069.jsonl.meta.json → issues.20260430_090640_350560318.jsonl.meta.json} +0 -0
- /package/.beads/.br_history/{issues.20260427_104637_752744777.jsonl.meta.json → issues.20260430_090641_509319001.jsonl.meta.json} +0 -0
- /package/.beads/.br_history/{issues.20260427_104638_209211116.jsonl.meta.json → issues.20260430_095140_396749398.jsonl.meta.json} +0 -0
- /package/.beads/.br_history/{issues.20260427_104638_898729442.jsonl.meta.json → issues.20260501_230041_334056077.jsonl.meta.json} +0 -0
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Post tweet issues from beads at 1 tweet per minute
|
|
5
|
-
* Uses x binary for posting
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
const { execSync } = require('child_process');
|
|
9
|
-
const fs = require('fs');
|
|
10
|
-
const path = require('path');
|
|
11
|
-
|
|
12
|
-
// Configuration
|
|
13
|
-
const TWEET_DELAY_MS = 60 * 1000; // 1 minute
|
|
14
|
-
const MAX_TWEETS = 10; // Safety limit per run
|
|
15
|
-
|
|
16
|
-
// State for cleanup
|
|
17
|
-
let cleanupCalled = false;
|
|
18
|
-
|
|
19
|
-
function cleanup() {
|
|
20
|
-
if (cleanupCalled) return;
|
|
21
|
-
cleanupCalled = true;
|
|
22
|
-
console.log('Cleanup complete');
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// Graceful shutdown handlers
|
|
26
|
-
process.on('SIGINT', () => {
|
|
27
|
-
console.log('\nReceived SIGINT, cleaning up...');
|
|
28
|
-
cleanup();
|
|
29
|
-
process.exit(0);
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
process.on('SIGTERM', () => {
|
|
33
|
-
console.log('\nReceived SIGTERM, cleaning up...');
|
|
34
|
-
cleanup();
|
|
35
|
-
process.exit(0);
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
process.on('uncaughtException', (err) => {
|
|
39
|
-
console.error('Uncaught exception:', err);
|
|
40
|
-
cleanup();
|
|
41
|
-
process.exit(1);
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Execute command and return output
|
|
46
|
-
*/
|
|
47
|
-
function exec(command, options = {}) {
|
|
48
|
-
try {
|
|
49
|
-
const output = execSync(command, {
|
|
50
|
-
encoding: 'utf-8',
|
|
51
|
-
...options
|
|
52
|
-
});
|
|
53
|
-
return output.trim();
|
|
54
|
-
} catch (error) {
|
|
55
|
-
throw new Error(`Command failed: ${command}\n${error.message}`);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Get open tweet issues from beads
|
|
61
|
-
*/
|
|
62
|
-
function getTweetIssues() {
|
|
63
|
-
const output = exec('br list --json --status open');
|
|
64
|
-
const issues = JSON.parse(output);
|
|
65
|
-
|
|
66
|
-
// Filter for tweet issues (title starts with "Tweet:" or issue_type is "tweet")
|
|
67
|
-
return issues.filter(issue =>
|
|
68
|
-
issue.title.startsWith('Tweet:') ||
|
|
69
|
-
issue.issue_type === 'tweet'
|
|
70
|
-
);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Post a tweet using x binary
|
|
75
|
-
*/
|
|
76
|
-
function postTweet(text) {
|
|
77
|
-
const xPath = path.join(__dirname, '..', 'x', 'x');
|
|
78
|
-
const command = `"${xPath}" -t "${text.replace(/"/g, '\\"')}"`;
|
|
79
|
-
exec(command);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Close a beads issue
|
|
84
|
-
*/
|
|
85
|
-
function closeIssue(issueId) {
|
|
86
|
-
exec(`br close ${issueId} --json`);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Sleep for specified milliseconds
|
|
91
|
-
*/
|
|
92
|
-
function sleep(ms) {
|
|
93
|
-
return new Promise(resolve => setTimeout(resolve, ms));
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Main function
|
|
98
|
-
*/
|
|
99
|
-
async function main() {
|
|
100
|
-
try {
|
|
101
|
-
console.log('Fetching tweet issues from beads...');
|
|
102
|
-
const issues = getTweetIssues();
|
|
103
|
-
|
|
104
|
-
if (issues.length === 0) {
|
|
105
|
-
console.log('No tweet issues found. Exiting.');
|
|
106
|
-
return;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
console.log(`Found ${issues.length} tweet issues`);
|
|
110
|
-
console.log(`Will post up to ${MAX_TWEETS} tweets at 1 tweet/minute`);
|
|
111
|
-
|
|
112
|
-
let postedCount = 0;
|
|
113
|
-
|
|
114
|
-
for (const issue of issues) {
|
|
115
|
-
if (postedCount >= MAX_TWEETS) {
|
|
116
|
-
console.log(`Reached safety limit of ${MAX_TWEETS} tweets. Exiting.`);
|
|
117
|
-
break;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
console.log(`\n[${postedCount + 1}/${Math.min(MAX_TWEETS, issues.length)}] Processing issue: ${issue.id}`);
|
|
121
|
-
console.log(`Title: ${issue.title}`);
|
|
122
|
-
console.log(`Description: ${issue.description.substring(0, 100)}...`);
|
|
123
|
-
|
|
124
|
-
try {
|
|
125
|
-
// Post the tweet
|
|
126
|
-
console.log('Posting tweet...');
|
|
127
|
-
postTweet(issue.description);
|
|
128
|
-
console.log('Tweet posted successfully');
|
|
129
|
-
|
|
130
|
-
// Close the issue
|
|
131
|
-
console.log(`Closing issue ${issue.id}...`);
|
|
132
|
-
closeIssue(issue.id);
|
|
133
|
-
console.log('Issue closed');
|
|
134
|
-
|
|
135
|
-
postedCount++;
|
|
136
|
-
|
|
137
|
-
// Wait before next tweet (unless this is the last one)
|
|
138
|
-
if (postedCount < MAX_TWEETS && postedCount < issues.length) {
|
|
139
|
-
console.log(`\nWaiting ${TWEET_DELAY_MS / 1000} seconds before next tweet...`);
|
|
140
|
-
await sleep(TWEET_DELAY_MS);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
} catch (error) {
|
|
144
|
-
console.error(`Failed to process issue ${issue.id}:`, error.message);
|
|
145
|
-
// Continue with next issue
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
console.log(`\nCompleted. Posted ${postedCount} tweets.`);
|
|
150
|
-
cleanup();
|
|
151
|
-
process.exit(0);
|
|
152
|
-
|
|
153
|
-
} catch (error) {
|
|
154
|
-
console.error('Error:', error.message);
|
|
155
|
-
cleanup();
|
|
156
|
-
process.exit(1);
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
// Run main
|
|
161
|
-
main();
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|