worktrust 0.11.0 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -0
- package/engine-release.json +1 -1
- package/package-release.json +1 -1
- package/package.json +9 -1
- package/remote-adapter-claude-code.mjs +5 -3
- package/remote-adapter-codex.mjs +45 -5
- package/remote-adapter-terminal.mjs +248 -0
- package/remote-approval-bridge.mjs +30 -7
- package/remote-approvals.mjs +13 -3
- package/remote-cdp.mjs +60 -0
- package/remote-cli.mjs +7 -2
- package/remote-daemon.mjs +18 -3
- package/remote-inventory.mjs +14 -3
- package/remote-live-preview.mjs +205 -0
- package/remote-protocol.mjs +239 -110
- package/remote-run.mjs +18 -3
- package/remote-screen-approvals.mjs +79 -0
- package/remote-screen-push.mjs +76 -0
- package/remote-screen-states.mjs +113 -0
- package/remote-session-list.mjs +25 -2
- package/remote-sessions.mjs +10 -21
- package/remote-store.mjs +4 -3
- package/remote-terminal-cli.mjs +85 -0
- package/remote-terminal-sessions.mjs +291 -0
- package/worktrust.mjs +2 -2
package/README.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# worktrust
|
|
2
2
|
|
|
3
|
+
## 0.11.1: terminal sessions, and the live preview you can touch
|
|
4
|
+
|
|
5
|
+
`npx worktrust remote terminal on` lets the phone start Claude Code in a terminal session on WorkTrust's own tmux socket
|
|
6
|
+
(off until you turn it on), which you can also join at the desk with `npx worktrust remote attach <id>`. The phone reads
|
|
7
|
+
the session's screen, is sent it when it changes while someone follows it, and answers a dialog the agent shows only
|
|
8
|
+
when the screen still looks the way it did when you read it. The local preview can now be live: the page itself, on the
|
|
9
|
+
phone, touchable, through this computer's own browser. Codex gets the same three planning tools as Claude Code. What is
|
|
10
|
+
measured for the passport is unchanged: remote-steered sessions never count as your hours, and the measure rules stay 3.
|
|
11
|
+
|
|
3
12
|
## 0.11.0: steer your own agents from your phone
|
|
4
13
|
|
|
5
14
|
`npx worktrust remote` pairs this computer with the WorkTrust app and lets the phone steer the coding agents that run
|
package/engine-release.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"keyId":"608168ccdef72562fc91f9c0f9f2c2d6876bece7f7362cb545b818f7947da6b5","payload":{"files":{"chat-exports.mjs":"f026c5a063f62c22ba6f25474a9d9fdbb6074beebbfe1faff2a876c437a1a000","claude-mod.mjs":"02d86b0cdddf39879efc5194c0a5be6b41456faedec28963dc123a4e88dc3942","commit-rules.mjs":"e94cc32a5415f6d9e978145ab9505ac4ae0bac9431e6e9104b9b37155260b51f","config-edits.mjs":"527a7674f9d52b284bfda3b8089eb4b930a709bf14aedbec7f6eef1e59ef52ee","count-behaviour.mjs":"179baf829eda488bab3f17ae6917473ec01d0d6346f47de7bc144351274f19c8","credential-store.mjs":"a4b3540a61f4ce19e535c7f1d260c0d817686cd066d559a76db2ab108144abba","credential-vault-scripts.mjs":"7e42fe1db3885c2dec6f1de87bebfbefe2292d29179a68f3da87d19eb6c7704b","credential-vault.mjs":"279baabb217e2a3f170e8d7f2b271a88484531f9031c441360ea91561a70da99","export-facts.mjs":"3bbb46c80e8678b5cea7e15dcbfc456a2b48595053241c2b3cea508092f9b917","git-commits.mjs":"f9c084c54937a86df8fe30a0db2a58e04eeef0dbae69c54b8e368efc9964d6d8","history-outbox.mjs":"85c70389effc5b4ec9d9b33af9192314e67f47af2752515b42a7959344ce2354","history-progress.mjs":"dcc25ee94b727f2605a763349a4d8764640335d6cf0043fb6108cebeed16dcb9","log-session.mjs":"eb3bc0972bc30788521a492e136ed792d8265e0c5b8aede81fec4f3e071a25d0","orchestration-contract.mjs":"ec08f303a166365b99e70b675de4cfe76c6156c2567e14b5569f6d992f0231b7","orchestration-evidence.mjs":"d0d06cecf0eb08e5c6e653c62a4f45b1eddf2119c2acb8341056b34f488d214a","orchestration-report.mjs":"d4e0a9ad8e4a01b462d22c6b1866aac291565c533ff476085d3367cb6d59bc1b","package-integrity.mjs":"a8210c9494a56bfb9a5ea3d10064c7a269f0b6330c0af7c0700e706c3c0224e3","preserve-lines.mjs":"2df64a69687aa51219bf7b86b88d175cc50990fa29574b31897e41a9ebeecf43","preserve-summary.mjs":"137f781ed7021596a3f0ea67afcf2ab8616ac293f833dbb8f176e838e0ed8321","preserve.mjs":"cd111cae0f53a25a2d878a158479abfb1ace353361454843f91a16d241101d46","remote-adapter-claude-code.mjs":"
|
|
1
|
+
{"keyId":"608168ccdef72562fc91f9c0f9f2c2d6876bece7f7362cb545b818f7947da6b5","payload":{"files":{"chat-exports.mjs":"f026c5a063f62c22ba6f25474a9d9fdbb6074beebbfe1faff2a876c437a1a000","claude-mod.mjs":"02d86b0cdddf39879efc5194c0a5be6b41456faedec28963dc123a4e88dc3942","commit-rules.mjs":"e94cc32a5415f6d9e978145ab9505ac4ae0bac9431e6e9104b9b37155260b51f","config-edits.mjs":"527a7674f9d52b284bfda3b8089eb4b930a709bf14aedbec7f6eef1e59ef52ee","count-behaviour.mjs":"179baf829eda488bab3f17ae6917473ec01d0d6346f47de7bc144351274f19c8","credential-store.mjs":"a4b3540a61f4ce19e535c7f1d260c0d817686cd066d559a76db2ab108144abba","credential-vault-scripts.mjs":"7e42fe1db3885c2dec6f1de87bebfbefe2292d29179a68f3da87d19eb6c7704b","credential-vault.mjs":"279baabb217e2a3f170e8d7f2b271a88484531f9031c441360ea91561a70da99","export-facts.mjs":"3bbb46c80e8678b5cea7e15dcbfc456a2b48595053241c2b3cea508092f9b917","git-commits.mjs":"f9c084c54937a86df8fe30a0db2a58e04eeef0dbae69c54b8e368efc9964d6d8","history-outbox.mjs":"85c70389effc5b4ec9d9b33af9192314e67f47af2752515b42a7959344ce2354","history-progress.mjs":"dcc25ee94b727f2605a763349a4d8764640335d6cf0043fb6108cebeed16dcb9","log-session.mjs":"eb3bc0972bc30788521a492e136ed792d8265e0c5b8aede81fec4f3e071a25d0","orchestration-contract.mjs":"ec08f303a166365b99e70b675de4cfe76c6156c2567e14b5569f6d992f0231b7","orchestration-evidence.mjs":"d0d06cecf0eb08e5c6e653c62a4f45b1eddf2119c2acb8341056b34f488d214a","orchestration-report.mjs":"d4e0a9ad8e4a01b462d22c6b1866aac291565c533ff476085d3367cb6d59bc1b","package-integrity.mjs":"a8210c9494a56bfb9a5ea3d10064c7a269f0b6330c0af7c0700e706c3c0224e3","preserve-lines.mjs":"2df64a69687aa51219bf7b86b88d175cc50990fa29574b31897e41a9ebeecf43","preserve-summary.mjs":"137f781ed7021596a3f0ea67afcf2ab8616ac293f833dbb8f176e838e0ed8321","preserve.mjs":"cd111cae0f53a25a2d878a158479abfb1ace353361454843f91a16d241101d46","remote-adapter-claude-code.mjs":"a5ef08186128d9fe4023944378bb0ff5682a8ae64ffdb07ef5e76cc51894d721","remote-adapter-codex.mjs":"d2fd6c61d9e3c4a45e9b10da1aa3c15d45c86629d6456e4a8d25ad95b13eb209","remote-adapter-terminal.mjs":"9237d3747a25126fcdad42c0eab10e69393754388a6014b30fb0890b9c735888","remote-approval-bridge.mjs":"092f17b7969e4f35bea064315d04dcde1faa6a3fd3e737dcc05aece82c7a37c4","remote-approvals.mjs":"5a371e049ceb154100a3b0c1900d8a2c1fc193b01e8069f11ce1690bcf4df3e1","remote-attachments.mjs":"2e9c1277329a45cf26c0c62abda632cf0ab9fad78d0504416ecee9805220e16c","remote-cdp.mjs":"70e333a1ebe845e872cc3a703a0a507391f8ce59640bdbd662bdad55eeff216b","remote-changes.mjs":"2141fece4961a5bc1bb1b046f78222812617457b1ba6452275eac6a897e62e19","remote-claude-events.mjs":"58822471203c6a1b66cf81c115c4d713657c3dea5c7b98df959f894ee5b2e704","remote-claude-progress.mjs":"2ca626d3dbc16d8d570abe1df6477b7e44ffb43c1d9145228ec5ea1928e415ca","remote-cli.mjs":"3b291937359a1f76a2f2966ed10004b3e60876ce505a7079f060664ab9be90b6","remote-coalesce.mjs":"cb0967d9cfe81e3892bcade8349d6814db98be8c2adbdb54df0b8d1b142f65d1","remote-codex-events.mjs":"58657d6070a50c837737cb85f5a1eaf9c2cbc4e1adfe3e970748ab3b2af94631","remote-daemon.mjs":"f272c4eee2ff4ecfc3843dbb089a1e9249ac4e7f48756773ec44f4533aa18143","remote-inventory.mjs":"ece467b45a50a3fff8c59a13f8224bc1a8a723fbeadb2371d9843ba1147b685c","remote-journal.mjs":"907ebd48c53162b22dc743ef95b53c1a6be6886a7495605b5cfa820b8de9d330","remote-live-preview.mjs":"faa70f9260ac05037204c2a0c3facf4ffe42f68408948390b341b453a2932289","remote-pairing.mjs":"ae03427b6510e52da08aaf9387d5e08516ee25380c7efa420432f4e1e936a7c5","remote-pipeline-config.mjs":"00cde6a61ce21144c51ac56fce42fee159aa9dba6586218a7ea790ce4a6bd40b","remote-pipeline-parsers.mjs":"43ca0d332d7bc883c4759a754a555815ae5dfe133446b91ba9f2e48a350fa20f","remote-pipeline.mjs":"b856ead989b29ddb618ef69bbacd104bae2b02c9d1c5214291d08ce469a8b24e","remote-policy.mjs":"aacf7578537021ab3849095bb1f58f0ed12c453c6ca2ab1352a1716fb13b0ca4","remote-preview.mjs":"fe504ad6f83dcb4a4ebdcc018686a9a5a900c47cdf8c45b75e7d02e2f3056155","remote-projects.mjs":"d07997167d1f51139ff010c8753639e48c5cd33688568459e184eabb12bfff84","remote-protocol.mjs":"e816db7cce36be1f5f230c889c13a4c629924b533ea713bfa37e4e861be112f4","remote-qr.mjs":"b80e2b4a5bc020cf6ed92e91d06b327cb5197de1c35b3445a0fc2c7a3bf1ab3f","remote-release-plans.mjs":"11884a62b7d6dcccb5e154a26603bdf650f7b40f946329fb174d8c13729bec74","remote-releases.mjs":"fb08b72593ea00013c8b679e0c0d7dee95b0fd7cc5fd31b80ac575d0e340927d","remote-run.mjs":"5a324e9c76de8cfd0bf15eed155edcc5d307da5e370a9aa70471a9566ae5ae6a","remote-screen-approvals.mjs":"c43ab286d36a38d17639d155782ffa017f1a9b6806a09b82ed0142a1290b6000","remote-screen-push.mjs":"4ee8bd48d24b2c87581e9f33d8354a86381f7febd82f89ed509a7a87c1442608","remote-screen-states.mjs":"7c3c86a584bebf52461f3cab39c05ea2a13910061704d48fc622956e842940f7","remote-service.mjs":"1b9d4ecf99b667f2ab7c78fe1dfd5cf507cbb36c5bcad15bfa2a88c313ae758e","remote-session-list.mjs":"494fdbe20f0542806ac6c42ad149c52e2d3ace23a3a7567f96dc7e80d092c727","remote-sessions.mjs":"fad62c5c3cb9dabf177b39bcc843a78b77784e3711f8a22398f1b518a6adfc08","remote-steered.mjs":"fbbd3685a8cd497ae03235d258e2116e2129aac19046759fb2468fe79911f0b3","remote-steering.mjs":"7ba22e6110cea3ac75a4f084f8f92a5bd90c31a19d3ce58a88a0843bdadea834","remote-store.mjs":"15fe6a2c0640e222e834a21cf7b60747da839e975813faf2f6256aa44d08635f","remote-terminal-cli.mjs":"82a048b75e412d0b6db076afbb84cab7c754dec72b6c8b6af4d4906b38e988a7","remote-terminal-sessions.mjs":"6ab51824890a18768d23cedc499f3840b2b02a8ed651463c1fe2d74dd352a361","remote-transport.mjs":"68650fd77ea09b5762377f87cabdc1c73a34d77324aa5bf0cd9742094a50c32b","runtime-install.mjs":"aab47b52c79d726ef428a24f982c648fa3f1c2dc2b574f633611d02924864e5f","self-update.mjs":"378e3620d48c72cf0bf812be408883b995cdb2223de34a20f762dd73eeffb258","session-databases.mjs":"b9fe20d7445205bdbf4cf2eaaf9cc770dad01e23d41e644b04930ca34e10426d","setup-mcp.mjs":"b732e3dd9b3e522b7cc8acf167ce28ba8f1a8dee797ee15bd7c3b02919b13e6f","stack-rules.mjs":"b23c56e72ec56ba02b17ed895f869172d988c468a697e8d6026b0e268f61e489","stretch-evidence.mjs":"5f5667b92adf11b1a5a6330a0f26dd6db73d56fe60823d9a5246dab71d27d380","transcript-readers.mjs":"e9f20415c2b5d62a09f35a63075002ebd1da56edb32f242d52822d58ecbd8ac3","worktrust-launch.mjs":"84801bd29d472d48188c126b9ebe3989a3132b54e13cc4fe534ff7c383a294ee","worktrust.mjs":"57b754e24fbf2b7cd2d1df2d2625bc750b7d7d3c5c07e4b7e476a3f551f40bc1"},"format":"worktrust-package/1","kind":"engine","version":"0.11.1"},"signature":"_caaTvxIr1zmrzSUBV355in8lLXNWIyWVVd3Tz9mTTsPhbkJXrZp82cXB0FSXVYjWVyn9PO_HYVwaLGyyul7CQ"}
|
package/package-release.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"keyId":"608168ccdef72562fc91f9c0f9f2c2d6876bece7f7362cb545b818f7947da6b5","payload":{"files":{"AGENTS.md":"e8abb38c293b57b71d3a6163d6242d1f375e773372b91b6d8ce39c584c51262a","CLAUDE.md":"5933504f93e5a40369a4790e96dd5dad791d849d3178b1833eb64088e456aaeb","LICENSE":"b38ea343eb95892d4164274be4184d6e34eade9d4c454e1dcf8bc7735736425e","README.md":"
|
|
1
|
+
{"keyId":"608168ccdef72562fc91f9c0f9f2c2d6876bece7f7362cb545b818f7947da6b5","payload":{"files":{"AGENTS.md":"e8abb38c293b57b71d3a6163d6242d1f375e773372b91b6d8ce39c584c51262a","CLAUDE.md":"5933504f93e5a40369a4790e96dd5dad791d849d3178b1833eb64088e456aaeb","LICENSE":"b38ea343eb95892d4164274be4184d6e34eade9d4c454e1dcf8bc7735736425e","README.md":"99f042b78ff30896d0a54ffc46385eba99bf0a88be2a5333599aaf304ff3da00","SECURITY.md":"69f654b8101ab49821b8eb54b631f0a028035149c727953dc7d609faa2a9b2e0","chat-exports.mjs":"f026c5a063f62c22ba6f25474a9d9fdbb6074beebbfe1faff2a876c437a1a000","claude-mod.mjs":"02d86b0cdddf39879efc5194c0a5be6b41456faedec28963dc123a4e88dc3942","commit-rules.mjs":"e94cc32a5415f6d9e978145ab9505ac4ae0bac9431e6e9104b9b37155260b51f","config-edits.mjs":"527a7674f9d52b284bfda3b8089eb4b930a709bf14aedbec7f6eef1e59ef52ee","count-behaviour.mjs":"179baf829eda488bab3f17ae6917473ec01d0d6346f47de7bc144351274f19c8","credential-store.mjs":"a4b3540a61f4ce19e535c7f1d260c0d817686cd066d559a76db2ab108144abba","credential-vault-scripts.mjs":"7e42fe1db3885c2dec6f1de87bebfbefe2292d29179a68f3da87d19eb6c7704b","credential-vault.mjs":"279baabb217e2a3f170e8d7f2b271a88484531f9031c441360ea91561a70da99","engine-release.json":"29a300c47e3e89efe343a8bea9aca9980fc8bedf4daa2c4049e90b92a69447c5","export-facts.mjs":"3bbb46c80e8678b5cea7e15dcbfc456a2b48595053241c2b3cea508092f9b917","git-commits.mjs":"f9c084c54937a86df8fe30a0db2a58e04eeef0dbae69c54b8e368efc9964d6d8","history-outbox.mjs":"85c70389effc5b4ec9d9b33af9192314e67f47af2752515b42a7959344ce2354","history-progress.mjs":"dcc25ee94b727f2605a763349a4d8764640335d6cf0043fb6108cebeed16dcb9","log-session.mjs":"eb3bc0972bc30788521a492e136ed792d8265e0c5b8aede81fec4f3e071a25d0","orchestration-contract.mjs":"ec08f303a166365b99e70b675de4cfe76c6156c2567e14b5569f6d992f0231b7","orchestration-evidence.mjs":"d0d06cecf0eb08e5c6e653c62a4f45b1eddf2119c2acb8341056b34f488d214a","orchestration-report.mjs":"d4e0a9ad8e4a01b462d22c6b1866aac291565c533ff476085d3367cb6d59bc1b","package-integrity.mjs":"a8210c9494a56bfb9a5ea3d10064c7a269f0b6330c0af7c0700e706c3c0224e3","package.json":"f18ff02e0d5e037475900dba4fd0d6a4c5206e1f0e0c0c3085d15949c0dd3448","preserve-lines.mjs":"2df64a69687aa51219bf7b86b88d175cc50990fa29574b31897e41a9ebeecf43","preserve-summary.mjs":"137f781ed7021596a3f0ea67afcf2ab8616ac293f833dbb8f176e838e0ed8321","preserve.mjs":"cd111cae0f53a25a2d878a158479abfb1ace353361454843f91a16d241101d46","remote-adapter-claude-code.mjs":"a5ef08186128d9fe4023944378bb0ff5682a8ae64ffdb07ef5e76cc51894d721","remote-adapter-codex.mjs":"d2fd6c61d9e3c4a45e9b10da1aa3c15d45c86629d6456e4a8d25ad95b13eb209","remote-adapter-terminal.mjs":"9237d3747a25126fcdad42c0eab10e69393754388a6014b30fb0890b9c735888","remote-approval-bridge.mjs":"092f17b7969e4f35bea064315d04dcde1faa6a3fd3e737dcc05aece82c7a37c4","remote-approvals.mjs":"5a371e049ceb154100a3b0c1900d8a2c1fc193b01e8069f11ce1690bcf4df3e1","remote-attachments.mjs":"2e9c1277329a45cf26c0c62abda632cf0ab9fad78d0504416ecee9805220e16c","remote-cdp.mjs":"70e333a1ebe845e872cc3a703a0a507391f8ce59640bdbd662bdad55eeff216b","remote-changes.mjs":"2141fece4961a5bc1bb1b046f78222812617457b1ba6452275eac6a897e62e19","remote-claude-events.mjs":"58822471203c6a1b66cf81c115c4d713657c3dea5c7b98df959f894ee5b2e704","remote-claude-progress.mjs":"2ca626d3dbc16d8d570abe1df6477b7e44ffb43c1d9145228ec5ea1928e415ca","remote-cli.mjs":"3b291937359a1f76a2f2966ed10004b3e60876ce505a7079f060664ab9be90b6","remote-coalesce.mjs":"cb0967d9cfe81e3892bcade8349d6814db98be8c2adbdb54df0b8d1b142f65d1","remote-codex-events.mjs":"58657d6070a50c837737cb85f5a1eaf9c2cbc4e1adfe3e970748ab3b2af94631","remote-daemon.mjs":"f272c4eee2ff4ecfc3843dbb089a1e9249ac4e7f48756773ec44f4533aa18143","remote-inventory.mjs":"ece467b45a50a3fff8c59a13f8224bc1a8a723fbeadb2371d9843ba1147b685c","remote-journal.mjs":"907ebd48c53162b22dc743ef95b53c1a6be6886a7495605b5cfa820b8de9d330","remote-live-preview.mjs":"faa70f9260ac05037204c2a0c3facf4ffe42f68408948390b341b453a2932289","remote-pairing.mjs":"ae03427b6510e52da08aaf9387d5e08516ee25380c7efa420432f4e1e936a7c5","remote-pipeline-config.mjs":"00cde6a61ce21144c51ac56fce42fee159aa9dba6586218a7ea790ce4a6bd40b","remote-pipeline-parsers.mjs":"43ca0d332d7bc883c4759a754a555815ae5dfe133446b91ba9f2e48a350fa20f","remote-pipeline.mjs":"b856ead989b29ddb618ef69bbacd104bae2b02c9d1c5214291d08ce469a8b24e","remote-policy.mjs":"aacf7578537021ab3849095bb1f58f0ed12c453c6ca2ab1352a1716fb13b0ca4","remote-preview.mjs":"fe504ad6f83dcb4a4ebdcc018686a9a5a900c47cdf8c45b75e7d02e2f3056155","remote-projects.mjs":"d07997167d1f51139ff010c8753639e48c5cd33688568459e184eabb12bfff84","remote-protocol.mjs":"e816db7cce36be1f5f230c889c13a4c629924b533ea713bfa37e4e861be112f4","remote-qr.mjs":"b80e2b4a5bc020cf6ed92e91d06b327cb5197de1c35b3445a0fc2c7a3bf1ab3f","remote-release-plans.mjs":"11884a62b7d6dcccb5e154a26603bdf650f7b40f946329fb174d8c13729bec74","remote-releases.mjs":"fb08b72593ea00013c8b679e0c0d7dee95b0fd7cc5fd31b80ac575d0e340927d","remote-run.mjs":"5a324e9c76de8cfd0bf15eed155edcc5d307da5e370a9aa70471a9566ae5ae6a","remote-screen-approvals.mjs":"c43ab286d36a38d17639d155782ffa017f1a9b6806a09b82ed0142a1290b6000","remote-screen-push.mjs":"4ee8bd48d24b2c87581e9f33d8354a86381f7febd82f89ed509a7a87c1442608","remote-screen-states.mjs":"7c3c86a584bebf52461f3cab39c05ea2a13910061704d48fc622956e842940f7","remote-service.mjs":"1b9d4ecf99b667f2ab7c78fe1dfd5cf507cbb36c5bcad15bfa2a88c313ae758e","remote-session-list.mjs":"494fdbe20f0542806ac6c42ad149c52e2d3ace23a3a7567f96dc7e80d092c727","remote-sessions.mjs":"fad62c5c3cb9dabf177b39bcc843a78b77784e3711f8a22398f1b518a6adfc08","remote-steered.mjs":"fbbd3685a8cd497ae03235d258e2116e2129aac19046759fb2468fe79911f0b3","remote-steering.mjs":"7ba22e6110cea3ac75a4f084f8f92a5bd90c31a19d3ce58a88a0843bdadea834","remote-store.mjs":"15fe6a2c0640e222e834a21cf7b60747da839e975813faf2f6256aa44d08635f","remote-terminal-cli.mjs":"82a048b75e412d0b6db076afbb84cab7c754dec72b6c8b6af4d4906b38e988a7","remote-terminal-sessions.mjs":"6ab51824890a18768d23cedc499f3840b2b02a8ed651463c1fe2d74dd352a361","remote-transport.mjs":"68650fd77ea09b5762377f87cabdc1c73a34d77324aa5bf0cd9742094a50c32b","runtime-install.mjs":"aab47b52c79d726ef428a24f982c648fa3f1c2dc2b574f633611d02924864e5f","self-update.mjs":"378e3620d48c72cf0bf812be408883b995cdb2223de34a20f762dd73eeffb258","session-databases.mjs":"b9fe20d7445205bdbf4cf2eaaf9cc770dad01e23d41e644b04930ca34e10426d","setup-mcp.mjs":"b732e3dd9b3e522b7cc8acf167ce28ba8f1a8dee797ee15bd7c3b02919b13e6f","stack-rules.mjs":"b23c56e72ec56ba02b17ed895f869172d988c468a697e8d6026b0e268f61e489","stretch-evidence.mjs":"5f5667b92adf11b1a5a6330a0f26dd6db73d56fe60823d9a5246dab71d27d380","transcript-readers.mjs":"e9f20415c2b5d62a09f35a63075002ebd1da56edb32f242d52822d58ecbd8ac3","worktrust-launch.mjs":"84801bd29d472d48188c126b9ebe3989a3132b54e13cc4fe534ff7c383a294ee","worktrust.mjs":"57b754e24fbf2b7cd2d1df2d2625bc750b7d7d3c5c07e4b7e476a3f551f40bc1"},"format":"worktrust-package/1","kind":"npm","version":"0.11.1"},"signature":"H6-gYL1S-BGkWupmM1M2AqDSJ6h7NxDZe7m9E1JguhUXkmjiWPvK5mxD4mBwX70v_DJrjb_dqghYSOpncxtEDQ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "worktrust",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"description": "Couple this computer to WorkTrust: approve a code in your browser, and every AI app here reports what you built. Metadata only, no dependencies.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -57,6 +57,14 @@
|
|
|
57
57
|
"remote-steering.mjs",
|
|
58
58
|
"remote-codex-events.mjs",
|
|
59
59
|
"remote-adapter-codex.mjs",
|
|
60
|
+
"remote-adapter-terminal.mjs",
|
|
61
|
+
"remote-terminal-sessions.mjs",
|
|
62
|
+
"remote-terminal-cli.mjs",
|
|
63
|
+
"remote-screen-states.mjs",
|
|
64
|
+
"remote-screen-approvals.mjs",
|
|
65
|
+
"remote-screen-push.mjs",
|
|
66
|
+
"remote-cdp.mjs",
|
|
67
|
+
"remote-live-preview.mjs",
|
|
60
68
|
"remote-projects.mjs",
|
|
61
69
|
"remote-pipeline-config.mjs",
|
|
62
70
|
"remote-pipeline-parsers.mjs",
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { spawn } from "node:child_process";
|
|
17
17
|
import { writeFileSync, rmSync } from "node:fs";
|
|
18
|
+
import { PLAN_HINT } from "./remote-approval-bridge.mjs";
|
|
18
19
|
|
|
19
20
|
export const APPROVAL_TOOL = "mcp__worktrust_remote__approve";
|
|
20
21
|
const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
|
|
@@ -39,8 +40,8 @@ export const REMOTE_DENY = Object.freeze([
|
|
|
39
40
|
|
|
40
41
|
/** The planning tools of the session's own MCP server (remote-approval-bridge.mjs): they only write a plan, so no prompt. */
|
|
41
42
|
export const PLAN_TOOLS = Object.freeze(["mcp__worktrust_remote__plan_release", "mcp__worktrust_remote__plan_task", "mcp__worktrust_remote__plan_list"]);
|
|
42
|
-
/** The one line the session's system prompt gains (owner, 2026-11-08: the agent arranges its own work). */
|
|
43
|
-
export
|
|
43
|
+
/** The one line the session's system prompt gains (owner, 2026-11-08: the agent arranges its own work); one text, the bridge's. */
|
|
44
|
+
export { PLAN_HINT };
|
|
44
45
|
|
|
45
46
|
export function claudeArgs({ features, mode, model, resume, sessionRef, mcpConfig }) {
|
|
46
47
|
if (mode !== "ask" && mode !== "plan") throw new Error("the protocol offers the ask and plan modes only");
|
|
@@ -108,4 +109,5 @@ export function startClaude({ file, cwd, env, args, onLine, onExit, onNoise = ()
|
|
|
108
109
|
};
|
|
109
110
|
}
|
|
110
111
|
|
|
111
|
-
|
|
112
|
+
/** A session's file, gone; a session that never had one (a Codex run without the bridge) is no error that ends onExit early. */
|
|
113
|
+
export const removeQuietly = (file) => { if (typeof file === "string" && file) rmSync(file, { force: true }); };
|
package/remote-adapter-codex.mjs
CHANGED
|
@@ -13,22 +13,59 @@
|
|
|
13
13
|
* only an approvable class reaches the phone, everything else is declined here
|
|
14
14
|
* The approval policy is `untrusted` and the sandbox `workspace-write` (`read-only` in the plan mode): Codex asks before
|
|
15
15
|
* anything it does not already trust, and never writes outside the project on its own. No free argument reaches Codex.
|
|
16
|
+
*
|
|
17
|
+
* THE PLANNING TOOLS (2026-11-09), as Claude Code has them: the session's own MCP server (remote-approval-bridge.mjs,
|
|
18
|
+
* `--plans-only`) is the ONE server of the run, given as a `--config` override on Codex's command line, never written to
|
|
19
|
+
* the person's ~/.codex/config.toml. Its socket and token are in a file of this user's only (writeBridgeSession), so the
|
|
20
|
+
* command line, readable in a process list, names a path and no secret. Measured on Codex 0.154.0 (2026-11-09): the
|
|
21
|
+
* override starts the bridge, `enabled_tools` keeps it to the three, `tools.<name>.approval_mode="approve"` runs them
|
|
22
|
+
* without a prompt (else Codex asks by `mcpServer/elicitation/request`), and the server's instructions reach the agent.
|
|
16
23
|
*/
|
|
17
24
|
import { spawn } from "node:child_process";
|
|
25
|
+
import { chmodSync, realpathSync, writeFileSync } from "node:fs";
|
|
26
|
+
import { isAbsolute } from "node:path";
|
|
18
27
|
import { changePaths, codexApprovalAsTool, refusalFor } from "./remote-codex-events.mjs";
|
|
28
|
+
import { PLAN_TOOL_NAMES } from "./remote-approval-bridge.mjs";
|
|
19
29
|
|
|
20
30
|
const MODEL = /^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/;
|
|
21
31
|
const THREAD = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
22
32
|
export const isCodexThreadId = (value) => typeof value === "string" && THREAD.test(value);
|
|
23
33
|
|
|
34
|
+
/** A TOML basic string (Codex parses a `--config` value as TOML); a value TOML could not carry is refused, never mangled. */
|
|
35
|
+
const toml = (value) => {
|
|
36
|
+
if (typeof value !== "string" || !value || /[\u0000-\u001f\u007f]/.test(value)) throw new Error("not a value Codex's config can carry");
|
|
37
|
+
return JSON.stringify(value);
|
|
38
|
+
};
|
|
39
|
+
const realOr = (path) => { try { return realpathSync(path); } catch { return path; } };
|
|
40
|
+
|
|
24
41
|
/**
|
|
25
42
|
* The fixed command line. The person's own Codex config stays (its model, its notify hook), but a remote session never
|
|
26
43
|
* widens the sandbox or reaches a configured MCP server (review 2026-11-07, P2-1): no extra writable roots, no network in
|
|
27
|
-
* the sandbox,
|
|
44
|
+
* the sandbox, and `mcp_servers` replaced whole: empty, or the session's own bridge alone (`plans`: { node, bridge,
|
|
45
|
+
* session }, absolute paths). MCP servers a Codex PLUGIN brings still start (measured on 0.154.0); that is part of the
|
|
28
46
|
* risk the person accepts when they turn Codex on (`worktrust remote codex on`).
|
|
47
|
+
* The project is named `untrusted` for this run (2026-11-09): measured on 0.154.0, a `workspace-write` thread in a
|
|
48
|
+
* project Codex does not know WRITES `[projects."<path>"] trust_level = "trusted"` into the person's config.toml; named
|
|
49
|
+
* here, nothing is written, and the repository's own .codex config stays out, as `--setting-sources user` keeps a
|
|
50
|
+
* repository's settings out of Claude Code.
|
|
29
51
|
*/
|
|
30
|
-
export function codexArgs() {
|
|
31
|
-
|
|
52
|
+
export function codexArgs({ cwd, plans = null }) {
|
|
53
|
+
if (typeof cwd !== "string" || !isAbsolute(cwd)) throw new Error("a Codex session runs in an absolute project path");
|
|
54
|
+
let servers = "mcp_servers={}";
|
|
55
|
+
if (plans) {
|
|
56
|
+
if (![plans.node, plans.bridge, plans.session].every((p) => typeof p === "string" && isAbsolute(p))) throw new Error("the bridge is named by absolute paths");
|
|
57
|
+
const args = [plans.bridge, "--plans-only", "--session", plans.session].map(toml).join(",");
|
|
58
|
+
servers = `mcp_servers={worktrust_remote={command=${toml(plans.node)},args=[${args}],enabled_tools=[${PLAN_TOOL_NAMES.map(toml).join(",")}],tools={${PLAN_TOOL_NAMES.map((n) => `${n}={approval_mode="approve"}`).join(",")}}}}`;
|
|
59
|
+
}
|
|
60
|
+
const trust = `projects={${[...new Set([cwd, realOr(cwd)])].map((p) => `${toml(p)}={trust_level="untrusted"}`).join(",")}}`;
|
|
61
|
+
return ["app-server", "--config", "sandbox_workspace_write.network_access=false", "--config", "sandbox_workspace_write.writable_roots=[]", "--config", servers, "--config", trust];
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/** The bridge's channel for one Codex session: its socket and token, this user only (0600), removed with the session. */
|
|
65
|
+
export function writeBridgeSession(file, { socket, token }) {
|
|
66
|
+
writeFileSync(file, JSON.stringify({ socket, token }), { mode: 0o600 });
|
|
67
|
+
chmodSync(file, 0o600);
|
|
68
|
+
return file;
|
|
32
69
|
}
|
|
33
70
|
|
|
34
71
|
/** thread/start or thread/resume parameters from the protocol's closed options. */
|
|
@@ -43,17 +80,20 @@ export function threadParams({ cwd, model, mode, resume }) {
|
|
|
43
80
|
const text = (t) => [{ type: "text", text: t }];
|
|
44
81
|
|
|
45
82
|
/**
|
|
46
|
-
* o: { file, cwd, env, model, mode, resume, onMessage(msg), onThread(threadId), onExit(how), approve(tool, input) → Promise<boolean> }.
|
|
83
|
+
* o: { file, cwd, env, model, mode, resume, plans?, onMessage(msg), onThread(threadId), onExit(how), approve(tool, input) → Promise<boolean> }.
|
|
47
84
|
* → { pid, alive, write(text), steer(text) → Promise<{ ok }>, interrupt() → Promise<boolean>, stop(), close() }.
|
|
48
85
|
*/
|
|
49
86
|
export function startCodex(o) {
|
|
50
|
-
const child = spawn(o.file, codexArgs(), { cwd: o.cwd, env: o.env, stdio: ["pipe", "pipe", "pipe"], detached: process.platform !== "win32", windowsHide: true });
|
|
87
|
+
const child = spawn(o.file, codexArgs({ cwd: o.cwd, plans: o.plans ?? null }), { cwd: o.cwd, env: o.env, stdio: ["pipe", "pipe", "pipe"], detached: process.platform !== "win32", windowsHide: true });
|
|
51
88
|
let buffer = "", exited = false, nextId = 1, threadId = null, turnId = null, ready = false;
|
|
52
89
|
const waiting = new Map(), queue = [], fileChanges = {};
|
|
53
90
|
const send = (msg) => { if (!exited) child.stdin.write(`${JSON.stringify(msg)}\n`); };
|
|
54
91
|
const call = (method, params) => new Promise((resolve) => { if (exited) { resolve({ error: { message: "codex exited" } }); return; } const id = nextId++; waiting.set(id, resolve); send({ id, method, params }); });
|
|
55
92
|
const turn = (t) => call("turn/start", { threadId, input: text(t) });
|
|
56
93
|
async function answer(msg) {
|
|
94
|
+
// An MCP server's question (a tool call to approve, a form): the planning tools never ask (approval_mode above), and
|
|
95
|
+
// nothing else of an MCP server is the phone's to answer. Declined in the elicitation's own shape.
|
|
96
|
+
if (msg.method === "mcpServer/elicitation/request") { send({ id: msg.id, result: { action: "decline", content: null } }); return; }
|
|
57
97
|
const asks = msg.method === "item/permissions/requestApproval" ? null : codexApprovalAsTool(msg.method, msg.params, fileChanges, o.cwd);
|
|
58
98
|
let allowed = false;
|
|
59
99
|
if (asks) { allowed = true; for (const a of asks) if (!(await o.approve(a.tool, a.input))) { allowed = false; break; } }
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE TERMINAL ADAPTER, ON tmux (release 19, 2026-11-09; docs/remote-agents/PRIOR-ART-ANALYSIS.md 2.3). A terminal session is
|
|
3
|
+
* one tmux session on WorkTrust's OWN socket, `tmux -L worktrust-remote -f <our config>`, so the person sees the same live
|
|
4
|
+
* agent at the desk (`worktrust remote attach <id>`) and on the phone. The person's own tmux server, socket and
|
|
5
|
+
* ~/.tmux.conf are never touched: every call names our socket and our config, and $TMUX is removed from the call's
|
|
6
|
+
* environment so no call can reach the server the person is sitting in.
|
|
7
|
+
*
|
|
8
|
+
* What tmux itself would do with untrusted text, and what this file does instead (each one held by test-remote-terminal):
|
|
9
|
+
* - A command given as ONE argument is run through the shell (`sh -c`); given as several it is exec'd directly. So an
|
|
10
|
+
* agent's argv has at least two elements, an absolute program first, and is passed after `--`.
|
|
11
|
+
* - An argument that is `;` or ends in `;` ENDS the tmux command and starts another, even after `--` (measured on 3.6a:
|
|
12
|
+
* `send-keys -l -- 'x;' new-session -d -s injected` made a session). Text from the phone is escaped (`\;`), and any
|
|
13
|
+
* other argument ending in `;` is refused.
|
|
14
|
+
* - A target without `=` matches by prefix; every target here is `=name` (exact).
|
|
15
|
+
* - Text goes in with `send-keys -l` (literal: key names are not looked up). A key is only one of KEYS, by our own word.
|
|
16
|
+
* - Control characters from the phone (escape sequences, newlines, Ctrl codes) are refused, never typed.
|
|
17
|
+
* Session names are `wt-<remote session id>`, checked against one strict pattern before any call.
|
|
18
|
+
*
|
|
19
|
+
* No shell anywhere: each call is execFile with an argv array, a timeout and no input.
|
|
20
|
+
*/
|
|
21
|
+
import { execFile, spawn } from "node:child_process";
|
|
22
|
+
import { writeFileSync, chmodSync, mkdirSync, existsSync } from "node:fs";
|
|
23
|
+
import { isAbsolute, join } from "node:path";
|
|
24
|
+
import { REMOTE_DENY } from "./remote-adapter-claude-code.mjs";
|
|
25
|
+
|
|
26
|
+
export const SOCKET = "worktrust-remote";
|
|
27
|
+
/** Our socket, or a throwaway one a test names (`worktrust-remote-test-<pid>`); never "default", never a path. */
|
|
28
|
+
const SOCKET_NAME = /^worktrust-remote(-[a-z0-9-]{1,48})?$/;
|
|
29
|
+
const SESSION_NAME = /^wt-ses_[A-Za-z0-9_-]{22}$/;
|
|
30
|
+
const SESSION_ID = /^ses_[A-Za-z0-9_-]{22}$/;
|
|
31
|
+
const REF = /^[A-Za-z0-9._:-]{1,256}$/;
|
|
32
|
+
/**
|
|
33
|
+
* The keys a computer may press, by our own word: nothing from a phone is read as a key name. `dismiss` answers a
|
|
34
|
+
* screen dialog "no" (remote-screen-approvals.mjs, only after the screen still hashes the same).
|
|
35
|
+
*/
|
|
36
|
+
export const KEYS = Object.freeze({ enter: "Enter", interrupt: "C-c", dismiss: "Escape" });
|
|
37
|
+
export const MIN_TMUX = [3, 0]; // multi-argument commands exec'd without a shell
|
|
38
|
+
export const MAX_SCREEN_LINES = 2000;
|
|
39
|
+
const MAX_LINE = 1000;
|
|
40
|
+
const MAX_SCREEN_CHARS = 256 * 1024; // well under the sealed body's 1 MiB
|
|
41
|
+
|
|
42
|
+
export const tmuxNameOf = (sessionId) => {
|
|
43
|
+
if (typeof sessionId !== "string" || !SESSION_ID.test(sessionId)) throw new TypeError("not a remote session id");
|
|
44
|
+
return `wt-${sessionId}`;
|
|
45
|
+
};
|
|
46
|
+
export const sessionIdOfName = (name) => (typeof name === "string" && SESSION_NAME.test(name) ? name.slice(3) : null);
|
|
47
|
+
/** What `worktrust remote attach` takes: the session id or its tmux name, nothing else. */
|
|
48
|
+
export const attachTarget = (id) => (typeof id === "string" && SESSION_ID.test(id) ? `wt-${id}` : sessionIdOfName(id) ? id : null);
|
|
49
|
+
|
|
50
|
+
/** This socket's own configuration, written by us and read only by our server. */
|
|
51
|
+
export const TMUX_CONFIG = [
|
|
52
|
+
"# WorkTrust remote: the configuration of WorkTrust's own tmux socket (never your ~/.tmux.conf).",
|
|
53
|
+
"set -g remain-on-exit on",
|
|
54
|
+
"set -g history-limit 5000",
|
|
55
|
+
"set -g mouse off",
|
|
56
|
+
"set -g allow-rename off",
|
|
57
|
+
"set -g set-clipboard off",
|
|
58
|
+
"set -g status-left \"[WorkTrust remote] \"",
|
|
59
|
+
"",
|
|
60
|
+
].join("\n");
|
|
61
|
+
|
|
62
|
+
export function writeTmuxConfig(dir) {
|
|
63
|
+
if (!existsSync(dir)) mkdirSync(dir, { recursive: true, mode: 0o700 });
|
|
64
|
+
const file = join(dir, "tmux.conf");
|
|
65
|
+
writeFileSync(file, TMUX_CONFIG, { mode: 0o600 });
|
|
66
|
+
try { chmodSync(file, 0o600); } catch { /* Windows */ }
|
|
67
|
+
return file;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/** tmux's own command separator, escaped so the text stays one argument: `x;` becomes `x\;`, which tmux reads as `x;`. */
|
|
71
|
+
export const escapeSeparator = (arg) => (arg.endsWith(";") ? `${arg.slice(0, -1)}\\;` : arg);
|
|
72
|
+
// eslint-disable-next-line no-control-regex
|
|
73
|
+
const CONTROL = /[\u0000-\u0008\u000a-\u001f\u007f-\u009f]/;
|
|
74
|
+
/** Text a phone may have typed: printable, tabs allowed, no escape sequence, no newline, no Ctrl code. */
|
|
75
|
+
export const terminalTextOk = (text) => typeof text === "string" && text.length > 0 && text.length <= 65_536 && !CONTROL.test(text);
|
|
76
|
+
|
|
77
|
+
/** The tmux version from `tmux -V` ("tmux 3.6a"), or null; a build without a number ("master") is not trusted. */
|
|
78
|
+
export function tmuxVersion(out) {
|
|
79
|
+
const m = /^tmux (?:next-)?(\d+)\.(\d+)/.exec(String(out ?? "").trim());
|
|
80
|
+
return m ? [Number(m[1]), Number(m[2])] : null;
|
|
81
|
+
}
|
|
82
|
+
export const tmuxUsable = (v) => v !== null && (v[0] > MIN_TMUX[0] || (v[0] === MIN_TMUX[0] && v[1] >= MIN_TMUX[1]));
|
|
83
|
+
|
|
84
|
+
/** The screen as lines a sealed agent.screen carries: no escape sequence, no control code, each line cut, the newest kept. */
|
|
85
|
+
// eslint-disable-next-line no-control-regex
|
|
86
|
+
const ESCAPES = /\u001b\[[0-?]*[ -/]*[@-~]|\u001b\][^\u0007\u001b]*(?:\u0007|\u001b\\)|\u001b[@-Z\\-_]/g;
|
|
87
|
+
// eslint-disable-next-line no-control-regex
|
|
88
|
+
const RESIDUE = /[\u0000-\u0008\u000b-\u001f\u007f-\u009f]/g;
|
|
89
|
+
export function screenLines(text, want = MAX_SCREEN_LINES) {
|
|
90
|
+
const all = String(text ?? "").replace(ESCAPES, "").replace(RESIDUE, "").split("\n").map((l) => l.replace(/\s+$/, "").slice(0, MAX_LINE));
|
|
91
|
+
while (all.length > 0 && all.at(-1) === "") all.pop();
|
|
92
|
+
let lines = all.slice(-Math.min(Math.max(1, want), MAX_SCREEN_LINES));
|
|
93
|
+
let cut = lines.length < all.length;
|
|
94
|
+
let size = lines.reduce((n, l) => n + l.length, 0);
|
|
95
|
+
while (size > MAX_SCREEN_CHARS && lines.length > 0) { size -= lines[0].length; lines = lines.slice(1); cut = true; }
|
|
96
|
+
return { lines, cut };
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/** The one way this file runs tmux: execFile, no shell, a timeout, the result as an exit code and its output. */
|
|
100
|
+
export function runTmuxFile(file, args, { cwd, env, timeout = 5000 } = {}) {
|
|
101
|
+
return new Promise((resolve) => {
|
|
102
|
+
execFile(file, args, { cwd, env, timeout, maxBuffer: 4 * 1024 * 1024, windowsHide: true, encoding: "utf8" }, (error, stdout, stderr) =>
|
|
103
|
+
resolve({ code: error ? (typeof error.code === "number" ? error.code : 1) : 0, stdout: String(stdout ?? ""), stderr: String(stderr ?? "") }));
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const argOk = (a) => typeof a === "string" && a.length > 0 && !a.includes("\u0000") && !a.endsWith(";");
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* tmux on our socket. `run(file, args, opts)` is injectable so the tests drive a fake tmux and read every argv it was handed.
|
|
111
|
+
* `spawnControl` (spawn, injectable likewise) starts the control-mode client `control` uses.
|
|
112
|
+
* → { version, start, capture, sendText, sendKey, state, list, kill, control, attachArgs, socket, config }
|
|
113
|
+
*/
|
|
114
|
+
export function createTmux({ file, config, socket = SOCKET, env = process.env, run = runTmuxFile, spawnControl = spawn }) {
|
|
115
|
+
if (!SOCKET_NAME.test(socket)) throw new TypeError("not WorkTrust's tmux socket");
|
|
116
|
+
if (typeof file !== "string" || !isAbsolute(file)) throw new TypeError("tmux is named by its absolute path");
|
|
117
|
+
if (typeof config !== "string" || !isAbsolute(config)) throw new TypeError("our tmux config is named by its absolute path");
|
|
118
|
+
const clean = { ...env };
|
|
119
|
+
delete clean.TMUX; delete clean.TMUX_PANE; // never the server the person sits in
|
|
120
|
+
const base = ["-L", socket, "-f", config];
|
|
121
|
+
const call = (args, opts = {}) => run(file, [...base, ...args], { env: clean, ...opts });
|
|
122
|
+
const named = (name) => { if (typeof name !== "string" || !SESSION_NAME.test(name)) throw new TypeError("not a WorkTrust terminal session name"); return name; };
|
|
123
|
+
const pane = (name) => `=${named(name)}:`;
|
|
124
|
+
|
|
125
|
+
return {
|
|
126
|
+
socket, config,
|
|
127
|
+
async version() { const r = await run(file, ["-V"], { env: clean }); return r.code === 0 ? tmuxVersion(r.stdout) : null; },
|
|
128
|
+
/** The agent in a new detached session, in `cwd`, exec'd from `argv` (two or more, absolute program first). */
|
|
129
|
+
async start({ name, cwd, argv, ref = null, width = 200, height = 50 }) {
|
|
130
|
+
named(name);
|
|
131
|
+
if (typeof cwd !== "string" || !isAbsolute(cwd)) throw new TypeError("a terminal session starts in an absolute folder");
|
|
132
|
+
if (!Array.isArray(argv) || argv.length < 2 || !argv.every(argOk) || !isAbsolute(argv[0])) throw new TypeError("an agent's argv: two or more arguments, an absolute program first, none ending in ;");
|
|
133
|
+
if (ref !== null && !(typeof ref === "string" && REF.test(ref))) throw new TypeError("not an agent session ref");
|
|
134
|
+
const r = await call(["new-session", "-d", "-s", name, "-x", String(width), "-y", String(height), "--", ...argv], { cwd });
|
|
135
|
+
if (r.code !== 0) return false;
|
|
136
|
+
if (ref !== null) await call(["set-option", "-t", pane(name), "--", "@worktrust_ref", ref]);
|
|
137
|
+
return true;
|
|
138
|
+
},
|
|
139
|
+
/** The last `lines` of the pane, wrapped lines joined, as screenLines gives them; null when the session is gone. */
|
|
140
|
+
async capture(name, lines = 200) {
|
|
141
|
+
const want = Math.min(Math.max(1, Math.trunc(lines) || 1), MAX_SCREEN_LINES);
|
|
142
|
+
const r = await call(["capture-pane", "-p", "-J", "-t", pane(name), "-S", String(-want)]);
|
|
143
|
+
return r.code === 0 ? screenLines(r.stdout, want) : null;
|
|
144
|
+
},
|
|
145
|
+
/** Text, literally (`send-keys -l`): never read as key names, never ending a tmux command. */
|
|
146
|
+
async sendText(name, text) {
|
|
147
|
+
if (!terminalTextOk(text)) throw new TypeError("text with a control character is never typed into a terminal");
|
|
148
|
+
return (await call(["send-keys", "-t", pane(name), "-l", "--", escapeSeparator(text)])).code === 0;
|
|
149
|
+
},
|
|
150
|
+
/** One key from KEYS, by its name there (`enter`, `interrupt`); anything else is refused before tmux hears of it. */
|
|
151
|
+
async sendKey(name, key) {
|
|
152
|
+
if (!Object.hasOwn(KEYS, key)) throw new TypeError("not a key this computer presses");
|
|
153
|
+
return (await call(["send-keys", "-t", pane(name), KEYS[key]])).code === 0;
|
|
154
|
+
},
|
|
155
|
+
/**
|
|
156
|
+
* { exists, dead, status }: dead with its exit status once the agent ended (remain-on-exit keeps the pane to read it).
|
|
157
|
+
* display-message answers 0 with empty fields for a session that is gone (measured on 3.6a), so the name it printed
|
|
158
|
+
* must be the one asked for.
|
|
159
|
+
*/
|
|
160
|
+
async state(name) {
|
|
161
|
+
const r = await call(["display-message", "-p", "-t", pane(name), "#{session_name}|#{pane_dead}|#{pane_dead_status}"]);
|
|
162
|
+
const [seen, dead, status] = r.stdout.trim().split("|");
|
|
163
|
+
if (r.code !== 0 || seen !== name) return { exists: false, dead: true, status: null };
|
|
164
|
+
return { exists: true, dead: dead === "1", status: /^\d+$/.test(status ?? "") ? Number(status) : null };
|
|
165
|
+
},
|
|
166
|
+
/**
|
|
167
|
+
* Our sessions, each { name, session_id, ref, path, created_at, dead }; foreign names are skipped; no server is none.
|
|
168
|
+
* Fields are split on `|` with the folder LAST (tmux prints a tab as `_`; no name, id or number holds a `|`, a path may).
|
|
169
|
+
*/
|
|
170
|
+
async list() {
|
|
171
|
+
const r = await call(["list-sessions", "-F", "#{session_name}|#{@worktrust_ref}|#{session_created}|#{pane_dead}|#{session_path}"]);
|
|
172
|
+
if (r.code !== 0) return [];
|
|
173
|
+
return r.stdout.split("\n").filter(Boolean).map((line) => {
|
|
174
|
+
const [name, ref, created, dead, ...rest] = line.split("|");
|
|
175
|
+
const path = rest.join("|");
|
|
176
|
+
return { name, session_id: sessionIdOfName(name), ref: REF.test(ref ?? "") ? ref : null, path: path || null, created_at: /^\d+$/.test(created ?? "") ? Number(created) * 1000 : null, dead: dead === "1" };
|
|
177
|
+
}).filter((s) => s.session_id !== null);
|
|
178
|
+
},
|
|
179
|
+
async kill(name) { return (await call(["kill-session", "-t", `=${named(name)}`])).code === 0; },
|
|
180
|
+
/**
|
|
181
|
+
* WHEN the session changed, from tmux's control mode (`tmux -C attach-session -t =name`, measured on 3.6a: `%output`
|
|
182
|
+
* per write, `%exit` at the end, the window's size untouched). Only the line's first word is read: what the agent
|
|
183
|
+
* printed is dropped at once (the screen is still read with capture-pane). Nothing is ever written to the control
|
|
184
|
+
* client's input, so no tmux command can reach it that way; its end is reported once. → { alive(), close() } or null.
|
|
185
|
+
*/
|
|
186
|
+
control(name, onEvent) {
|
|
187
|
+
named(name);
|
|
188
|
+
let child = null, open = true, head = "", skipping = false;
|
|
189
|
+
const end = () => { if (open) { open = false; onEvent("exit"); } };
|
|
190
|
+
try { child = spawnControl(file, [...base, "-C", "attach-session", "-t", `=${name}`], { env: clean, stdio: ["pipe", "pipe", "ignore"], windowsHide: true }); } catch { return null; }
|
|
191
|
+
const word = (line) => {
|
|
192
|
+
if (/^%(output|extended-output|layout-change|window-pane-changed) /.test(line)) onEvent("output");
|
|
193
|
+
else if (/^%exit\b/.test(line)) end();
|
|
194
|
+
};
|
|
195
|
+
child.stdout?.setEncoding?.("utf8");
|
|
196
|
+
child.stdout?.on("data", (chunk) => {
|
|
197
|
+
for (const part of String(chunk).split(/(\n)/)) {
|
|
198
|
+
if (part === "\n") { if (!skipping) word(head); head = ""; skipping = false; continue; }
|
|
199
|
+
if (skipping) continue;
|
|
200
|
+
head += part;
|
|
201
|
+
if (head.length > 40) { word(head.slice(0, 40)); skipping = true; head = ""; } // the first word told, the rest dropped
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
child.on("exit", end);
|
|
205
|
+
child.on("error", end);
|
|
206
|
+
return { alive: () => open, close: () => { open = false; try { child.kill("SIGTERM"); } catch { /* gone */ } } };
|
|
207
|
+
},
|
|
208
|
+
/** The argv `worktrust remote attach` runs with the terminal's own stdio. */
|
|
209
|
+
attachArgs: (name) => [...base, "attach-session", "-t", `=${named(name)}`],
|
|
210
|
+
env: clean,
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/** No tmux on this computer: every call answers "nothing there", so a session it knew is closed, never run another way. */
|
|
215
|
+
export const NO_TMUX = Object.freeze({ socket: SOCKET, config: null, env: {}, version: async () => null, start: async () => false, capture: async () => null, sendText: async () => false, control: () => null,
|
|
216
|
+
sendKey: async () => false, state: async () => ({ exists: false, dead: true, status: null }), list: async () => [], kill: async () => false, attachArgs: () => { throw new Error("tmux is not installed"); } });
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Claude Code, interactive, as a terminal session runs it: the same deny rules and setting sources as the structured
|
|
220
|
+
* adapter (a phone may steer this session), the session id chosen here so the steered ledger names it before it starts.
|
|
221
|
+
* No text from the phone is an argument: a model the computer listed, a mode from the closed set, a uuid.
|
|
222
|
+
*/
|
|
223
|
+
const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
|
|
224
|
+
export function terminalClaudeArgs({ features, mode, model, resume, sessionRef }) {
|
|
225
|
+
if (mode !== "ask" && mode !== "plan") throw new Error("the protocol offers the ask and plan modes only");
|
|
226
|
+
const permission = mode === "plan" ? features?.planMode : features?.askMode;
|
|
227
|
+
if (!permission) throw new Error("this Claude Code offers no such permission mode");
|
|
228
|
+
if (!features.disallowed || !features.settingSources || !features.sessionId) throw new Error("this Claude Code cannot take deny rules, limit its setting sources or take a session id");
|
|
229
|
+
if (resume !== null && !UUID.test(resume ?? "")) throw new Error("a resume id is Claude Code's own session uuid");
|
|
230
|
+
if (resume === null && !UUID.test(sessionRef ?? "")) throw new Error("a new session needs its uuid");
|
|
231
|
+
if (model !== null && (typeof model !== "string" || model.startsWith("-") || !/^[A-Za-z0-9._:@[\]-]{1,128}$/.test(model))) throw new Error("not a model name");
|
|
232
|
+
return ["--permission-mode", permission, "--setting-sources", "user", "--disallowedTools", ...REMOTE_DENY, ...(model ? ["--model", model] : []), ...(resume ? ["--resume", resume] : ["--session-id", sessionRef])];
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* The terminal report for Claude Code. Honest about this slice: it starts, shows its screen, stops, and is attached at the
|
|
237
|
+
* desk; it takes NO prompt from a phone yet (`prompt: false`) because its state (working, a dialog) is not read from the
|
|
238
|
+
* screen yet, and the protocol types nothing while a dialog may be on screen (attention.ts, promptAllowed).
|
|
239
|
+
*/
|
|
240
|
+
export function terminalReport({ claude, tmux }) {
|
|
241
|
+
const f = claude?.features ?? {};
|
|
242
|
+
const usable = Boolean(claude?.installed && tmuxUsable(tmux) && f.askMode && f.sessionId && f.disallowed && f.settingSources);
|
|
243
|
+
const capabilities = { start: usable, attach: usable, prompt: false, steer: false, pause: false, resume: false, stop: usable, structured_events: false, screen: usable, focus: false,
|
|
244
|
+
resume_by_id: usable && Boolean(f.resume), permission_modes: f.planMode && usable ? ["ask", "plan"] : ["ask"], approvals: "none", acceptance: "state_change", steer_mode: "none", interrupt: false };
|
|
245
|
+
const installed = Boolean(claude?.installed);
|
|
246
|
+
return { adapter: "claude-code", mode: "terminal", installed, version: installed ? claude.version ?? null : null, signed_in: null, capabilities,
|
|
247
|
+
models: installed ? claude.models : null, models_status: installed ? claude.models_status : "not_listed", models_at: installed ? claude.models_at : null, default_model: null };
|
|
248
|
+
}
|
|
@@ -12,13 +12,30 @@
|
|
|
12
12
|
* Fail closed: no daemon, a lost socket, a malformed answer or six minutes without one is a denial. This is not the
|
|
13
13
|
* WorkTrust MCP door and opens no network connection. It also carries the agent's PLANNING tools (plan_release,
|
|
14
14
|
* plan_task, plan_list; 2026-11-08), answered by the daemon's release queue for the session's own project.
|
|
15
|
+
*
|
|
16
|
+
* CODEX STARTS IT TOO (2026-11-09), for the planning tools only: `--plans-only` (no `approve`: Codex asks through its
|
|
17
|
+
* app-server, never here) and `--session <file>`, the session's socket and token in a file of this user's only (0600, in
|
|
18
|
+
* ~/.worktrust/remote/run/, removed with the session), because Codex takes the server from a `--config` on its own
|
|
19
|
+
* command line and a token there would be readable in any process list. Claude Code hands the same two in the env of
|
|
20
|
+
* the MCP config the daemon wrote. Either way, one session's token, registered by the daemon for that session alone.
|
|
15
21
|
*/
|
|
22
|
+
import { readFileSync } from "node:fs";
|
|
16
23
|
import { createConnection } from "node:net";
|
|
17
24
|
import { createInterface } from "node:readline";
|
|
18
25
|
|
|
19
26
|
export const TOOL = "approve";
|
|
20
|
-
const
|
|
21
|
-
|
|
27
|
+
const ARGV = process.argv.slice(2);
|
|
28
|
+
/** The session's channel: `--session <file>` (Codex) or the MCP config's env (Claude Code); "" on anything unreadable. */
|
|
29
|
+
export function channelOf(argv = ARGV, env = process.env) {
|
|
30
|
+
const at = argv.indexOf("--session");
|
|
31
|
+
if (at < 0) return { socket: env.WORKTRUST_REMOTE_APPROVAL_SOCKET ?? "", token: env.WORKTRUST_REMOTE_APPROVAL_TOKEN ?? "" };
|
|
32
|
+
try {
|
|
33
|
+
const c = JSON.parse(readFileSync(argv[at + 1], "utf8"));
|
|
34
|
+
return { socket: typeof c?.socket === "string" ? c.socket : "", token: typeof c?.token === "string" ? c.token : "" };
|
|
35
|
+
} catch { return { socket: "", token: "" }; }
|
|
36
|
+
}
|
|
37
|
+
const { socket: SOCKET, token: TOKEN } = channelOf();
|
|
38
|
+
export const PLANS_ONLY = ARGV.includes("--plans-only");
|
|
22
39
|
const WAIT_MS = 6 * 60_000;
|
|
23
40
|
const deny = (message) => ({ behavior: "deny", message });
|
|
24
41
|
|
|
@@ -74,6 +91,8 @@ export function askPlan(op, args, socket = SOCKET, token = TOKEN, waitMs = 30_00
|
|
|
74
91
|
* THE PLANNING TOOLS (owner, 2026-11-08: the agent arranges its own work, the phone shows it on Status). Short on
|
|
75
92
|
* purpose: their descriptions travel with every turn. The project is the session's own; nothing here runs anything.
|
|
76
93
|
*/
|
|
94
|
+
/** The one line that asks the agent to plan with them: Claude Code's --append-system-prompt, Codex's server instructions. */
|
|
95
|
+
export const PLAN_HINT = "WorkTrust remote: plan multi-step work with plan_release and report each task with plan_task; the person follows it on their phone.";
|
|
77
96
|
const n = (description) => ({ type: "integer", description });
|
|
78
97
|
const PLAN_TOOLS = [
|
|
79
98
|
{ name: "plan_release", op: "release", description: "Plan multi-step work as a release on the phone's Status: tasks you then do yourself. Check plan_list first.",
|
|
@@ -83,23 +102,27 @@ const PLAN_TOOLS = [
|
|
|
83
102
|
inputSchema: { type: "object", properties: { release: n("release number, to add"), title: { type: "string" }, estimate_min: n("minutes"), task_id: { type: "string" }, state: { type: "string", enum: ["running", "done", "failed"] }, note: { type: "string" } } } },
|
|
84
103
|
{ name: "plan_list", op: "list", description: "This project's open releases and tasks.", inputSchema: { type: "object", properties: {} } },
|
|
85
104
|
];
|
|
105
|
+
export const PLAN_TOOL_NAMES = Object.freeze(PLAN_TOOLS.map((t) => t.name));
|
|
86
106
|
|
|
87
107
|
const reply = (id, result) => process.stdout.write(`${JSON.stringify({ jsonrpc: "2.0", id, result })}\n`);
|
|
88
108
|
const error = (id, code, message) => process.stdout.write(`${JSON.stringify({ jsonrpc: "2.0", id, error: { code, message } })}\n`);
|
|
89
109
|
|
|
90
|
-
export async function handle(message, ask = askDaemon, plan = askPlan) {
|
|
110
|
+
export async function handle(message, ask = askDaemon, plan = askPlan, plansOnly = PLANS_ONLY) {
|
|
91
111
|
const { id, method, params } = message ?? {};
|
|
92
|
-
if (method === "initialize") return { id, result: { protocolVersion: typeof params?.protocolVersion === "string" ? params.protocolVersion : "2025-06-18", capabilities: { tools: {} }, serverInfo: { name: "worktrust-remote", version: "1" }
|
|
112
|
+
if (method === "initialize") return { id, result: { protocolVersion: typeof params?.protocolVersion === "string" ? params.protocolVersion : "2025-06-18", capabilities: { tools: {} }, serverInfo: { name: "worktrust-remote", version: "1" },
|
|
113
|
+
// Codex puts a server's instructions beside its tools (measured on 0.154.0: in tool_search, "worktrust_remote: <line>"),
|
|
114
|
+
// so they reach the agent without replacing the person's own developer instructions. Claude Code has its line already.
|
|
115
|
+
...(plansOnly ? { instructions: PLAN_HINT } : {}) } };
|
|
93
116
|
if (method === "ping") return { id, result: {} };
|
|
94
|
-
|
|
95
|
-
|
|
117
|
+
const approveTool = plansOnly ? [] : [{ name: TOOL, description: "WorkTrust remote: asks the person's confirmed phone to approve one permission request, or denies it.", inputSchema: { type: "object", properties: { tool_name: { type: "string" }, input: { type: "object" }, tool_use_id: { type: "string" } }, required: ["tool_name", "input"] } }];
|
|
118
|
+
if (method === "tools/list") return { id, result: { tools: [...approveTool, ...PLAN_TOOLS.map(({ name, description, inputSchema }) => ({ name, description, inputSchema }))] } };
|
|
96
119
|
if (method === "tools/call") {
|
|
97
120
|
const planTool = PLAN_TOOLS.find((t) => t.name === params?.name);
|
|
98
121
|
if (planTool) {
|
|
99
122
|
const answer = await plan(planTool.op, params.arguments && typeof params.arguments === "object" ? params.arguments : {});
|
|
100
123
|
return { id, result: { content: [{ type: "text", text: JSON.stringify(answer) }], ...(answer?.ok ? {} : { isError: true }) } };
|
|
101
124
|
}
|
|
102
|
-
if (params?.name !== TOOL) return { id, error: { code: -32602, message: "unknown tool" } };
|
|
125
|
+
if (params?.name !== TOOL || plansOnly) return { id, error: { code: -32602, message: "unknown tool" } };
|
|
103
126
|
const a = params.arguments ?? {};
|
|
104
127
|
const answer = typeof a.tool_name === "string" && a.input && typeof a.input === "object"
|
|
105
128
|
? await ask({ tool_name: a.tool_name, input: a.input, tool_use_id: typeof a.tool_use_id === "string" ? a.tool_use_id : null })
|
package/remote-approvals.mjs
CHANGED
|
@@ -11,6 +11,10 @@
|
|
|
11
11
|
* This file is the only place that may send agent.approval_required (scripts/check-remote-cli.mjs holds it). The same
|
|
12
12
|
* socket takes the session's planning calls (`{ token, plan: { op, args } }`, 2026-11-08) and hands them to ctx.plan,
|
|
13
13
|
* the release queue's: they never reach the approval path and never run anything.
|
|
14
|
+
*
|
|
15
|
+
* A terminal session's dialog (release 19, remote-screen-approvals.mjs) comes in with its action already classified by the
|
|
16
|
+
* same policy (`preset`); the same gate decides it, and `onPhone` hears only a decision a phone signed (a timeout, a lost
|
|
17
|
+
* phone or the computer's own refusal answers nothing on the screen).
|
|
14
18
|
*/
|
|
15
19
|
import { createServer } from "node:net";
|
|
16
20
|
import { chmodSync, existsSync, mkdirSync, rmSync } from "node:fs";
|
|
@@ -36,9 +40,9 @@ export function createApprovals(ctx) {
|
|
|
36
40
|
};
|
|
37
41
|
|
|
38
42
|
/** One permission request from the bridge → the answer the bridge gives Claude Code. */
|
|
39
|
-
async function request(session, toolName, input) {
|
|
43
|
+
async function request(session, toolName, input, preset = null) {
|
|
40
44
|
if (ctx.paused()) return deny("WorkTrust remote is paused on this computer; denied");
|
|
41
|
-
const { action, reason } = classifyAction(session.adapter, toolName, input, session.projectPath);
|
|
45
|
+
const { action, reason } = preset ?? classifyAction(session.adapter, toolName, input, session.projectPath);
|
|
42
46
|
if (!phoneMayDecide(action)) {
|
|
43
47
|
ctx.emit(session.session_id, "agent.output_delta", { stream: "tool", offset: 0, text: `Denied on the computer (${action.tool}): ${reason}` }, session.command_id);
|
|
44
48
|
return deny(`WorkTrust remote: ${reason}`);
|
|
@@ -49,7 +53,7 @@ export function createApprovals(ctx) {
|
|
|
49
53
|
const record = { approval_id, session_id: session.session_id, computer_device_id: ctx.deviceId, action_hash, class: action.class, expires_at };
|
|
50
54
|
const answer = new Promise((resolve) => {
|
|
51
55
|
const timer = setTimeout(() => finish(approval_id, deny("WorkTrust remote: no decision in time; denied")), Math.max(0, expires_at - ctx.now()));
|
|
52
|
-
pending.set(approval_id, { record, resolve, timer, session_id: session.session_id, input });
|
|
56
|
+
pending.set(approval_id, { record, resolve, timer, session_id: session.session_id, input, onPhone: preset?.onPhone ?? null });
|
|
53
57
|
});
|
|
54
58
|
ctx.onApprovalOpened?.(session.session_id, approval_id);
|
|
55
59
|
ctx.emit(session.session_id, "agent.approval_required", { approval_id, action, action_hash, expires_at }, session.command_id, "needs_you");
|
|
@@ -75,9 +79,12 @@ export function createApprovals(ctx) {
|
|
|
75
79
|
if (!checked.ok) return checked;
|
|
76
80
|
const open = pending.get(checked.value.approval_id);
|
|
77
81
|
ctx.journal.spend(checked.value.approval_id, ctx.now());
|
|
82
|
+
open.onPhone?.(checked.value.decision);
|
|
78
83
|
finish(checked.value.approval_id, checked.value.decision === "approve" ? { behavior: "allow", updatedInput: open.input } : deny("WorkTrust remote: denied on your phone"));
|
|
79
84
|
return checked;
|
|
80
85
|
},
|
|
86
|
+
/** A session's open approvals answered "no" without any phone (a terminal dialog the person answered at the desk). */
|
|
87
|
+
withdraw(sessionId, message) { for (const [id, p] of pending) if (p.session_id === sessionId) finish(id, deny(`WorkTrust remote: ${message}`)); },
|
|
81
88
|
denyAll() { for (const id of [...pending.keys()]) finish(id, deny("WorkTrust remote: the daemon stopped; denied")); },
|
|
82
89
|
async listen(dir) {
|
|
83
90
|
let path;
|
|
@@ -107,8 +114,11 @@ export function createApprovals(ctx) {
|
|
|
107
114
|
conn.end(`${JSON.stringify(planned)}\n`);
|
|
108
115
|
return;
|
|
109
116
|
}
|
|
117
|
+
// Codex asks through its app-server (remote-adapter-codex.mjs); its bridge carries the planning tools only, so an
|
|
118
|
+
// approval over the socket with a Codex session's token is no request of Codex's (2026-11-09).
|
|
110
119
|
const answer = !session || typeof msg.tool_name !== "string" || !msg.input || typeof msg.input !== "object"
|
|
111
120
|
? deny("WorkTrust remote: unknown session; denied")
|
|
121
|
+
: session.adapter === "codex" ? deny("WorkTrust remote: Codex asks through its app-server; denied")
|
|
112
122
|
: await request(session, msg.tool_name, msg.input);
|
|
113
123
|
conn.end(`${JSON.stringify(answer)}\n`);
|
|
114
124
|
});
|