portacode 2.2.28.dev3__py3-none-any.whl → 2.2.29.dev0__py3-none-any.whl
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.
- portacode/_version.py +2 -2
- portacode/cli.py +2 -0
- portacode/connection/handlers/__init__.py +2 -0
- portacode/connection/handlers/codex_handlers.py +20 -11
- portacode/connection/handlers/domain_dns.py +16 -0
- portacode/connection/handlers/test_domain_dns.py +134 -0
- portacode/connection/terminal.py +2 -0
- portacode/dns_cli.py +27 -0
- portacode/tests/test_codex_handlers.py +81 -0
- portacode/tunneling/dns.py +177 -0
- {portacode-2.2.28.dev3.dist-info → portacode-2.2.29.dev0.dist-info}/METADATA +1 -1
- {portacode-2.2.28.dev3.dist-info → portacode-2.2.29.dev0.dist-info}/RECORD +16 -12
- {portacode-2.2.28.dev3.dist-info → portacode-2.2.29.dev0.dist-info}/WHEEL +0 -0
- {portacode-2.2.28.dev3.dist-info → portacode-2.2.29.dev0.dist-info}/entry_points.txt +0 -0
- {portacode-2.2.28.dev3.dist-info → portacode-2.2.29.dev0.dist-info}/licenses/LICENSE +0 -0
- {portacode-2.2.28.dev3.dist-info → portacode-2.2.29.dev0.dist-info}/top_level.txt +0 -0
portacode/_version.py
CHANGED
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '2.2.
|
|
22
|
-
__version_tuple__ = version_tuple = (2, 2,
|
|
21
|
+
__version__ = version = '2.2.29.dev0'
|
|
22
|
+
__version_tuple__ = version_tuple = (2, 2, 29, 'dev0')
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
portacode/cli.py
CHANGED
|
@@ -70,6 +70,7 @@ from .proxmox_infra import (
|
|
|
70
70
|
RollbackProxmoxContainerSnapshotHandler,
|
|
71
71
|
)
|
|
72
72
|
from .cloudflare_tunnel import CloudflareTunnelSetupHandler
|
|
73
|
+
from .domain_dns import DomainDnsHandler
|
|
73
74
|
from .cloudflare_forwarding import (
|
|
74
75
|
CloudflareAccessHandler,
|
|
75
76
|
CloudflareForwardingHandler,
|
|
@@ -155,6 +156,7 @@ __all__ = [
|
|
|
155
156
|
"CloudflareTunnelSetupHandler",
|
|
156
157
|
"CloudflareForwardingHandler",
|
|
157
158
|
"CloudflareAccessHandler",
|
|
159
|
+
"DomainDnsHandler",
|
|
158
160
|
"ConfigureProxmoxContainerExposePortsHandler",
|
|
159
161
|
"AutomationV2StartHandler",
|
|
160
162
|
"AutomationV2StateHandler",
|
|
@@ -21,6 +21,7 @@ MAX_LIVE_TEXT_BYTES = 512 * 1024
|
|
|
21
21
|
MAX_LIVE_ITEMS_PER_THREAD = 64
|
|
22
22
|
MAX_LIVE_SNAPSHOT_BYTES = 4 * 1024 * 1024
|
|
23
23
|
MAX_TRACKED_LIVE_THREADS = 64
|
|
24
|
+
MAX_HISTORY_TURNS = 80
|
|
24
25
|
MAX_DELEGATED_RESULT_BYTES = 16 * 1024
|
|
25
26
|
MAX_DELEGATED_DIAGNOSTIC_BYTES = 8 * 1024
|
|
26
27
|
|
|
@@ -579,23 +580,18 @@ async def _resume_thread_history(
|
|
|
579
580
|
thread = _thread_from_result(resume_result)
|
|
580
581
|
turns = thread.get("turns") if isinstance(thread.get("turns"), list) else []
|
|
581
582
|
if turns:
|
|
583
|
+
turns = turns[-MAX_HISTORY_TURNS:]
|
|
582
584
|
return resume_result, _items_from_turns(turns), _active_turn_from_turns(turns)
|
|
583
585
|
else:
|
|
584
586
|
raise
|
|
585
587
|
|
|
586
|
-
# Newer servers may embed a first page on resume.
|
|
587
|
-
page = resume_result.get("initialTurnsPage") if isinstance(resume_result, dict) else None
|
|
588
|
-
turns = _turns_from_page(page)
|
|
589
|
-
if turns:
|
|
590
|
-
return resume_result, _items_from_turns(turns), _active_turn_from_turns(turns)
|
|
591
|
-
|
|
592
588
|
try:
|
|
593
589
|
turns_page = await manager.bridge.call(
|
|
594
590
|
"thread/turns/list",
|
|
595
591
|
{
|
|
596
592
|
"threadId": thread_id,
|
|
597
|
-
"limit":
|
|
598
|
-
"sortDirection": "
|
|
593
|
+
"limit": MAX_HISTORY_TURNS,
|
|
594
|
+
"sortDirection": "desc",
|
|
599
595
|
# Summary view can intentionally omit user content, producing
|
|
600
596
|
# empty bubbles after a browser reload. Attachments are stored
|
|
601
597
|
# as lightweight path items, so full view does not embed the
|
|
@@ -604,11 +600,20 @@ async def _resume_thread_history(
|
|
|
604
600
|
},
|
|
605
601
|
timeout=120.0,
|
|
606
602
|
)
|
|
607
|
-
|
|
603
|
+
# Fetch just the newest page; restore chronology locally, without
|
|
604
|
+
# walking cursors or sending the omitted history through the broker.
|
|
605
|
+
turns = list(reversed(_turns_from_page(turns_page)[:MAX_HISTORY_TURNS]))
|
|
608
606
|
return resume_result, _items_from_turns(turns), _active_turn_from_turns(turns)
|
|
609
607
|
except (CodexAppServerError, asyncio.TimeoutError):
|
|
610
608
|
LOGGER.debug("thread/turns/list unavailable; trying lightweight thread/read", exc_info=True)
|
|
611
609
|
|
|
610
|
+
# Embedded pages have no guaranteed newest-first selection. Use them only
|
|
611
|
+
# for compatibility when the explicit newest-page API is unavailable.
|
|
612
|
+
page = resume_result.get("initialTurnsPage") if isinstance(resume_result, dict) else None
|
|
613
|
+
turns = _turns_from_page(page)[-MAX_HISTORY_TURNS:]
|
|
614
|
+
if turns:
|
|
615
|
+
return resume_result, _items_from_turns(turns), _active_turn_from_turns(turns)
|
|
616
|
+
|
|
612
617
|
# Avoid includeTurns:true — attachment-heavy rollouts hang Codex app-server.
|
|
613
618
|
try:
|
|
614
619
|
read_result = await manager.bridge.call(
|
|
@@ -617,12 +622,13 @@ async def _resume_thread_history(
|
|
|
617
622
|
timeout=30.0,
|
|
618
623
|
)
|
|
619
624
|
page = read_result.get("initialTurnsPage") if isinstance(read_result, dict) else None
|
|
620
|
-
turns = _turns_from_page(page)
|
|
625
|
+
turns = _turns_from_page(page)[-MAX_HISTORY_TURNS:]
|
|
621
626
|
if turns:
|
|
622
627
|
return resume_result, _items_from_turns(turns), _active_turn_from_turns(turns)
|
|
623
628
|
thread = _thread_from_result(read_result)
|
|
624
629
|
inline = thread.get("turns") if isinstance(thread.get("turns"), list) else []
|
|
625
630
|
if inline:
|
|
631
|
+
inline = inline[-MAX_HISTORY_TURNS:]
|
|
626
632
|
return resume_result, _items_from_turns(inline), _active_turn_from_turns(inline)
|
|
627
633
|
except (CodexAppServerError, asyncio.TimeoutError):
|
|
628
634
|
LOGGER.warning(
|
|
@@ -872,7 +878,10 @@ class CodexThreadResumeHandler(CodexAsyncHandler):
|
|
|
872
878
|
cwd=cwd,
|
|
873
879
|
already_active=str(thread_id) in manager._thread_active_turn,
|
|
874
880
|
)
|
|
875
|
-
|
|
881
|
+
# History travels once, in `items`. Legacy resume responses may embed
|
|
882
|
+
# the complete rollout in thread.turns; do not forward that duplicate.
|
|
883
|
+
thread = {key: value for key, value in _thread_from_result(resume_result).items()
|
|
884
|
+
if key not in {"turns", "initialTurnsPage"}}
|
|
876
885
|
if not active_turn:
|
|
877
886
|
known_turn_id = manager._thread_active_turn.get(str(thread_id))
|
|
878
887
|
if known_turn_id:
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"""Connected-domain DNS CRUD over the authenticated control channel."""
|
|
2
|
+
from .base import SyncHandler
|
|
3
|
+
from portacode.tunneling.dns import manage_dns
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class DomainDnsHandler(SyncHandler):
|
|
7
|
+
@property
|
|
8
|
+
def command_name(self):
|
|
9
|
+
return 'domain_dns'
|
|
10
|
+
|
|
11
|
+
def execute(self, message):
|
|
12
|
+
allowed = {'action', 'domain', 'record', 'record_id', 'name', 'record_type',
|
|
13
|
+
'page', 'per_page', 'if_match', 'confirm_delete'}
|
|
14
|
+
result = manage_dns(**{key: value for key, value in message.items() if key in allowed})
|
|
15
|
+
return {'event': 'domain_dns_result', 'success': True,
|
|
16
|
+
'device_id': str(message.get('device_id') or ''), **result}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import io
|
|
2
|
+
import json
|
|
3
|
+
import unittest
|
|
4
|
+
import urllib.error
|
|
5
|
+
from unittest.mock import MagicMock, patch
|
|
6
|
+
from unittest.mock import AsyncMock
|
|
7
|
+
|
|
8
|
+
from portacode.tunneling import dns
|
|
9
|
+
from portacode.connection.handlers.domain_dns import DomainDnsHandler
|
|
10
|
+
|
|
11
|
+
RID = 'a' * 32
|
|
12
|
+
ZONE = 'b' * 32
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class DomainDnsTests(unittest.TestCase):
|
|
16
|
+
def record(self, **values):
|
|
17
|
+
return {'type': 'TXT', 'name': '_proof.example.com', 'content': 'proof', **values}
|
|
18
|
+
|
|
19
|
+
def test_names_and_payload_are_confined_to_domain(self):
|
|
20
|
+
for value in ['other.com', 'evilexample.com', 'example.com.evil.test', '../../zones/other', '*.*.example.com']:
|
|
21
|
+
with self.subTest(value=value), self.assertRaises(ValueError):
|
|
22
|
+
dns.normalize_record(self.record(name=value), 'example.com')
|
|
23
|
+
for extra in [{'zone_id': ZONE}, {'proxied': True}, {'ttl': True}, {'ttl': 2}, {'data': {'name': 'evil.com'}}]:
|
|
24
|
+
with self.subTest(extra=extra), self.assertRaises(ValueError):
|
|
25
|
+
dns.normalize_record(self.record(**extra), 'example.com')
|
|
26
|
+
self.assertEqual(dns.normalize_record(self.record(name='@'), 'example.com')['name'], 'example.com')
|
|
27
|
+
self.assertEqual(dns.normalize_record(self.record(name='*.example.com'), 'example.com')['name'], '*.example.com')
|
|
28
|
+
|
|
29
|
+
def test_mx_and_structured_records(self):
|
|
30
|
+
self.assertEqual(dns.normalize_record(self.record(type='MX', content='MAIL.EXAMPLE.NET.', priority=10), 'example.com')['content'], 'mail.example.net')
|
|
31
|
+
with self.assertRaises(ValueError):
|
|
32
|
+
dns.normalize_record(self.record(type='MX', content='mail.example.net'), 'example.com')
|
|
33
|
+
with self.assertRaises(ValueError):
|
|
34
|
+
dns.normalize_record({'type':'SRV','name':'_sip._tcp.example.com','data':{'name':'evil.com'}}, 'example.com')
|
|
35
|
+
|
|
36
|
+
@patch.object(dns, 'DnsClient')
|
|
37
|
+
def test_list_pagination_and_safe_result(self, factory):
|
|
38
|
+
factory.return_value.request.return_value = {'result': [self.record(id=RID, secret='never')], 'result_info': {'page': 2}}
|
|
39
|
+
result = dns.manage_dns(action='list', domain='example.com', page=2, name='_proof.example.com')
|
|
40
|
+
self.assertNotIn('secret', result['records'][0])
|
|
41
|
+
self.assertEqual(result['pagination']['page'], 2)
|
|
42
|
+
self.assertIn('page=2', factory.return_value.request.call_args.args[1])
|
|
43
|
+
|
|
44
|
+
@patch.object(dns, 'DnsClient')
|
|
45
|
+
def test_crud_and_stale_update_guard(self, factory):
|
|
46
|
+
client = factory.return_value
|
|
47
|
+
client.request.return_value = {'result': self.record(id=RID)}
|
|
48
|
+
client.record.return_value = self.record(id=RID, modified_on='revision-1')
|
|
49
|
+
dns.manage_dns(action='create', domain='example.com', record=self.record())
|
|
50
|
+
self.assertEqual(client.request.call_args.args[0], 'POST')
|
|
51
|
+
dns.manage_dns(action='get', domain='example.com', record_id=RID)
|
|
52
|
+
dns.manage_dns(action='update', domain='example.com', record_id=RID, record=self.record(content='new'), if_match='revision-1')
|
|
53
|
+
self.assertEqual(client.request.call_args.args[0], 'PATCH')
|
|
54
|
+
for action in ['update', 'delete']:
|
|
55
|
+
client.request.reset_mock()
|
|
56
|
+
with self.assertRaisesRegex(ValueError, 'changed'):
|
|
57
|
+
dns.manage_dns(action=action, domain='example.com', record_id=RID, record=self.record(), if_match='old', confirm_delete=True)
|
|
58
|
+
client.request.assert_not_called()
|
|
59
|
+
result = dns.manage_dns(action='delete', domain='example.com', record_id=RID, if_match='revision-1', confirm_delete=True)
|
|
60
|
+
self.assertTrue(result['deleted'])
|
|
61
|
+
self.assertEqual(client.request.call_args.args[0], 'DELETE')
|
|
62
|
+
|
|
63
|
+
@patch.object(dns, 'DnsClient')
|
|
64
|
+
def test_delete_confirmation_and_snapshot_required(self, factory):
|
|
65
|
+
for kw in [{}, {'if_match':'now'}, {'if_match':'now', 'confirm_delete':'true'}]:
|
|
66
|
+
with self.assertRaises(ValueError):
|
|
67
|
+
dns.manage_dns(action='delete', domain='example.com', record_id=RID, **kw)
|
|
68
|
+
factory.assert_not_called()
|
|
69
|
+
|
|
70
|
+
@patch.object(dns, 'load_state', return_value={'domain':'example.com','tunnel_id':'tunnel'})
|
|
71
|
+
@patch.object(dns, 'extract_token_json', return_value={'zoneID':ZONE,'apiToken':'private-token'})
|
|
72
|
+
@patch.object(dns.DnsClient, 'request', return_value={'result': {'name':'other.com'}})
|
|
73
|
+
def test_actual_zone_must_match_local_domain(self, request, token, state):
|
|
74
|
+
with self.assertRaisesRegex(ValueError, 'different domain'):
|
|
75
|
+
dns.DnsClient('example.com')
|
|
76
|
+
with self.assertRaisesRegex(ValueError, 'requested domain'):
|
|
77
|
+
dns.DnsClient('other.com')
|
|
78
|
+
self.assertEqual(request.call_count, 1)
|
|
79
|
+
|
|
80
|
+
def test_invalid_ids_and_remote_record_names(self):
|
|
81
|
+
client = object.__new__(dns.DnsClient)
|
|
82
|
+
client.domain = 'example.com'
|
|
83
|
+
client.request = MagicMock(return_value={'result': self.record(name='other.com')})
|
|
84
|
+
for rid in ['../other', '', RID]:
|
|
85
|
+
with self.assertRaises(ValueError): client.record(rid)
|
|
86
|
+
self.assertEqual(client.request.call_count, 1)
|
|
87
|
+
|
|
88
|
+
@patch.object(dns.urllib.request, 'urlopen')
|
|
89
|
+
def test_provider_errors_do_not_expose_secrets(self, urlopen):
|
|
90
|
+
client = object.__new__(dns.DnsClient)
|
|
91
|
+
client.base = '/zones/' + ZONE
|
|
92
|
+
client._token = 'private-token'
|
|
93
|
+
urlopen.side_effect = urllib.error.HTTPError('url', 403, 'private-token', {}, io.BytesIO(b'private-token'))
|
|
94
|
+
with self.assertRaises(RuntimeError) as caught:
|
|
95
|
+
client.request('POST', '/dns_records', self.record())
|
|
96
|
+
self.assertNotIn('private-token', str(caught.exception))
|
|
97
|
+
self.assertIn('403', str(caught.exception))
|
|
98
|
+
|
|
99
|
+
@patch('portacode.connection.handlers.domain_dns.manage_dns', return_value={'records': []})
|
|
100
|
+
def test_handler_accepts_structured_parameters_only(self, manage):
|
|
101
|
+
handler = DomainDnsHandler(None, {})
|
|
102
|
+
self.assertEqual(handler.command_name, 'domain_dns')
|
|
103
|
+
result = handler.execute({'action':'list','domain':'example.com','device_id':42,'url':'evil','token':'secret'})
|
|
104
|
+
manage.assert_called_once_with(action='list', domain='example.com')
|
|
105
|
+
self.assertEqual(result['event'], 'domain_dns_result')
|
|
106
|
+
self.assertNotIn('secret', json.dumps(result))
|
|
107
|
+
|
|
108
|
+
@patch('portacode.dns_cli.manage_dns', return_value={'records': []})
|
|
109
|
+
def test_local_cli_and_invalid_json(self, manage):
|
|
110
|
+
from click.testing import CliRunner
|
|
111
|
+
from portacode.dns_cli import domain_dns
|
|
112
|
+
result = CliRunner().invoke(domain_dns, ['list', '--domain', 'example.com'])
|
|
113
|
+
self.assertEqual(result.exit_code, 0, result.output)
|
|
114
|
+
self.assertEqual(json.loads(result.output), {'records': []})
|
|
115
|
+
result = CliRunner().invoke(domain_dns, ['create', '--domain', 'example.com', '--record-json', '{'])
|
|
116
|
+
self.assertNotEqual(result.exit_code, 0)
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
class DnsProtocolTests(unittest.IsolatedAsyncioTestCase):
|
|
120
|
+
@patch('portacode.connection.handlers.domain_dns.manage_dns', return_value={'records': []})
|
|
121
|
+
async def test_response_and_error_keep_request_correlation(self, manage):
|
|
122
|
+
channel = MagicMock()
|
|
123
|
+
channel.send = AsyncMock()
|
|
124
|
+
handler = DomainDnsHandler(channel, {})
|
|
125
|
+
await handler.handle({'action':'list', 'domain':'example.com', 'request_id':'unique-request'})
|
|
126
|
+
self.assertEqual(channel.send.call_args.args[0]['request_id'], 'unique-request')
|
|
127
|
+
manage.side_effect = ValueError('Domain mismatch')
|
|
128
|
+
await handler.handle({'action':'list', 'domain':'example.com', 'request_id':'failed-request'})
|
|
129
|
+
self.assertEqual(channel.send.call_args.args[0]['request_id'], 'failed-request')
|
|
130
|
+
self.assertEqual(channel.send.call_args.args[0]['event'], 'error')
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
if __name__ == '__main__':
|
|
134
|
+
unittest.main()
|
portacode/connection/terminal.py
CHANGED
|
@@ -86,6 +86,7 @@ from .handlers import (
|
|
|
86
86
|
CloudflareTunnelSetupHandler,
|
|
87
87
|
CloudflareForwardingHandler,
|
|
88
88
|
CloudflareAccessHandler,
|
|
89
|
+
DomainDnsHandler,
|
|
89
90
|
ConfigureProxmoxContainerExposePortsHandler,
|
|
90
91
|
AutomationV2StartHandler,
|
|
91
92
|
AutomationV2StateHandler,
|
|
@@ -633,6 +634,7 @@ class TerminalManager:
|
|
|
633
634
|
self._command_registry.register(CloudflareTunnelSetupHandler)
|
|
634
635
|
self._command_registry.register(CloudflareForwardingHandler)
|
|
635
636
|
self._command_registry.register(CloudflareAccessHandler)
|
|
637
|
+
self._command_registry.register(DomainDnsHandler)
|
|
636
638
|
self._command_registry.register(ConfigureProxmoxContainerExposePortsHandler)
|
|
637
639
|
self._command_registry.register(UpdatePortacodeHandler)
|
|
638
640
|
self._command_registry.register(AutomationV2StartHandler)
|
portacode/dns_cli.py
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"""Local interface to the same structured DNS operations used over WebSocket."""
|
|
2
|
+
import json
|
|
3
|
+
import click
|
|
4
|
+
from .tunneling.dns import manage_dns, TYPES
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@click.command('domain-dns')
|
|
8
|
+
@click.argument('action', type=click.Choice(['list', 'get', 'create', 'update', 'delete']))
|
|
9
|
+
@click.option('--domain', required=True, help='The currently connected Cloudflare domain.')
|
|
10
|
+
@click.option('--record-id')
|
|
11
|
+
@click.option('--record-json', help='Record object for create/update (full desired record).')
|
|
12
|
+
@click.option('--name', help='Exact fully qualified record-name filter, or @ for the apex.')
|
|
13
|
+
@click.option('--record-type', type=click.Choice(sorted(TYPES)))
|
|
14
|
+
@click.option('--page', default=1, type=int)
|
|
15
|
+
@click.option('--per-page', default=100, type=int)
|
|
16
|
+
@click.option('--if-match', help='modified_on value from the most recent record read.')
|
|
17
|
+
@click.option('--confirm-delete', is_flag=True)
|
|
18
|
+
def domain_dns(action, domain, record_id, record_json, name, record_type, page, per_page, if_match, confirm_delete):
|
|
19
|
+
"""Manage connected-domain DNS. Run as the Portacode service user."""
|
|
20
|
+
try:
|
|
21
|
+
result = manage_dns(action=action, domain=domain, record_id=record_id,
|
|
22
|
+
record=json.loads(record_json) if record_json is not None else None,
|
|
23
|
+
name=name, record_type=record_type, page=page, per_page=per_page,
|
|
24
|
+
if_match=if_match, confirm_delete=confirm_delete)
|
|
25
|
+
except (ValueError, RuntimeError) as exc:
|
|
26
|
+
raise click.ClickException(str(exc)) from None
|
|
27
|
+
click.echo(json.dumps(result, indent=2))
|
|
@@ -288,9 +288,90 @@ async def test_codex_thread_resume():
|
|
|
288
288
|
turns_call = next(c for c in manager.bridge.calls if c[0] == "thread/turns/list")
|
|
289
289
|
assert turns_call[1]["threadId"] == "th-1"
|
|
290
290
|
assert turns_call[1]["itemsView"] == "full"
|
|
291
|
+
assert turns_call[1]["sortDirection"] == "desc"
|
|
292
|
+
assert turns_call[1]["limit"] == 80
|
|
291
293
|
assert not any(c[0] == "thread/read" for c in manager.bridge.calls)
|
|
292
294
|
|
|
293
295
|
|
|
296
|
+
@pytest.mark.asyncio
|
|
297
|
+
@pytest.mark.parametrize("count", [0, 1, 80, 81, 300])
|
|
298
|
+
@pytest.mark.parametrize("already_active", [False, True])
|
|
299
|
+
async def test_resume_keeps_latest_page_in_chronological_order(count, already_active):
|
|
300
|
+
channel = DummyControlChannel()
|
|
301
|
+
context = _context()
|
|
302
|
+
manager = CodexChatManager(channel, context)
|
|
303
|
+
manager.bridge = FakeBridge()
|
|
304
|
+
context["codex_manager"] = manager
|
|
305
|
+
turns = [{"id": f"turn-{i}", "status": "inProgress" if i == count - 1 else "completed",
|
|
306
|
+
"items": [{"id": f"user-{i}", "text": f"question {i}"},
|
|
307
|
+
{"id": f"answer-{i}", "text": f"answer {i}"}]} for i in range(count)]
|
|
308
|
+
if already_active and count:
|
|
309
|
+
manager._thread_active_turn["th-1"] = f"turn-{count - 1}"
|
|
310
|
+
|
|
311
|
+
async def call(method, params, timeout=60):
|
|
312
|
+
manager.bridge.calls.append((method, params))
|
|
313
|
+
if method == "thread/resume":
|
|
314
|
+
# A first embedded page must not override explicit newest selection.
|
|
315
|
+
return {"thread": {"id": "th-1"}, "initialTurnsPage": {"data": turns[:80]}}
|
|
316
|
+
assert method == "thread/turns/list"
|
|
317
|
+
ordered = list(reversed(turns)) if params["sortDirection"] == "desc" else turns
|
|
318
|
+
return {"data": ordered[:params["limit"]], "nextCursor": "older-page"}
|
|
319
|
+
|
|
320
|
+
manager.bridge.call = call
|
|
321
|
+
await CodexThreadResumeHandler(channel, context).handle(
|
|
322
|
+
{"cmd": "codex_thread_resume", "threadId": "th-1", "project_id": "p-1"}, reply_channel="rc-1")
|
|
323
|
+
assert len(channel.sent) == 1
|
|
324
|
+
payload = channel.sent[0]
|
|
325
|
+
assert [i["id"] for i in payload["items"]] == [
|
|
326
|
+
item["id"] for turn in turns[-80:] for item in turn["items"]]
|
|
327
|
+
if count:
|
|
328
|
+
assert payload["activeTurn"]["id"] == f"turn-{count - 1}"
|
|
329
|
+
assert [method for method, _ in manager.bridge.calls] == (
|
|
330
|
+
[] if already_active and count else ["thread/resume"]) + ["thread/turns/list"]
|
|
331
|
+
assert all("cursor" not in params for _, params in manager.bridge.calls)
|
|
332
|
+
assert all("_portacode_turn_id" not in item for turn in turns for item in turn["items"])
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
@pytest.mark.asyncio
|
|
336
|
+
@pytest.mark.parametrize("fallback", ["legacy_resume", "read_inline", "read_page", "resume_page"])
|
|
337
|
+
async def test_resume_fallback_caps_history_without_duplicate_rollout(fallback):
|
|
338
|
+
from portacode.connection.codex_app_server import CodexAppServerError
|
|
339
|
+
|
|
340
|
+
channel = DummyControlChannel()
|
|
341
|
+
context = _context()
|
|
342
|
+
manager = CodexChatManager(channel, context)
|
|
343
|
+
manager.bridge = FakeBridge()
|
|
344
|
+
context["codex_manager"] = manager
|
|
345
|
+
turns = [{"id": f"t-{i}", "items": [{"id": f"m-{i}", "text": str(i)}]} for i in range(100)]
|
|
346
|
+
|
|
347
|
+
async def call(method, params, timeout=60):
|
|
348
|
+
manager.bridge.calls.append((method, params))
|
|
349
|
+
if method == "thread/resume":
|
|
350
|
+
if fallback == "legacy_resume":
|
|
351
|
+
if params.get("excludeTurns"):
|
|
352
|
+
raise CodexAppServerError("unknown excludeTurns")
|
|
353
|
+
return {"thread": {"id": "th-1", "name": "preserved", "turns": turns}}
|
|
354
|
+
if fallback == "resume_page":
|
|
355
|
+
return {"thread": {"id": "th-1"}, "initialTurnsPage": {"data": turns}}
|
|
356
|
+
return {"thread": {"id": "th-1"}}
|
|
357
|
+
if method == "thread/turns/list":
|
|
358
|
+
raise CodexAppServerError("unknown method")
|
|
359
|
+
assert method == "thread/read" and params["excludeTurns"]
|
|
360
|
+
return ({"initialTurnsPage": {"data": turns}} if fallback == "read_page"
|
|
361
|
+
else {"thread": {"id": "th-1", "turns": turns}})
|
|
362
|
+
|
|
363
|
+
manager.bridge.call = call
|
|
364
|
+
await CodexThreadResumeHandler(channel, context).handle(
|
|
365
|
+
{"cmd": "codex_thread_resume", "threadId": "th-1", "project_id": "p-1"}, reply_channel="rc-1")
|
|
366
|
+
assert len(channel.sent) == 1
|
|
367
|
+
payload = channel.sent[0]
|
|
368
|
+
assert [i["id"] for i in payload["items"]] == [f"m-{i}" for i in range(20, 100)]
|
|
369
|
+
assert "turns" not in payload["thread"]
|
|
370
|
+
assert "initialTurnsPage" not in payload["thread"]
|
|
371
|
+
if fallback == "legacy_resume":
|
|
372
|
+
assert payload["thread"]["name"] == "preserved"
|
|
373
|
+
|
|
374
|
+
|
|
294
375
|
@pytest.mark.asyncio
|
|
295
376
|
async def test_codex_turn_start():
|
|
296
377
|
channel = DummyControlChannel()
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
"""Structured DNS operations using the connected domain's local login credential."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
import ipaddress
|
|
5
|
+
import json
|
|
6
|
+
import re
|
|
7
|
+
import threading
|
|
8
|
+
import urllib.error
|
|
9
|
+
import urllib.parse
|
|
10
|
+
import urllib.request
|
|
11
|
+
|
|
12
|
+
from .get_domain import extract_token_json
|
|
13
|
+
from .state import default_cert_path, load_state
|
|
14
|
+
|
|
15
|
+
TYPES = frozenset({'A', 'AAAA', 'CNAME', 'MX', 'TXT', 'NS', 'PTR', 'SRV', 'CAA'})
|
|
16
|
+
FIELDS = frozenset({'type', 'name', 'content', 'ttl', 'priority', 'proxied', 'data', 'comment', 'tags'})
|
|
17
|
+
READ_FIELDS = FIELDS | {'id', 'created_on', 'modified_on', 'proxiable'}
|
|
18
|
+
_LOCK = threading.RLock()
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def domain_name(value):
|
|
22
|
+
if not isinstance(value, str):
|
|
23
|
+
raise ValueError('A domain name is required.')
|
|
24
|
+
try:
|
|
25
|
+
name = value.strip().rstrip('.').encode('idna').decode('ascii').lower()
|
|
26
|
+
except UnicodeError:
|
|
27
|
+
raise ValueError('Invalid domain name.') from None
|
|
28
|
+
if len(name) > 253 or not name or any(not re.fullmatch(r'[a-z0-9_-]{1,63}|\*', label) for label in name.split('.')):
|
|
29
|
+
raise ValueError('Invalid domain name.')
|
|
30
|
+
if '*' in name and (not name.startswith('*.') or name.count('*') != 1):
|
|
31
|
+
raise ValueError('Wildcard must be the first label.')
|
|
32
|
+
return name
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def scoped_name(value, domain):
|
|
36
|
+
name = domain if value == '@' else domain_name(value)
|
|
37
|
+
if name != domain and not name.endswith('.' + domain):
|
|
38
|
+
raise ValueError('DNS records must belong to the connected domain.')
|
|
39
|
+
return name
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def normalize_record(record, domain):
|
|
43
|
+
if not isinstance(record, dict) or set(record) - FIELDS:
|
|
44
|
+
raise ValueError('Invalid DNS record fields.')
|
|
45
|
+
result = dict(record)
|
|
46
|
+
kind = result.get('type')
|
|
47
|
+
if kind not in TYPES:
|
|
48
|
+
raise ValueError('Unsupported DNS record type.')
|
|
49
|
+
result['name'] = scoped_name(result.get('name'), domain)
|
|
50
|
+
ttl = result.setdefault('ttl', 1)
|
|
51
|
+
if type(ttl) is not int or not (ttl == 1 or 60 <= ttl <= 86400):
|
|
52
|
+
raise ValueError('TTL must be 1 (automatic), or 60–86400 seconds.')
|
|
53
|
+
if 'proxied' in result and (type(result['proxied']) is not bool or (result['proxied'] and kind not in {'A', 'AAAA', 'CNAME'})):
|
|
54
|
+
raise ValueError('Only A, AAAA and CNAME records can be proxied.')
|
|
55
|
+
if kind in {'CAA', 'SRV'}:
|
|
56
|
+
data = result.get('data')
|
|
57
|
+
allowed = {'flags', 'tag', 'value'} if kind == 'CAA' else {'priority', 'weight', 'port', 'target', 'service', 'proto', 'name'}
|
|
58
|
+
if not isinstance(data, dict) or set(data) - allowed or not data:
|
|
59
|
+
raise ValueError('Invalid structured DNS record data.')
|
|
60
|
+
if 'name' in data:
|
|
61
|
+
data = dict(data, name=scoped_name(data['name'], domain))
|
|
62
|
+
result['data'] = data
|
|
63
|
+
else:
|
|
64
|
+
if 'data' in result:
|
|
65
|
+
raise ValueError('This DNS record type does not accept structured data.')
|
|
66
|
+
content = result.get('content')
|
|
67
|
+
if not isinstance(content, str) or not content or len(content) > 8192 or '\x00' in content:
|
|
68
|
+
raise ValueError('Record content is required (maximum 8192 characters).')
|
|
69
|
+
if kind in {'A', 'AAAA'}:
|
|
70
|
+
try:
|
|
71
|
+
addr = ipaddress.ip_address(content)
|
|
72
|
+
if addr.version != (4 if kind == 'A' else 6):
|
|
73
|
+
raise ValueError()
|
|
74
|
+
result['content'] = str(addr)
|
|
75
|
+
except ValueError:
|
|
76
|
+
raise ValueError('Invalid IP address for this record type.') from None
|
|
77
|
+
elif kind in {'CNAME', 'MX', 'NS', 'PTR'}:
|
|
78
|
+
result['content'] = domain_name(content)
|
|
79
|
+
if kind == 'MX' or 'priority' in result:
|
|
80
|
+
if type(result.get('priority')) is not int or not 0 <= result['priority'] <= 65535:
|
|
81
|
+
raise ValueError('Record priority must be between 0 and 65535.')
|
|
82
|
+
if 'comment' in result and (not isinstance(result['comment'], str) or len(result['comment']) > 500):
|
|
83
|
+
raise ValueError('Invalid record comment.')
|
|
84
|
+
if 'tags' in result and (not isinstance(result['tags'], list) or len(result['tags']) > 20 or any(not isinstance(tag, str) or len(tag) > 200 for tag in result['tags'])):
|
|
85
|
+
raise ValueError('Invalid record tags.')
|
|
86
|
+
if len(json.dumps(result)) > 16384:
|
|
87
|
+
raise ValueError('DNS record is too large.')
|
|
88
|
+
return result
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
class DnsClient:
|
|
92
|
+
def __init__(self, domain):
|
|
93
|
+
state = load_state()
|
|
94
|
+
self.domain = domain_name(domain)
|
|
95
|
+
if domain_name(state.get('domain')) != self.domain or not state.get('tunnel_id'):
|
|
96
|
+
raise ValueError('The requested domain does not match the connected domain.')
|
|
97
|
+
try:
|
|
98
|
+
credential = extract_token_json(str(state.get('cert_path') or default_cert_path()))
|
|
99
|
+
except Exception:
|
|
100
|
+
raise ValueError('Cloudflare login credential unavailable. Reconnect the domain.') from None
|
|
101
|
+
self._token = credential.get('apiToken')
|
|
102
|
+
zone = credential.get('zoneID')
|
|
103
|
+
if not isinstance(zone, str) or not re.fullmatch(r'[a-fA-F0-9]{32}', zone) or not self._token:
|
|
104
|
+
raise ValueError('Cloudflare login credential is incomplete. Reconnect the domain.')
|
|
105
|
+
self.base = '/zones/' + zone
|
|
106
|
+
zone_data = self.request('GET', '')['result']
|
|
107
|
+
if domain_name(zone_data.get('name')) != self.domain:
|
|
108
|
+
raise ValueError('Cloudflare credential belongs to a different domain.')
|
|
109
|
+
|
|
110
|
+
def request(self, method, suffix, payload=None):
|
|
111
|
+
request = urllib.request.Request('https://api.cloudflare.com/client/v4' + self.base + suffix,
|
|
112
|
+
method=method, data=json.dumps(payload).encode() if payload is not None else None,
|
|
113
|
+
headers={'Authorization': 'Bearer ' + self._token, 'Content-Type': 'application/json'})
|
|
114
|
+
try:
|
|
115
|
+
with urllib.request.urlopen(request, timeout=15) as response:
|
|
116
|
+
value = json.load(response)
|
|
117
|
+
except urllib.error.HTTPError as exc:
|
|
118
|
+
# Do not relay provider bodies, request headers or credentials.
|
|
119
|
+
raise RuntimeError('Cloudflare DNS request failed (HTTP %s).' % exc.code) from None
|
|
120
|
+
except (OSError, ValueError):
|
|
121
|
+
raise RuntimeError('Cloudflare DNS is unavailable; check record state before retrying a change.') from None
|
|
122
|
+
if not isinstance(value, dict) or not value.get('success'):
|
|
123
|
+
raise RuntimeError('Cloudflare rejected the DNS operation.')
|
|
124
|
+
return value
|
|
125
|
+
|
|
126
|
+
def record(self, record_id):
|
|
127
|
+
if not isinstance(record_id, str) or not re.fullmatch(r'[a-fA-F0-9]{32}', record_id):
|
|
128
|
+
raise ValueError('Invalid DNS record ID.')
|
|
129
|
+
row = self.request('GET', '/dns_records/' + record_id)['result']
|
|
130
|
+
scoped_name(row.get('name'), self.domain)
|
|
131
|
+
return row
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
def public_record(row):
|
|
135
|
+
return {key: value for key, value in row.items() if key in READ_FIELDS}
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
def manage_dns(*, action, domain, record=None, record_id=None, name=None, record_type=None,
|
|
139
|
+
page=1, per_page=100, if_match=None, confirm_delete=False):
|
|
140
|
+
if action not in {'list', 'get', 'create', 'update', 'delete'}:
|
|
141
|
+
raise ValueError('Unsupported DNS action.')
|
|
142
|
+
domain = domain_name(domain)
|
|
143
|
+
if action in {'update', 'delete'} and (not isinstance(if_match, str) or not if_match):
|
|
144
|
+
raise ValueError('Read the record first and supply its modified_on value as if_match.')
|
|
145
|
+
if action == 'delete' and confirm_delete is not True:
|
|
146
|
+
raise ValueError('Explicit confirmation is required to delete a DNS record.')
|
|
147
|
+
desired = normalize_record(record, domain) if action in {'create', 'update'} else None
|
|
148
|
+
if type(page) is not int or page < 1 or type(per_page) is not int or not 1 <= per_page <= 100:
|
|
149
|
+
raise ValueError('Invalid DNS pagination.')
|
|
150
|
+
filters = {'page': page, 'per_page': per_page}
|
|
151
|
+
if name is not None:
|
|
152
|
+
filters['name'] = scoped_name(name, domain)
|
|
153
|
+
if record_type is not None:
|
|
154
|
+
if record_type not in TYPES:
|
|
155
|
+
raise ValueError('Unsupported DNS record type.')
|
|
156
|
+
filters['type'] = record_type
|
|
157
|
+
with _LOCK:
|
|
158
|
+
client = DnsClient(domain)
|
|
159
|
+
if action == 'list':
|
|
160
|
+
data = client.request('GET', '/dns_records?' + urllib.parse.urlencode(filters))
|
|
161
|
+
rows = data.get('result', [])
|
|
162
|
+
for row in rows:
|
|
163
|
+
scoped_name(row.get('name'), domain)
|
|
164
|
+
return {'records': [public_record(row) for row in rows], 'pagination': data.get('result_info', {})}
|
|
165
|
+
if action == 'get':
|
|
166
|
+
return {'record': public_record(client.record(record_id))}
|
|
167
|
+
if action == 'create':
|
|
168
|
+
row = client.request('POST', '/dns_records', desired)['result']
|
|
169
|
+
return {'record': public_record(row)}
|
|
170
|
+
existing = client.record(record_id)
|
|
171
|
+
if existing.get('modified_on') != if_match:
|
|
172
|
+
raise ValueError('DNS record changed since it was read. Refresh before modifying it.')
|
|
173
|
+
if action == 'delete':
|
|
174
|
+
client.request('DELETE', '/dns_records/' + record_id)
|
|
175
|
+
return {'deleted': True, 'record_id': record_id}
|
|
176
|
+
row = client.request('PATCH', '/dns_records/' + record_id, desired)['result']
|
|
177
|
+
return {'record': public_record(row)}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
portacode/README.md,sha256=R76fnJCKOnLiBEirTtc7fj4A6j5vAN1pdYMGNGqu1cs,1215
|
|
2
2
|
portacode/__init__.py,sha256=Hwk8wm5KA79qi06r0qKJKT2kjUlHrWaDtH4CyhnWFw8,1086
|
|
3
3
|
portacode/__main__.py,sha256=jmHTGC1hzmo9iKJLv-SSYe9BSIbPPZ2IOpecI03PlTs,296
|
|
4
|
-
portacode/_version.py,sha256=
|
|
4
|
+
portacode/_version.py,sha256=5izFV0iRS3F2Y5h9YCC-cF4OS20eOLT4TTcUuUdSX8Y,535
|
|
5
5
|
portacode/browser_cli.py,sha256=MEc_WxTeezR4WP9wKcC89FGDeXbLyN6Ybfs-foUnrEY,5995
|
|
6
6
|
portacode/browser_prepare.py,sha256=xZRMkSEDZxw1YYz4LbiiYbmF9nOkXLcGsgkbGtVFfmQ,4805
|
|
7
7
|
portacode/browser_runtime.py,sha256=YR0duDqZaZrgSy0I9HrfZqV2fzcU2kIvUG1VyBiC93c,4276
|
|
8
|
-
portacode/cli.py,sha256=
|
|
8
|
+
portacode/cli.py,sha256=pmcnrLnyc2gwMAAy0m72r3IulALHOT9B2p9lwEVoifs,41568
|
|
9
9
|
portacode/codex_loopback_proxy.py,sha256=CK875nnfdyHGY61C-hC7IaQHG9V-jCKdgbdOf2WuaWA,24837
|
|
10
10
|
portacode/codex_prepare.py,sha256=eVIYcXjyk06XhNBGl46sC_PsBQvykSR1sIR7Ny69cR0,28284
|
|
11
11
|
portacode/codex_usage_limit.py,sha256=H3TTD-dest4bTLvgX-ZWKpxVP5Yv25PDteJnHrLOyu8,1414
|
|
12
12
|
portacode/data.py,sha256=M4nPVuLELi4-YwC0XVm32N58cQG-pWSPw6fiv6fNuYA,2322
|
|
13
|
+
portacode/dns_cli.py,sha256=vLb7boE3H22Ps1e9zeJrBGnlGdxlxUVhcqHKwlCueco,1525
|
|
13
14
|
portacode/exit_codes.py,sha256=Lc2VacACHJtNp7dNazZCcBkwQXpmn4w_h6FVe_TGrQI,327
|
|
14
15
|
portacode/github_credential.py,sha256=SVWP1StbRVzpHwgUx1YA7S804tk-5aMfxGIwMKfxZPA,6345
|
|
15
16
|
portacode/image_cli.py,sha256=FzFlRaSJGLsa6Pe8o_vi3wB65TOoFOYgvCAHheD_CZU,3442
|
|
@@ -36,22 +37,23 @@ portacode/connection/client.py,sha256=QDFRwBjATw5tp-wlhkiz5OfL_jVAwRHcVpPOYg6ntO
|
|
|
36
37
|
portacode/connection/codex_app_server.py,sha256=Q16bD78Hf14mtiWQ4QIB8eCTEY4wZrVytrXxr36Mo2E,23245
|
|
37
38
|
portacode/connection/guest_host_protocol.py,sha256=bXghGvUFuj2yg89pPljLuS4ivEYwgM3BwDK7CHIc2Dk,6199
|
|
38
39
|
portacode/connection/multiplex.py,sha256=L-TxqJ_ZEbfNEfu1cwxgJ5vUdyRzZjsMy2Kx1diiZys,5237
|
|
39
|
-
portacode/connection/terminal.py,sha256=
|
|
40
|
+
portacode/connection/terminal.py,sha256=MOPFGvsGyWbm-c3inw-KnNFlJ-jzD-umO8hTHOuqmRs,75694
|
|
40
41
|
portacode/connection/test_guest_host_protocol.py,sha256=KhoXv4YMDYh6ENQrzW5rQNDZ3PMTP7oSN6iSC9KH4NE,2561
|
|
41
42
|
portacode/connection/test_guest_host_terminal.py,sha256=3c54_1fBHljdKmxpj4LYudVpgMZ-W8p_wB14WYVswps,5151
|
|
42
43
|
portacode/connection/test_webmin_proxy_config.py,sha256=52Qv9C0E5UzKUvQDJfREAb3RwJWs5R_CkKECrTWOsNg,1121
|
|
43
44
|
portacode/connection/webmin_proxy_config.py,sha256=vxzucOUz_GgxDjZWcgNVj7ImNfbdpIRABWpG_ihcK6s,2569
|
|
44
45
|
portacode/connection/handlers/README.md,sha256=pnSmHxnmBIwLkWcuNBbZb2XQdYox_dOnSu8-cWoDWJA,13385
|
|
45
46
|
portacode/connection/handlers/WEBSOCKET_PROTOCOL.md,sha256=tKZS0I9mPSaH96U3gNqWn96NCERErVW2x9VMqaKJ51w,134520
|
|
46
|
-
portacode/connection/handlers/__init__.py,sha256=
|
|
47
|
+
portacode/connection/handlers/__init__.py,sha256=m-5rcXtP5TXkptQUYns4TehF3S1HKj51cw61w1_j3Oo,5343
|
|
47
48
|
portacode/connection/handlers/automation_v2_handlers.py,sha256=tCwXul5MZaZhdwGwKvIQEaUC2ySiX12e35R64Gm3wR0,54239
|
|
48
49
|
portacode/connection/handlers/base.py,sha256=tMsKJmnNhXA3a4YZA55a0WO2e8-4Uh4BsG9lWAr3Ris,10829
|
|
49
50
|
portacode/connection/handlers/browser_handlers.py,sha256=FRSxxkexiqJVq7zivDoPwEAyZvhN2GFpwN0N8_lAlno,29065
|
|
50
51
|
portacode/connection/handlers/chunked_content.py,sha256=h6hXRmxSeOgnIxoU8CkmvEf2Odv-ajPrpHIe_W3GKcA,9251
|
|
51
52
|
portacode/connection/handlers/cloudflare_forwarding.py,sha256=v7jLFnSYoECakB8O8cEKArhk1SuD8NYsRr_YE-QT0f8,49528
|
|
52
53
|
portacode/connection/handlers/cloudflare_tunnel.py,sha256=qHBrm2rATxFmvfoC49YOBj0EUXjh_FETiWw66krxCIg,6655
|
|
53
|
-
portacode/connection/handlers/codex_handlers.py,sha256=
|
|
54
|
+
portacode/connection/handlers/codex_handlers.py,sha256=TOMH5i-kWq9uK-TzNc1dX5gZPCreW6YB-pVsnj8vLi8,54363
|
|
54
55
|
portacode/connection/handlers/diff_handlers.py,sha256=coN8gfY85KctBEs_bL9RCrZ6iymbP7zaB4Mzwgqrsck,24676
|
|
56
|
+
portacode/connection/handlers/domain_dns.py,sha256=cgwWj9r7teiH41_JS_uczioIkgJxTfXvcJLCXWVTD88,680
|
|
55
57
|
portacode/connection/handlers/file_handlers.py,sha256=ZPenZ14fJu7TTZSS79pLrAF2PKHMdbgmpzz5xZalW2I,44093
|
|
56
58
|
portacode/connection/handlers/file_transfer_handlers.py,sha256=otUb6x4roms-zFuuomyZFH68CNY5abr0A-eUMVgYAO8,7746
|
|
57
59
|
portacode/connection/handlers/git_handlers.py,sha256=VtnNdbwOMbiyTR5sbNkz7Brmyn13Onf3fyECX8JL2lk,6012
|
|
@@ -68,6 +70,7 @@ portacode/connection/handlers/terminal_handlers.py,sha256=s6bNmnXkjbV7rjSoYVDbbB
|
|
|
68
70
|
portacode/connection/handlers/test_browser_handlers.py,sha256=Z5XuVrapOdCa5ZBcfmC6KLSuSV4Jl57YfIu0bLBLvAs,19407
|
|
69
71
|
portacode/connection/handlers/test_cloudflare_access.py,sha256=P43aeaVVZJ7Jr2GAwFzI5BSHIzMfKBXCcc0_vis6YQA,8743
|
|
70
72
|
portacode/connection/handlers/test_cloudflare_forwarding.py,sha256=ifKF-aSeEPr7IDuBlYjAfDowO7Q_qvji46I0iQe6T1w,11661
|
|
73
|
+
portacode/connection/handlers/test_domain_dns.py,sha256=GDm_A3t5BUewDT_r6C6az1EEkl9b2TuMoi0Y7P6wYk8,7710
|
|
71
74
|
portacode/connection/handlers/test_file_move_copy.py,sha256=uXejCCcPWKs9qfyL6ckp0NxjwGYK3-Y63i3lFz-F47M,2872
|
|
72
75
|
portacode/connection/handlers/test_git_handlers.py,sha256=T9gFkCjanEC2L8n_kS2Ht0e67he34vThQtJU7j68auo,3514
|
|
73
76
|
portacode/connection/handlers/test_proxmox_infra.py,sha256=8vDSP7RhYltWazKOkD7oVxp2BpvQwPScDK3sD0D7FNg,60419
|
|
@@ -108,7 +111,7 @@ portacode/tests/test_browser_cli.py,sha256=ZmmNdRkIdLbTybWCKW6lCjktLRHvjK48wy1tQ
|
|
|
108
111
|
portacode/tests/test_browser_prepare.py,sha256=a75un88L1E5vX1B-1Qeh0ng6I_HictNcZ-Wf-F8uqKs,5395
|
|
109
112
|
portacode/tests/test_cli_service_logs.py,sha256=Fog68tVDMEe8zOcpfA1ukPRodhgjOwbTQ6Rm4leH6dQ,1733
|
|
110
113
|
portacode/tests/test_codex_app_server.py,sha256=xUiCno_Gx3Z5KrrhoxN38c5nGJBDgJ9bT7TDvFGZDMs,13993
|
|
111
|
-
portacode/tests/test_codex_handlers.py,sha256=
|
|
114
|
+
portacode/tests/test_codex_handlers.py,sha256=CuGx-YxqezmQDhsAWTYwcTEXfIH4eSJInV3cTPMvYDg,39556
|
|
112
115
|
portacode/tests/test_codex_loopback_proxy.py,sha256=W51wtATGxNMzODXY-tmRG5IU5N2FqIN8hvqQNxNv1xg,10423
|
|
113
116
|
portacode/tests/test_codex_prepare.py,sha256=n0LyedZq8IVP5OqR1pkd0h6Qvjax5_vDOwOnJGfUou8,13331
|
|
114
117
|
portacode/tests/test_codex_prepare_cli.py,sha256=hhhU3FDbLGfsSv2uC-sLzECfEScgeyyUXc_5JLNFBzw,2666
|
|
@@ -122,6 +125,7 @@ portacode/tests/test_terminal_session_shell.py,sha256=nNM_fbT1vM8oknGDBeNk0eiRtZ
|
|
|
122
125
|
portacode/tunneling/__init__.py,sha256=qOrizn5awmPfsabVF59-EkmXnvS8AogvcBtVON6UfP0,54
|
|
123
126
|
portacode/tunneling/access.py,sha256=zRdhsT_fQ-cFyqN2ZdLkOWwzXsHifm9tz3qqpVkke_U,9865
|
|
124
127
|
portacode/tunneling/cloudflared_login.py,sha256=5guJT84CG-O1KgR5PgLNIJNzQ-HxCjGgtfqoHSKe8Zg,2456
|
|
128
|
+
portacode/tunneling/dns.py,sha256=kLOPLCi6zyrmwep5-iWJuXOl7WuT0W4xDpwKjvTeOTg,9076
|
|
125
129
|
portacode/tunneling/ensure_cloudflared.py,sha256=4NiN-WZ8-vTeoFTALg-mc_sksvhEaFo0oCZwUMvPBdY,6041
|
|
126
130
|
portacode/tunneling/ensure_pyyaml.py,sha256=cR4LOdJnUQnhH_chq5NL1MAxtSd5x0coNrwzZdPbzhY,2178
|
|
127
131
|
portacode/tunneling/forwarding_state.py,sha256=5FNnfYIKqFzU4_ufuHRlUHqIhYcgQW3Kc3WQOpo3tHM,1255
|
|
@@ -135,7 +139,7 @@ portacode/utils/diff_apply.py,sha256=ArkT-vEQ7iyA1Nfqufq1AiNtRLhoCMnC75FCRh2kNgI
|
|
|
135
139
|
portacode/utils/diff_renderer.py,sha256=S76StnQ2DLfsz4Gg0m07UwPfRp8270PuzbNaQq-rmYk,13850
|
|
136
140
|
portacode/utils/ntp_clock.py,sha256=VqCnWCTehCufE43W23oB-WUdAZGeCcLxkmIOPwInYHc,2499
|
|
137
141
|
portacode/utils/runtime_paths.py,sha256=G9ROho5f5gnDhoQ7vpEAX2XifBzoJTvqTylkF2Hkx8E,1660
|
|
138
|
-
portacode-2.2.
|
|
142
|
+
portacode-2.2.29.dev0.dist-info/licenses/LICENSE,sha256=iiV44E3po4OL77NL8diCk3WtYvCNGu6gUci2TYxVUgQ,5520
|
|
139
143
|
test_modules/README.md,sha256=Do_agkm9WhSzueXjRAkV_xEj6Emy5zB3N3VKY5Roce8,9274
|
|
140
144
|
test_modules/__init__.py,sha256=1LcbHodIHsB0g-g4NGjSn6AMuCoGbymvXPYLOb6Z7F0,53
|
|
141
145
|
test_modules/test_device_online.py,sha256=QtYq0Dq9vME8Gp2O4fGSheqVf8LUtpsSKosXXk56gGM,1654
|
|
@@ -161,8 +165,8 @@ testing_framework/core/playwright_manager.py,sha256=asMe7zQg8Kp3a71F7pv92OiFt63B
|
|
|
161
165
|
testing_framework/core/runner.py,sha256=t3fq0mGCVUCE_TbieEPwmLKjxe44ez29SzW8G33ACME,19746
|
|
162
166
|
testing_framework/core/shared_cli_manager.py,sha256=BESSNtyQb7BOlaOvZmm04T8Uezjms4KCBs2MzTxvzYQ,8790
|
|
163
167
|
testing_framework/core/test_discovery.py,sha256=2FZ9fJ8Dp5dloA-fkgXoJ_gCMC_nYPBnA3Hs2xlagzM,4928
|
|
164
|
-
portacode-2.2.
|
|
165
|
-
portacode-2.2.
|
|
166
|
-
portacode-2.2.
|
|
167
|
-
portacode-2.2.
|
|
168
|
-
portacode-2.2.
|
|
168
|
+
portacode-2.2.29.dev0.dist-info/METADATA,sha256=ABd8EvxpQD9j3_ACLtZQspxT7XAIb8K_EsJdIisa0gk,12881
|
|
169
|
+
portacode-2.2.29.dev0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
|
|
170
|
+
portacode-2.2.29.dev0.dist-info/entry_points.txt,sha256=0cV_SuIztVnLWACUY5KMR8K8pWdAsLiaFbLXE5He0rk,151
|
|
171
|
+
portacode-2.2.29.dev0.dist-info/top_level.txt,sha256=TGhTYUxfW8SyVZc_zGgzjzc24gGT7nSw8Qf73liVRKM,41
|
|
172
|
+
portacode-2.2.29.dev0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|