netizen-cli 0.15.2__tar.gz → 0.16.0__tar.gz
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.
- {netizen_cli-0.15.2/netizen_cli.egg-info → netizen_cli-0.16.0}/PKG-INFO +1 -1
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/config.example.yaml +6 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/__init__.py +1 -1
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/admin/auth.py +2 -2
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/admin/credentials.py +84 -85
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/admin/feishu.py +21 -12
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/admin/login.py +13 -1
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/admin/presentation.py +6 -5
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/admin/static/admin.js +17 -13
- netizen_cli-0.16.0/netizen_cli/admin/static/group-access.js +121 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/admin/static/index.html +25 -3
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/admin/static/worktrees.js +1 -1
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/admin/transport.py +13 -7
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/admin/users.py +37 -7
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/admin/web.py +62 -11
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/attachments.py +14 -4
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/bindings.py +39 -22
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/cards/callbacks.py +2 -2
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/cards/controls.py +17 -17
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/cards/fork.py +4 -4
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/cards/reply.py +5 -6
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/cards/scheduled.py +2 -1
- netizen_cli-0.16.0/netizen_cli/channel/app_values.py +483 -0
- netizen_cli-0.16.0/netizen_cli/channel/base.py +964 -0
- netizen_cli-0.16.0/netizen_cli/channel/card_controls.py +1069 -0
- netizen_cli-0.16.0/netizen_cli/channel/commands.py +740 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/channel/completion_mentions.py +7 -2
- netizen_cli-0.16.0/netizen_cli/channel/constants.py +48 -0
- netizen_cli-0.16.0/netizen_cli/channel/entry.py +257 -0
- netizen_cli-0.16.0/netizen_cli/channel/forks.py +297 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/channel/input_preparation.py +2 -2
- netizen_cli-0.16.0/netizen_cli/channel/presentation.py +878 -0
- netizen_cli-0.16.0/netizen_cli/channel/prompts.py +420 -0
- netizen_cli-0.16.0/netizen_cli/channel/questions.py +324 -0
- netizen_cli-0.16.0/netizen_cli/channel/replies.py +405 -0
- netizen_cli-0.16.0/netizen_cli/channel/schedules.py +644 -0
- netizen_cli-0.16.0/netizen_cli/channel/session_cards.py +364 -0
- netizen_cli-0.16.0/netizen_cli/channel/session_tools.py +456 -0
- netizen_cli-0.16.0/netizen_cli/channel/sides.py +792 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/channel/topics.py +15 -1
- netizen_cli-0.16.0/netizen_cli/channel/turn_files.py +200 -0
- netizen_cli-0.16.0/netizen_cli/channel_app.py +151 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/chat_avatars.py +2 -2
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/cli_data.py +24 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/cli_services.py +1 -1
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/cli_setup.py +9 -1
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/cli_update.py +9 -1
- netizen_cli-0.16.0/netizen_cli/codex_runtime.py +333 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/database_migrations.py +1 -1
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/defaults/service.py +16 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/defaults/store.py +3 -2
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/domain.py +1 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/experience.py +10 -4
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/feishu_app_onboarding.py +11 -1
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/feishu_app_permissions.py +16 -2
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/file_inputs.py +29 -2
- netizen_cli-0.16.0/netizen_cli/group_access.py +113 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/image_inputs.py +1 -1
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/main.py +48 -18
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/management/chat_directory.py +13 -1
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/management/chat_labels.py +1 -1
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/management/service.py +39 -11
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/markdown_images.py +1 -1
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/mcp_transport.py +4 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/message_projection.py +6 -6
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/quoted_context.py +2 -2
- netizen_cli-0.16.0/netizen_cli/runtime/activity.py +490 -0
- netizen_cli-0.16.0/netizen_cli/runtime/compaction.py +407 -0
- netizen_cli-0.16.0/netizen_cli/runtime/forks.py +239 -0
- netizen_cli-0.16.0/netizen_cli/runtime/goals.py +1189 -0
- netizen_cli-0.16.0/netizen_cli/runtime/lifecycle.py +671 -0
- netizen_cli-0.16.0/netizen_cli/runtime/limits.py +29 -0
- netizen_cli-0.16.0/netizen_cli/runtime/naming.py +265 -0
- netizen_cli-0.16.0/netizen_cli/runtime/native_values.py +185 -0
- netizen_cli-0.16.0/netizen_cli/runtime/observation.py +851 -0
- netizen_cli-0.16.0/netizen_cli/runtime/occupancy.py +226 -0
- netizen_cli-0.16.0/netizen_cli/runtime/queries.py +629 -0
- netizen_cli-0.16.0/netizen_cli/runtime/shutdown.py +212 -0
- netizen_cli-0.16.0/netizen_cli/runtime/sides.py +1255 -0
- netizen_cli-0.16.0/netizen_cli/runtime/state.py +643 -0
- netizen_cli-0.16.0/netizen_cli/runtime/submission.py +1067 -0
- netizen_cli-0.16.0/netizen_cli/runtime/subscriptions.py +509 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/runtime/thread_naming.py +10 -2
- netizen_cli-0.16.0/netizen_cli/runtime/turn_control.py +289 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/schedules/mcp.py +14 -3
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/schedules/models.py +1 -1
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/schedules/scheduler.py +16 -2
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/schedules/service.py +14 -3
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/schedules/store.py +24 -3
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/sdk_gap_adapter.py +26 -7
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/sessions/mcp.py +11 -2
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/sessions/schema.py +1 -1
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/sessions/service.py +29 -4
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/settings.py +7 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/turn_activity.py +0 -1
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/turn_files.py +8 -5
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/turn_patch_children.py +36 -3
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/turn_plan_observer.py +1 -1
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/worktrees/service.py +6 -2
- {netizen_cli-0.15.2 → netizen_cli-0.16.0/netizen_cli.egg-info}/PKG-INFO +1 -1
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli.egg-info/SOURCES.txt +36 -0
- netizen_cli-0.16.0/pyproject.toml +222 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/skills/netizen-user-guide/SKILL.md +1 -1
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/skills/netizen-user-guide/references/admin.md +44 -18
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/skills/netizen-user-guide/references/commands.md +9 -8
- netizen_cli-0.16.0/skills/netizen-user-guide/references/concepts.md +71 -0
- netizen_cli-0.16.0/skills/netizen-user-guide/references/faq.md +138 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/skills/netizen-user-guide/references/feedback-and-files.md +4 -4
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/skills/netizen-user-guide/references/fork-side-goal.md +3 -3
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/skills/netizen-user-guide/references/messages.md +7 -3
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/skills/netizen-user-guide/references/native-capabilities.md +8 -8
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/skills/netizen-user-guide/references/scheduled-tasks.md +7 -3
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/skills/netizen-user-guide/references/session-collaboration.md +7 -3
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/skills/netizen-user-guide/references/sessions.md +22 -22
- netizen_cli-0.16.0/skills/netizen-user-guide/references/status-and-control.md +89 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_binding_scheduled_channel.py +83 -1
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_bindings.py +58 -1
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_card_error_feedback.py +1 -1
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_cards.py +7 -7
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_channel_app.py +82 -32
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_check_sdk.py +2 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_cli_data.py +97 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_codex_runtime.py +81 -44
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_completion_mentions.py +2 -2
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_deployment.py +2 -1
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_domain_experience.py +11 -2
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_fork_cards.py +1 -1
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_goal_reply_separation.py +2 -2
- netizen_cli-0.16.0/tests/test_group_access.py +461 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_latest_answer.py +6 -6
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_main.py +79 -2
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_persistent_fork_channel.py +1 -1
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_question_target_parity.py +15 -11
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_runtime_resume_activation.py +1 -1
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_runtime_thread_naming.py +1 -1
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_schedule_mcp.py +3 -1
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_schedule_scope_matrix.py +0 -1
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_schedule_workspace_cards.py +1 -1
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_scheduled_channel.py +43 -2
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_scheduled_runtime.py +1 -1
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_scheduler.py +71 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_schedules_storage.py +66 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_sdk_gap_adapter.py +1 -1
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_session_collaboration_app.py +92 -1
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_session_external_runtime.py +1 -1
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_session_tools.py +19 -1
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_status_commands.py +2 -2
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_worktree_runtime_cwd.py +3 -3
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_worktree_service.py +3 -3
- netizen_cli-0.15.2/netizen_cli/channel_app.py +0 -7177
- netizen_cli-0.15.2/netizen_cli/codex_runtime.py +0 -8386
- netizen_cli-0.15.2/pyproject.toml +0 -38
- netizen_cli-0.15.2/skills/netizen-user-guide/references/concepts.md +0 -51
- netizen_cli-0.15.2/skills/netizen-user-guide/references/faq.md +0 -131
- netizen_cli-0.15.2/skills/netizen-user-guide/references/status-and-control.md +0 -86
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/MANIFEST.in +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/README.md +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/_build.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/__main__.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/account_rate_limits.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/admin/__init__.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/admin/answer_previews.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/admin/errors.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/admin/file_previews.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/admin/port_config.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/admin/queries.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/admin/static/admin.css +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/admin/static/attachment-files.js +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/admin/static/chat-picker.css +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/admin/static/chat-picker.js +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/admin/static/content-preview.css +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/admin/static/content-preview.js +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/admin/static/file-browser.js +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/admin/static/identity.js +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/admin/static/login.html +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/admin/static/login.js +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/admin/static/netizen.svg +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/admin/static/progress-card.js +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/admin/static/project-files.js +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/admin/static/question-notifications.js +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/admin/static/session-access.js +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/admin/static/vendor/ace/LICENSE +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/admin/static/vendor/ace/README.md +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/admin/static/vendor/ace/ace.js +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/admin/static/vendor/ace/mode-javascript.js +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/admin/static/vendor/ace/mode-json.js +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/admin/static/vendor/ace/mode-markdown.js +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/admin/static/vendor/ace/mode-python.js +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/builtin_skills.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/cards/__init__.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/cards/chat_target.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/cards/defaults.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/cards/pagination.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/cards/questions.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/cards/session_ids.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/cards/status.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/cards/usage.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/cards/workspace.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/channel/__init__.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/channel/messages.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/channel/ports.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/channel/question_inputs.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/channel/reactions.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/channel/reply_presenter.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/channel/reply_suppression.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/channel/session_pages.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/chat_targets.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/cli.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/cli_packages.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/cli_update_restore.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/cli_update_worker.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/completion_mention.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/defaults/__init__.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/defaults/models.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/deployment/__init__.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/deployment/restart_worker.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/deployment/update_executor.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/deployment/update_protocol.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/error_messages.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/feishu_links.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/git_status.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/instance.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/lark_app.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/management/__init__.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/management/attachment_files.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/management/blocking_io.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/management/coordination.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/management/project_files.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/management/updates.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/message_content.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/message_history.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/message_preparation.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/migrations/__init__.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/migrations/schema.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/migrations/v14.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/migrations/v15.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/migrations/v16.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/migrations/v17.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/migrations/v18.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/migrations/v19.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/migrations/v20.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/model_settings.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/package_resources.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/pagination.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/partial_answers.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/progress_card_config.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/progress_card_settings.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/project_files.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/projects.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/prompt_projection.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/question_notifications.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/result_images.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/runtime/__init__.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/runtime/contracts.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/runtime/name_writes.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/schedules/__init__.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/service_launcher.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/session_inventory.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/session_settings.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/sessions/__init__.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/sessions/delegation.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/sessions/errors.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/sessions/policy.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/sessions/presentation.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/sessions/sources.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/skill_references.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/task_text.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/terminal_cleanup.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/thread_history.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/user_questions.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/worktrees/errors.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/worktrees/git.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/worktrees/models.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/worktrees/policy.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/worktrees/settings.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli/worktrees/store.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli.egg-info/dependency_links.txt +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli.egg-info/entry_points.txt +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli.egg-info/requires.txt +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/netizen_cli.egg-info/top_level.txt +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/setup.cfg +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/skills/netizen-lark/SKILL.md +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/skills/netizen-runtime-guidance/SKILL.md +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/skills/netizen-user-guide/references/user-guide.md +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_account_rate_limits.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_admin_update_executor_probe.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_attachments.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_channel_fixtures.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_channel_input_preparation.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_chat_avatars.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_chat_target_cards.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_cli.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_cli_distribution.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_cli_integration.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_cli_packages.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_cli_packaging.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_cli_services.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_cli_setup.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_cli_update.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_codex_sdk_capabilities.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_codex_sdk_upgrade_0161.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_codex_sdk_upgrade_0163.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_completion_mention_cards.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_completion_topic_delivery.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_configuration_publication.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_cron_chat_targets.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_database_migrations.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_defaults_cards.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_defaults_channel.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_defaults_runtime.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_defaults_worktree_channel.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_documentation_links.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_error_messages.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_feishu_app_onboarding.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_feishu_app_permissions.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_file_input_channel.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_file_inputs.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_file_pagination.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_git_status.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_image_inputs.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_lark_app.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_lark_sdk_contract.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_markdown_images.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_message_content.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_message_history.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_message_material_inputs.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_message_preparation.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_migration_schema_validation.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_model_settings.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_name_writes.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_optional_progress_card_settings_migration.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_pagination.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_partial_answer_delivery.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_partial_answers.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_persistent_fork_bindings.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_persistent_fork_runtime.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_probe_child_files.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_probe_feishu_completion_mention.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_probe_feishu_partial_answers.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_probe_feishu_turn_file_card.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_probe_persistent_fork.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_probe_python_sdk.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_probe_scheduled_tasks.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_probe_sdk_completion_race.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_probe_sdk_response_recovery.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_probe_skill_execution.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_probe_thread_naming.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_progress_card_config.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_progress_card_entrypoints.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_progress_card_presentation.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_progress_card_settings_migration.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_project_delete_channel.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_project_delete_runtime.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_project_deletion_storage.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_project_files.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_prompt_projection.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_question_cards.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_question_channel.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_question_notification_config.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_quoted_context.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_release_script.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_rename_name_channel.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_reply_suppression.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_repository_hygiene.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_result_images.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_resume_channel.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_retired_deployment.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_schedule_auto_archive_migration.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_schedule_card_retry.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_schedule_cards.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_schedule_run_now.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_schedule_service.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_schedule_trigger_cards.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_schedule_workspace_migration.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_schedule_workspace_service.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_schedule_workspace_storage.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_scheduled_auto_archive.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_scheduled_worktrees.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_scheduler_presenter.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_service_launcher.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_session_card_pages.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_session_defaults.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_session_defaults_migration.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_session_id_cards.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_session_policy.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_session_settings.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_settings_projects.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_status_cards.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_suppress_reply.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_task_text.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_terminal_cleanup.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_thread_history.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_thread_naming.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_turn_activity.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_turn_files.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_turn_patch_children.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_turn_patch_statistics.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_turn_plan_observer.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_update_executor.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_usage_card.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_usage_control.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_user_guide_skill.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_user_questions.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_worktree_channel_cwd.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_worktree_git.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_worktree_new.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_worktree_settings.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_worktree_storage.py +0 -0
- {netizen_cli-0.15.2 → netizen_cli-0.16.0}/tests/test_worktree_tools_integration.py +0 -0
|
@@ -58,3 +58,9 @@ adminWeb:
|
|
|
58
58
|
# Administrator membership: <NETIZEN_ROOT>/state/admin-users.json
|
|
59
59
|
# Private user credentials: <NETIZEN_ROOT>/credentials/admin-user-tokens.json
|
|
60
60
|
# Admin browser sessions stay in memory and require login after service restart.
|
|
61
|
+
|
|
62
|
+
# 群聊准入:默认全部群聊;only 仅在名单中的群执行,单聊不受影响。
|
|
63
|
+
# 名单最多 1000 个精确 chat ID,all 模式仍保留名单。
|
|
64
|
+
groupAccess:
|
|
65
|
+
mode: all
|
|
66
|
+
chatIds: []
|
|
@@ -20,7 +20,7 @@ from collections import deque
|
|
|
20
20
|
from collections.abc import Callable
|
|
21
21
|
from dataclasses import dataclass, field, fields, is_dataclass
|
|
22
22
|
from enum import Enum
|
|
23
|
-
from typing import Generic, TypeVar
|
|
23
|
+
from typing import Generic, TypeVar
|
|
24
24
|
|
|
25
25
|
from .users import AdminIdentity, AdminUsers, AdminUsersUnavailable
|
|
26
26
|
|
|
@@ -616,7 +616,7 @@ class AdminAuth:
|
|
|
616
616
|
session_log_handle=session.log_handle,
|
|
617
617
|
generation=self._generation,
|
|
618
618
|
action_kind=record.action_kind,
|
|
619
|
-
target=
|
|
619
|
+
target=record.target,
|
|
620
620
|
preconditions=record.preconditions,
|
|
621
621
|
identity=session.identity,
|
|
622
622
|
add_revision=session.add_revision,
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
import logging
|
|
5
6
|
import asyncio
|
|
7
|
+
import hashlib
|
|
6
8
|
import math
|
|
7
9
|
import time
|
|
8
10
|
from contextlib import asynccontextmanager
|
|
@@ -12,10 +14,14 @@ from typing import Callable
|
|
|
12
14
|
|
|
13
15
|
from .feishu import AuthExpired, FeishuClient, UserProfile, UserTokens
|
|
14
16
|
from .users import (
|
|
15
|
-
AdminIdentity, AdminUsers, AdminUsersUnavailable, PrivateJSONError,
|
|
17
|
+
AdminIdentity, AdminUsers, AdminUsersUnavailable, PrivateJSONError,
|
|
18
|
+
delete_private_json, read_private_json, write_private_json,
|
|
16
19
|
)
|
|
17
20
|
|
|
18
21
|
|
|
22
|
+
logger = logging.getLogger(__name__)
|
|
23
|
+
|
|
24
|
+
|
|
19
25
|
@dataclass(frozen=True)
|
|
20
26
|
class _Credential:
|
|
21
27
|
add_revision: int
|
|
@@ -23,11 +29,22 @@ class _Credential:
|
|
|
23
29
|
refresh_attempted: bool = False
|
|
24
30
|
|
|
25
31
|
|
|
32
|
+
def credential_path(root: Path, identity: AdminIdentity) -> Path:
|
|
33
|
+
"""Stable, bounded filename for the exact application/user identity."""
|
|
34
|
+
digest = hashlib.sha256(f"{identity.app_id}\n{identity.open_id}".encode("utf-8")).hexdigest()
|
|
35
|
+
return root / "credentials" / f"admin-user-{digest}.json"
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def _token(value: object) -> bool:
|
|
39
|
+
return isinstance(value, str) and bool(value) and not any(ord(c) < 32 or ord(c) == 127 for c in value)
|
|
40
|
+
|
|
41
|
+
|
|
26
42
|
class AdminCredentials:
|
|
27
|
-
"""
|
|
43
|
+
"""On-demand private credentials, with single-flight per-user renewal.
|
|
28
44
|
|
|
29
45
|
All asynchronous calls belong to the Admin event loop. The roster's lock
|
|
30
46
|
protects membership checks and durable commits; no network call holds it.
|
|
47
|
+
Tokens live only in the operation using them, never in a resident cache.
|
|
31
48
|
"""
|
|
32
49
|
|
|
33
50
|
def __init__(self, root: Path, users: AdminUsers, client: FeishuClient,
|
|
@@ -35,73 +52,56 @@ class AdminCredentials:
|
|
|
35
52
|
self.users = users
|
|
36
53
|
self.client = client
|
|
37
54
|
self._clock = clock
|
|
38
|
-
self.
|
|
39
|
-
self._records: dict[AdminIdentity, _Credential] = {}
|
|
55
|
+
self._root = root
|
|
40
56
|
self._locks: dict[AdminIdentity, tuple[asyncio.Lock, int]] = {}
|
|
41
57
|
self._closed = False
|
|
42
|
-
self._load()
|
|
43
58
|
users.subscribe_revocation(self._revoke)
|
|
44
59
|
|
|
45
|
-
def
|
|
46
|
-
data = read_private_json(self.
|
|
60
|
+
def _read(self, identity: AdminIdentity) -> _Credential | None:
|
|
61
|
+
data = read_private_json(credential_path(self._root, identity), missing_ok=True, maximum=None)
|
|
47
62
|
if data is None:
|
|
48
|
-
return
|
|
63
|
+
return None
|
|
49
64
|
try:
|
|
50
|
-
if set(data) != {
|
|
65
|
+
if (set(data) != {
|
|
66
|
+
"version", "appId", "openId", "addRevision", "accessToken", "refreshToken",
|
|
67
|
+
"expiresAt", "refreshExpiresAt", "scopes", "refreshAttempted",
|
|
68
|
+
} or type(data["version"]) is not int or data["version"] != 1
|
|
69
|
+
or AdminIdentity(data["appId"], data["openId"]) != identity):
|
|
51
70
|
raise ValueError
|
|
52
|
-
|
|
71
|
+
revision = data["addRevision"]
|
|
72
|
+
if type(revision) is not int or revision < 1 or type(data["refreshAttempted"]) is not bool:
|
|
53
73
|
raise ValueError
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
if identity.open_id in seen:
|
|
63
|
-
raise ValueError
|
|
64
|
-
seen.add(identity.open_id)
|
|
65
|
-
revision = row["addRevision"]
|
|
66
|
-
if type(revision) is not int or revision < 1 or type(row["refreshAttempted"]) is not bool:
|
|
67
|
-
raise ValueError
|
|
68
|
-
if not isinstance(row["accessToken"], str) or not row["accessToken"] or len(row["accessToken"]) > 16384:
|
|
69
|
-
raise ValueError
|
|
70
|
-
refresh = row["refreshToken"]
|
|
71
|
-
if refresh is not None and (not isinstance(refresh, str) or not refresh or len(refresh) > 16384):
|
|
72
|
-
raise ValueError
|
|
73
|
-
for key in ("expiresAt", "refreshExpiresAt"):
|
|
74
|
-
value = row[key]
|
|
75
|
-
if value is None and key == "refreshExpiresAt":
|
|
76
|
-
continue
|
|
77
|
-
if type(value) not in (int, float) or not math.isfinite(value) or value <= 0:
|
|
78
|
-
raise ValueError
|
|
79
|
-
scopes = row["scopes"]
|
|
80
|
-
if not isinstance(scopes, list) or len(scopes) > 256 or any(not isinstance(s, str) or not s or len(s) > 256 for s in scopes):
|
|
74
|
+
refresh = data["refreshToken"]
|
|
75
|
+
if not _token(data["accessToken"]) or (refresh is not None and not _token(refresh)):
|
|
76
|
+
raise ValueError
|
|
77
|
+
for key in ("expiresAt", "refreshExpiresAt"):
|
|
78
|
+
value = data[key]
|
|
79
|
+
if value is None and key == "refreshExpiresAt":
|
|
80
|
+
continue
|
|
81
|
+
if type(value) not in (int, float) or not math.isfinite(value) or value <= 0:
|
|
81
82
|
raise ValueError
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
83
|
+
scopes = data["scopes"]
|
|
84
|
+
if not isinstance(scopes, list) or any(not isinstance(s, str) or not s for s in scopes):
|
|
85
|
+
raise ValueError
|
|
86
|
+
return _Credential(revision, UserTokens(
|
|
87
|
+
access_token=data["accessToken"], refresh_token=refresh,
|
|
88
|
+
expires_at=data["expiresAt"], refresh_expires_at=data["refreshExpiresAt"],
|
|
89
|
+
scopes=tuple(scopes),
|
|
90
|
+
), data["refreshAttempted"])
|
|
91
|
+
except (ValueError, TypeError, KeyError, OverflowError):
|
|
90
92
|
raise PrivateJSONError() from None
|
|
91
93
|
|
|
92
|
-
def _write(self,
|
|
93
|
-
write_private_json(self.
|
|
94
|
-
"version": 1, "appId":
|
|
95
|
-
"
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
} for identity, record in sorted(records.items(), key=lambda item: item[0].open_id)],
|
|
104
|
-
})
|
|
94
|
+
def _write(self, identity: AdminIdentity, record: _Credential) -> None:
|
|
95
|
+
write_private_json(credential_path(self._root, identity), {
|
|
96
|
+
"version": 1, "appId": identity.app_id, "openId": identity.open_id,
|
|
97
|
+
"addRevision": record.add_revision,
|
|
98
|
+
"accessToken": record.tokens.access_token,
|
|
99
|
+
"refreshToken": record.tokens.refresh_token,
|
|
100
|
+
"expiresAt": record.tokens.expires_at,
|
|
101
|
+
"refreshExpiresAt": record.tokens.refresh_expires_at,
|
|
102
|
+
"scopes": list(record.tokens.scopes),
|
|
103
|
+
"refreshAttempted": record.refresh_attempted,
|
|
104
|
+
}, maximum=None)
|
|
105
105
|
|
|
106
106
|
def _member(self, identity: AdminIdentity, revision: int) -> None:
|
|
107
107
|
member = self.users.get_membership(identity)
|
|
@@ -130,25 +130,19 @@ class AdminCredentials:
|
|
|
130
130
|
self._member(identity, expected_add_revision)
|
|
131
131
|
if not is_current():
|
|
132
132
|
raise AuthExpired("auth_expired", "本次登录已失效。")
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
self._write(updated)
|
|
137
|
-
except Exception:
|
|
138
|
-
# The rename may have committed. Never refresh an older
|
|
139
|
-
# in-memory RT when the persisted version is uncertain.
|
|
140
|
-
old = self._records.get(identity)
|
|
141
|
-
if old is not None:
|
|
142
|
-
self._records[identity] = _Credential(old.add_revision, old.tokens, True)
|
|
143
|
-
raise
|
|
144
|
-
self._records = updated
|
|
133
|
+
# There is no older cached pair to invalidate on an uncertain
|
|
134
|
+
# write: the next operation re-reads the actual private file.
|
|
135
|
+
self._write(identity, _Credential(expected_add_revision, tokens))
|
|
145
136
|
|
|
146
137
|
async def access_token(self, identity: AdminIdentity, add_revision: int, *, force_refresh: bool = False,
|
|
147
138
|
rejected_token: str | None = None) -> str:
|
|
148
139
|
async with self._single_user(identity):
|
|
149
140
|
with self.users.lock:
|
|
150
141
|
self._member(identity, add_revision)
|
|
151
|
-
|
|
142
|
+
try:
|
|
143
|
+
record = self._read(identity)
|
|
144
|
+
except PrivateJSONError:
|
|
145
|
+
raise AuthExpired("auth_expired", "飞书凭证不可用,请重新登录。") from None
|
|
152
146
|
if record is None or record.add_revision != add_revision:
|
|
153
147
|
raise AuthExpired("auth_expired", "请重新登录。")
|
|
154
148
|
tokens = record.tokens
|
|
@@ -160,27 +154,35 @@ class AdminCredentials:
|
|
|
160
154
|
tokens.refresh_expires_at is not None and tokens.refresh_expires_at <= self._clock()
|
|
161
155
|
):
|
|
162
156
|
raise AuthExpired("auth_expired", "飞书凭证已过期,请重新登录。")
|
|
157
|
+
stage = "refresh_reservation"
|
|
163
158
|
try:
|
|
164
159
|
with self.users.lock:
|
|
165
160
|
self._member(identity, add_revision)
|
|
166
161
|
record = _Credential(add_revision, tokens, True)
|
|
167
|
-
self._records[identity] = record
|
|
168
162
|
# Persist before sending: timeout/cancellation/restart may
|
|
169
163
|
# otherwise consume the same single-use refresh token twice.
|
|
170
|
-
self._write(
|
|
164
|
+
self._write(identity, record)
|
|
165
|
+
stage = "refresh_request"
|
|
171
166
|
renewed = await self.client.refresh(tokens.refresh_token)
|
|
167
|
+
stage = "persist_refreshed_credentials"
|
|
172
168
|
with self.users.lock:
|
|
173
169
|
self._member(identity, add_revision)
|
|
174
|
-
if self.
|
|
170
|
+
if self._read(identity) != record:
|
|
175
171
|
raise AuthExpired("auth_expired", "飞书凭证已变化,请重新登录。")
|
|
176
|
-
|
|
177
|
-
updated[identity] = _Credential(add_revision, renewed)
|
|
178
|
-
self._write(updated)
|
|
179
|
-
self._records = updated
|
|
172
|
+
self._write(identity, _Credential(add_revision, renewed))
|
|
180
173
|
return renewed.access_token
|
|
181
174
|
except asyncio.CancelledError:
|
|
182
175
|
raise
|
|
183
|
-
except Exception:
|
|
176
|
+
except Exception as diagnostic_error:
|
|
177
|
+
logger.warning(
|
|
178
|
+
"administrator credential refresh or persistence failed",
|
|
179
|
+
extra={
|
|
180
|
+
"stage": stage,
|
|
181
|
+
"app_id": identity.app_id,
|
|
182
|
+
"open_id": identity.open_id,
|
|
183
|
+
"error_type": type(diagnostic_error).__name__,
|
|
184
|
+
},
|
|
185
|
+
)
|
|
184
186
|
# Deliberately one expiry path; do not delete the shared
|
|
185
187
|
# credential or coordinate other browsers on refresh failure.
|
|
186
188
|
raise AuthExpired("auth_expired", "飞书凭证已过期,请重新登录。") from None
|
|
@@ -216,18 +218,15 @@ class AdminCredentials:
|
|
|
216
218
|
return result
|
|
217
219
|
|
|
218
220
|
def _revoke(self, identity: AdminIdentity) -> None:
|
|
219
|
-
# Invoked
|
|
220
|
-
#
|
|
221
|
+
# Invoked under the roster lock after removal. Membership is already
|
|
222
|
+
# revoked even if cleanup fails; re-addition gets a new incarnation.
|
|
221
223
|
try:
|
|
222
224
|
self.users.get_membership(identity)
|
|
223
225
|
except AdminUsersUnavailable:
|
|
224
226
|
# A roster IO failure closes authorization, but is not an explicit
|
|
225
227
|
# deletion of every user's durable credential. Preserve disk state.
|
|
226
228
|
return
|
|
227
|
-
|
|
228
|
-
del self._records[identity]
|
|
229
|
-
self._write(self._records)
|
|
229
|
+
delete_private_json(credential_path(self._root, identity))
|
|
230
230
|
|
|
231
231
|
def close(self) -> None:
|
|
232
232
|
self._closed = True
|
|
233
|
-
self._records.clear() # Restart intentionally does not touch disk.
|
|
@@ -8,6 +8,7 @@ storage, refresh serialization, browser sessions, and authorization decisions.
|
|
|
8
8
|
"""
|
|
9
9
|
from __future__ import annotations
|
|
10
10
|
|
|
11
|
+
import logging
|
|
11
12
|
import asyncio
|
|
12
13
|
from collections.abc import Callable
|
|
13
14
|
from dataclasses import dataclass, field
|
|
@@ -25,11 +26,13 @@ import httpx
|
|
|
25
26
|
from ..feishu_app_onboarding import REQUIRED_USER_SCOPES
|
|
26
27
|
|
|
27
28
|
|
|
29
|
+
logger = logging.getLogger(__name__)
|
|
30
|
+
|
|
31
|
+
|
|
28
32
|
_DEVICE_URL = "https://accounts.feishu.cn/oauth/v1/device_authorization"
|
|
29
33
|
_TOKEN_URL = "https://accounts.feishu.cn/oauth/v3/token"
|
|
30
34
|
_TICKET_URL = "https://open.feishu.cn/open-apis/jssdk/ticket/get"
|
|
31
35
|
_OPEN_ID = re.compile(r"ou_[A-Za-z0-9_-]{1,256}\Z")
|
|
32
|
-
_MAX_RESPONSE_BYTES = 65_536
|
|
33
36
|
|
|
34
37
|
|
|
35
38
|
class FeishuError(RuntimeError):
|
|
@@ -79,8 +82,8 @@ def _invalid_response() -> FeishuError:
|
|
|
79
82
|
return FeishuError("upstream_format", "飞书返回的数据不完整或格式不正确。")
|
|
80
83
|
|
|
81
84
|
|
|
82
|
-
def _string(value: object, *, maximum: int = 8192) -> str:
|
|
83
|
-
if (not isinstance(value, str) or not value or len(value) > maximum
|
|
85
|
+
def _string(value: object, *, maximum: int | None = 8192) -> str:
|
|
86
|
+
if (not isinstance(value, str) or not value or (maximum is not None and len(value) > maximum)
|
|
84
87
|
or any(ord(character) < 32 or ord(character) == 127 for character in value)):
|
|
85
88
|
raise _invalid_response()
|
|
86
89
|
return value
|
|
@@ -144,8 +147,6 @@ class FeishuClient:
|
|
|
144
147
|
response = await self._http.post(
|
|
145
148
|
url, timeout=self._timeout, follow_redirects=False, **kwargs,
|
|
146
149
|
)
|
|
147
|
-
if len(response.content) > _MAX_RESPONSE_BYTES:
|
|
148
|
-
raise _invalid_response()
|
|
149
150
|
payload = response.json()
|
|
150
151
|
except (httpx.HTTPError, TimeoutError):
|
|
151
152
|
raise FeishuError("upstream_unavailable", "暂时无法连接飞书,请稍后重试。") from None
|
|
@@ -200,15 +201,15 @@ class FeishuClient:
|
|
|
200
201
|
def _tokens(data: dict[str, Any]) -> UserTokens:
|
|
201
202
|
if _string(data.get("token_type")).lower() != "bearer":
|
|
202
203
|
raise _invalid_response()
|
|
203
|
-
access_token = _string(data.get("access_token"))
|
|
204
|
+
access_token = _string(data.get("access_token"), maximum=None)
|
|
204
205
|
lifetime = _seconds(data.get("expires_in"))
|
|
205
206
|
refresh_token = data.get("refresh_token")
|
|
206
207
|
refresh_lifetime = None
|
|
207
208
|
if refresh_token is not None:
|
|
208
|
-
refresh_token = _string(refresh_token)
|
|
209
|
+
refresh_token = _string(refresh_token, maximum=None)
|
|
209
210
|
refresh_lifetime = _seconds(data.get("refresh_token_expires_in"))
|
|
210
211
|
scope = data.get("scope", "")
|
|
211
|
-
if not isinstance(scope, str)
|
|
212
|
+
if not isinstance(scope, str):
|
|
212
213
|
raise _invalid_response()
|
|
213
214
|
now = time.time()
|
|
214
215
|
return UserTokens(
|
|
@@ -225,7 +226,9 @@ class FeishuClient:
|
|
|
225
226
|
if self._sdk is None:
|
|
226
227
|
self._sdk = (Client.builder().app_id(self.app_id).app_secret(self._app_secret)
|
|
227
228
|
.enable_set_token(True).timeout(self._timeout).build())
|
|
228
|
-
option = RequestOption.builder().user_access_token(
|
|
229
|
+
option = RequestOption.builder().user_access_token(
|
|
230
|
+
_string(access_token, maximum=None),
|
|
231
|
+
).build()
|
|
229
232
|
try:
|
|
230
233
|
async with asyncio.timeout(self._timeout):
|
|
231
234
|
result = await self._sdk.authen.v1.user_info.aget(
|
|
@@ -233,7 +236,11 @@ class FeishuClient:
|
|
|
233
236
|
)
|
|
234
237
|
except (httpx.HTTPError, TimeoutError):
|
|
235
238
|
raise FeishuError("upstream_unavailable", "暂时无法连接飞书,请稍后重试。") from None
|
|
236
|
-
except Exception:
|
|
239
|
+
except Exception as diagnostic_error:
|
|
240
|
+
logger.warning(
|
|
241
|
+
"administrator user-info lookup failed",
|
|
242
|
+
extra={"app_id": self.app_id, "error_type": type(diagnostic_error).__name__},
|
|
243
|
+
)
|
|
237
244
|
# SDK decoding errors may include the upstream body or token.
|
|
238
245
|
raise _invalid_response() from None
|
|
239
246
|
raw = getattr(result, "raw", None)
|
|
@@ -260,7 +267,8 @@ class FeishuClient:
|
|
|
260
267
|
# No retries: a lost response can already have consumed the one-use RT.
|
|
261
268
|
status, data = await self._request(_TOKEN_URL, json={
|
|
262
269
|
"client_id": self.app_id, "client_secret": self._app_secret,
|
|
263
|
-
"grant_type": "refresh_token",
|
|
270
|
+
"grant_type": "refresh_token",
|
|
271
|
+
"refresh_token": _string(refresh_token, maximum=None),
|
|
264
272
|
})
|
|
265
273
|
self._require_success(status, data)
|
|
266
274
|
return self._tokens(data)
|
|
@@ -279,7 +287,8 @@ class FeishuClient:
|
|
|
279
287
|
# The ordinary web component signs the URL without query or fragment.
|
|
280
288
|
signed_url = urlunsplit(parsed._replace(query="", fragment=""))
|
|
281
289
|
status, data = await self._request(
|
|
282
|
-
_TICKET_URL,
|
|
290
|
+
_TICKET_URL,
|
|
291
|
+
headers={"Authorization": "Bearer " + _string(access_token, maximum=None)},
|
|
283
292
|
)
|
|
284
293
|
self._require_success(status, data, api=True)
|
|
285
294
|
ticket_data = data.get("data")
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
import logging
|
|
5
6
|
import asyncio
|
|
6
7
|
from collections import deque
|
|
7
8
|
import hashlib
|
|
@@ -16,6 +17,9 @@ from .feishu import AuthExpired, DeviceChallenge, FeishuClient, FeishuError, Slo
|
|
|
16
17
|
from .users import AdminIdentity, AdminUsers
|
|
17
18
|
|
|
18
19
|
|
|
20
|
+
logger = logging.getLogger(__name__)
|
|
21
|
+
|
|
22
|
+
|
|
19
23
|
_START_WINDOW = 300
|
|
20
24
|
_STARTS_PER_SOURCE = 5
|
|
21
25
|
_STARTS_GLOBAL = 20
|
|
@@ -162,6 +166,10 @@ class AdminLogin:
|
|
|
162
166
|
except asyncio.CancelledError:
|
|
163
167
|
raise
|
|
164
168
|
except Exception as error:
|
|
169
|
+
logger.warning(
|
|
170
|
+
"administrator login polling failed",
|
|
171
|
+
extra={"error_type": type(error).__name__},
|
|
172
|
+
)
|
|
165
173
|
if self._current(key, attempt):
|
|
166
174
|
code = error.code if isinstance(error, FeishuError) else "login_failed"
|
|
167
175
|
attempt.state = "denied" if code in {"access_denied", "not_administrator"} else (
|
|
@@ -181,7 +189,11 @@ class AdminLogin:
|
|
|
181
189
|
# Deletion/re-addition cannot reissue a stale browser session.
|
|
182
190
|
try:
|
|
183
191
|
self.auth.authenticate(attempt.session_token)
|
|
184
|
-
except Exception:
|
|
192
|
+
except Exception as diagnostic_error:
|
|
193
|
+
logger.warning(
|
|
194
|
+
"administrator login session validation failed",
|
|
195
|
+
extra={"error_type": type(diagnostic_error).__name__},
|
|
196
|
+
)
|
|
185
197
|
attempt.session_token = None
|
|
186
198
|
attempt.state = "expired"
|
|
187
199
|
return self._state(attempt), attempt.session_token
|
|
@@ -8,7 +8,8 @@ from enum import Enum
|
|
|
8
8
|
from typing import Any
|
|
9
9
|
from zoneinfo import ZoneInfo
|
|
10
10
|
|
|
11
|
-
from ..feishu_links import chat_open_url
|
|
11
|
+
from ..feishu_links import chat_open_url
|
|
12
|
+
from ..feishu_links import topic_open_url as _topic_open_url # noqa: F401 - re-exported for admin.web
|
|
12
13
|
from ..runtime.contracts import (
|
|
13
14
|
ReleaseDisposition,
|
|
14
15
|
StopDisposition,
|
|
@@ -141,7 +142,7 @@ def _stop_disposition_message(disposition: StopDisposition) -> str:
|
|
|
141
142
|
return {
|
|
142
143
|
StopDisposition.NOT_RUNNING: "该会话当前没有运行任务。",
|
|
143
144
|
StopDisposition.REQUESTED: (
|
|
144
|
-
"
|
|
145
|
+
"已请求中断这一轮 Codex 任务;确认终态前仍会显示为停止中。"
|
|
145
146
|
),
|
|
146
147
|
StopDisposition.STOPPING: (
|
|
147
148
|
"该会话正在停止;已再次尝试完成中断与终端清理。"
|
|
@@ -162,13 +163,13 @@ def _stop_disposition_message(disposition: StopDisposition) -> str:
|
|
|
162
163
|
def _release_disposition_message(disposition: ReleaseDisposition) -> str:
|
|
163
164
|
return {
|
|
164
165
|
ReleaseDisposition.NOT_MATERIALIZED: (
|
|
165
|
-
"
|
|
166
|
+
"该会话尚未开始,没有 Codex 会话订阅可释放。"
|
|
166
167
|
),
|
|
167
168
|
ReleaseDisposition.NOT_SUBSCRIBED: (
|
|
168
|
-
"本进程当前没有该 Thread
|
|
169
|
+
"本进程当前没有该 Thread 的订阅;会话与 Codex 历史均保留。"
|
|
169
170
|
),
|
|
170
171
|
ReleaseDisposition.RELEASED: (
|
|
171
|
-
"已取消本进程对该 Thread
|
|
172
|
+
"已取消本进程对该 Thread 的订阅;会话与 Codex 历史均保留,"
|
|
172
173
|
"下次消息仍会 resume 同一 Thread。"
|
|
173
174
|
),
|
|
174
175
|
}[disposition]
|
|
@@ -72,6 +72,7 @@ function expireAdminSession() {
|
|
|
72
72
|
if (notice) notice.hidden = false;
|
|
73
73
|
window.NetizenIdentity?.expire();
|
|
74
74
|
window.NetizenSessionAccess?.expire();
|
|
75
|
+
window.NetizenGroupAccess?.expire();
|
|
75
76
|
window.NetizenProgressCard?.expire();
|
|
76
77
|
window.NetizenQuestionNotifications?.expire();
|
|
77
78
|
window.NetizenWorktrees?.expire();
|
|
@@ -578,7 +579,7 @@ function confirmMaterializedDelete(session) {
|
|
|
578
579
|
const name = session.nativeTitle || "未命名 Session";
|
|
579
580
|
return window.confirm(
|
|
580
581
|
`确认永久删除这个会话?\n\n会话:${name}\nScope:${session.scopeKey}\nNetizen 会话编号:${session.shortId}`
|
|
581
|
-
+ "\n\
|
|
582
|
+
+ "\n\nCodex 会话、派生会话、Codex App/CLI 历史和 Netizen 中的会话记录都会永久消失,无法恢复。",
|
|
582
583
|
);
|
|
583
584
|
}
|
|
584
585
|
|
|
@@ -739,8 +740,8 @@ async function deleteProject(project) {
|
|
|
739
740
|
+ `\n已删除 ${result.deletedSessionCount} 个 Session;剩余 ${result.remainingSessionCount} 个 Session、${result.remainingSideCount} 个 Side。`
|
|
740
741
|
+ (result.message ? `\n${result.message}` : "");
|
|
741
742
|
details = (result.remainingSessions || []).map((session) =>
|
|
742
|
-
`Session ${session.shortId} · Scope ${session.scopeKey} ·
|
|
743
|
-
if (result.failedBindingId) details.push(
|
|
743
|
+
`Session ${session.shortId} · Scope ${session.scopeKey} · Netizen 会话编号 ${session.bindingId}`);
|
|
744
|
+
if (result.failedBindingId) details.push(`未确认删除的会话:${result.failedBindingId}`);
|
|
744
745
|
if (result.failedSideId) details.push(`未确认收尾的 Side:${result.failedSideId}`);
|
|
745
746
|
}
|
|
746
747
|
if (result.deletedPlanCount) {
|
|
@@ -1901,7 +1902,7 @@ function catalogStateLabel(value) {
|
|
|
1901
1902
|
archived: "已归档",
|
|
1902
1903
|
lazy: "Lazy",
|
|
1903
1904
|
unknown: "状态未确认",
|
|
1904
|
-
missing: "
|
|
1905
|
+
missing: "Codex 会话缺失",
|
|
1905
1906
|
}[value] || value;
|
|
1906
1907
|
}
|
|
1907
1908
|
|
|
@@ -1965,7 +1966,7 @@ function sessionIdentityCell(row, session) {
|
|
|
1965
1966
|
summary.textContent = "会话标识";
|
|
1966
1967
|
details.append(summary);
|
|
1967
1968
|
for (const [label, value] of [["飞书聊天 ID(位置)", session.chatId], ["飞书话题 ID(位置)", session.topicId],
|
|
1968
|
-
["Netizen
|
|
1969
|
+
["Netizen 会话编号(管理与切换)", session.bindingId],
|
|
1969
1970
|
["Codex 会话 ID(Thread ID,跨会话工具)", session.nativeThreadId]]) {
|
|
1970
1971
|
if (!value) continue;
|
|
1971
1972
|
const field = document.createElement("label");
|
|
@@ -2075,7 +2076,7 @@ function renderSessionSort(kind) {
|
|
|
2075
2076
|
const labelNode = button.querySelector(".sort-label");
|
|
2076
2077
|
if (labelNode) {
|
|
2077
2078
|
labelNode.textContent = label;
|
|
2078
|
-
button.title = lazy ? "Netizen 登记时间;此时尚无 Codex 创建时间" : "Codex
|
|
2079
|
+
button.title = lazy ? "Netizen 登记时间;此时尚无 Codex 创建时间" : "Codex 会话创建时间,与创建时间筛选口径一致;按浏览器本地时区显示";
|
|
2079
2080
|
}
|
|
2080
2081
|
button.parentElement.setAttribute("aria-sort", selected ? descending ? "descending" : "ascending" : "none");
|
|
2081
2082
|
button.setAttribute("aria-label", `按${label}${descending ? "由远及近" : "由近及远"}排序`
|
|
@@ -2544,7 +2545,7 @@ function wireSessionActions(actions, session) {
|
|
|
2544
2545
|
const button = actionButton("配置", () => openSessionSettingsEditor(session, button));
|
|
2545
2546
|
actions.append(button);
|
|
2546
2547
|
}
|
|
2547
|
-
if (a.stop) actions.append(actionButton("停止", () => window.confirm("
|
|
2548
|
+
if (a.stop) actions.append(actionButton("停止", () => window.confirm("停止这个会话的当前运行?") && mutate("/api/v1/sessions/stop", a.stop), true));
|
|
2548
2549
|
if (a.activate) actions.append(actionButton("设为当前", () => mutate("/api/v1/sessions/activate", a.activate)));
|
|
2549
2550
|
if (a.rename) {
|
|
2550
2551
|
const button = actionButton("重命名", () => openSessionRenameEditor(session, button));
|
|
@@ -2553,7 +2554,7 @@ function wireSessionActions(actions, session) {
|
|
|
2553
2554
|
if (a.archive) actions.append(actionButton("归档", () => window.confirm("确认归档?") && mutate("/api/v1/sessions/archive", a.archive), true));
|
|
2554
2555
|
if (a.unarchive) actions.append(actionButton("恢复", () => mutate("/api/v1/sessions/unarchive", a.unarchive, { actionKind: a.unarchive.actionKind })));
|
|
2555
2556
|
if (a.unarchiveCurrent) actions.append(actionButton("恢复并设为当前", () => mutate("/api/v1/sessions/unarchive", a.unarchiveCurrent, { actionKind: a.unarchiveCurrent.actionKind })));
|
|
2556
|
-
if (a.deleteLazy) secondary.append(actionButton("删除 Lazy", () => window.confirm("
|
|
2557
|
+
if (a.deleteLazy) secondary.append(actionButton("删除 Lazy", () => window.confirm("永久删除这个尚未开始的会话?") && mutate("/api/v1/sessions/delete-lazy", a.deleteLazy), true));
|
|
2557
2558
|
if (a.deleteMaterialized) secondary.append(actionButton("删除", () => confirmMaterializedDelete(session) && mutate("/api/v1/sessions/delete-materialized", a.deleteMaterialized), true));
|
|
2558
2559
|
if (a.release) secondary.append(actionButton("释放订阅", () => window.confirm("释放本进程订阅?历史不会删除。") && mutate("/api/v1/sessions/release", a.release)));
|
|
2559
2560
|
actions.append(more);
|
|
@@ -2578,7 +2579,7 @@ function renderSides(data) {
|
|
|
2578
2579
|
const summary = document.createElement("summary");
|
|
2579
2580
|
summary.textContent = "标识详情";
|
|
2580
2581
|
details.append(summary);
|
|
2581
|
-
for (const [label, value] of [["Side", side.sideId], ["
|
|
2582
|
+
for (const [label, value] of [["Side", side.sideId], ["来源会话", side.parentBindingId],
|
|
2582
2583
|
["Chat", side.chatId], ["Topic", side.topicId], ["Root Message", side.rootMessageId]]) {
|
|
2583
2584
|
if (!value) continue;
|
|
2584
2585
|
const line = document.createElement("div");
|
|
@@ -3553,7 +3554,7 @@ function confirmDiscardChanges(changed) {
|
|
|
3553
3554
|
|
|
3554
3555
|
function hasUnsavedEditors() {
|
|
3555
3556
|
return projectEditorHasChanges() || sessionSettingsHasChanges() || defaultEditorHasChanges() || scheduleEditorHasChanges()
|
|
3556
|
-
|| Boolean(pendingScheduleDraft?.dirty) || Boolean(window.NetizenSessionAccess?.dirty())
|
|
3557
|
+
|| Boolean(pendingScheduleDraft?.dirty) || Boolean(window.NetizenSessionAccess?.dirty()) || Boolean(window.NetizenGroupAccess?.dirty())
|
|
3557
3558
|
|| Boolean(window.NetizenProgressCard?.dirty() || window.NetizenQuestionNotifications?.dirty())
|
|
3558
3559
|
|| Boolean(window.NetizenWorktrees?.dirty());
|
|
3559
3560
|
}
|
|
@@ -3562,7 +3563,7 @@ function hasUnsavedEditors() {
|
|
|
3562
3563
|
// existing fail-closed boundary; this helper never cancels or repeats a POST.
|
|
3563
3564
|
function confirmDiscardEditors() {
|
|
3564
3565
|
if (projectEditor?.saving || sessionSettingsEditor?.saving || sessionRenameEditor?.saving || defaultsBusy || (scheduleEditor && scheduleInput("fields").disabled)
|
|
3565
|
-
|| window.NetizenSessionAccess?.busy() || window.NetizenProgressCard?.busy() || window.NetizenQuestionNotifications?.busy()
|
|
3566
|
+
|| window.NetizenSessionAccess?.busy() || window.NetizenGroupAccess?.busy() || window.NetizenProgressCard?.busy() || window.NetizenQuestionNotifications?.busy()
|
|
3566
3567
|
|| window.NetizenWorktrees?.busy()) return false;
|
|
3567
3568
|
if (!confirmDiscardChanges(hasUnsavedEditors())) return false;
|
|
3568
3569
|
closeProjectEditor({ confirmed: true });
|
|
@@ -3573,6 +3574,7 @@ function confirmDiscardEditors() {
|
|
|
3573
3574
|
if (scheduleEditor) closeScheduleEditor({ confirmed: true });
|
|
3574
3575
|
cancelScheduleSelection({ confirmed: true });
|
|
3575
3576
|
window.NetizenSessionAccess?.discard();
|
|
3577
|
+
window.NetizenGroupAccess?.discard();
|
|
3576
3578
|
window.NetizenProgressCard?.discard();
|
|
3577
3579
|
window.NetizenQuestionNotifications?.discard();
|
|
3578
3580
|
window.NetizenWorktrees?.discard();
|
|
@@ -3623,6 +3625,7 @@ function scheduleRunStatus(status) {
|
|
|
3623
3625
|
released: "调度已收尾", recovery_no_start: "服务恢复,本次未启动",
|
|
3624
3626
|
publishing_unknown: "话题投递待确认", deleted: "执行会话已删除",
|
|
3625
3627
|
initial_start_rejected: "启动被拒绝", publishing_failed: "话题发布失败",
|
|
3628
|
+
group_not_enabled: "目标群尚未启用,请联系实例管理员在 Admin 中启用",
|
|
3626
3629
|
scope_conflict: "话题已有会话,未启动", dispatch_rejected: "未启动",
|
|
3627
3630
|
input_started: "已启动新一轮", input_steered: "已追加当前任务", input_unknown: "输入接收情况待确认",
|
|
3628
3631
|
input_rejected: "输入被拒绝", anchor_failed: "触发消息发送失败", anchor_unknown: "触发消息发送结果待确认",
|
|
@@ -3678,7 +3681,7 @@ function scheduleInheritedWorkspace(plan) {
|
|
|
3678
3681
|
: "工作目录尚未登记"];
|
|
3679
3682
|
if (workspace.worktree_id) labels.push(`worktree:${workspace.worktree_id}`);
|
|
3680
3683
|
labels.push(workspace.native_cwd_unresolved
|
|
3681
|
-
? "
|
|
3684
|
+
? "实际目录由原会话确定,本次未查询 Codex 中的工作目录。" : "执行时沿用原会话的工作目录。");
|
|
3682
3685
|
return labels.join(" · ");
|
|
3683
3686
|
}
|
|
3684
3687
|
|
|
@@ -5111,7 +5114,7 @@ async function refresh(tab, cursor = undefined) {
|
|
|
5111
5114
|
if (tab === "schedules" && await loadSchedules(cursor) === false) return false;
|
|
5112
5115
|
if (tab === "defaults") await loadDefaults();
|
|
5113
5116
|
if (tab === "system") {
|
|
5114
|
-
const results = await Promise.all([window.NetizenIdentity.loadUsers(), window.NetizenSessionAccess?.load(),
|
|
5117
|
+
const results = await Promise.all([window.NetizenIdentity.loadUsers(), window.NetizenSessionAccess?.load(), window.NetizenGroupAccess?.load(),
|
|
5115
5118
|
window.NetizenProgressCard?.load(), window.NetizenQuestionNotifications?.load()]);
|
|
5116
5119
|
if (results.includes(false)) return false;
|
|
5117
5120
|
}
|
|
@@ -5151,6 +5154,7 @@ function selectSystemTab(name) {
|
|
|
5151
5154
|
if (state.authExpired || state.systemTab === name) return;
|
|
5152
5155
|
window.NetizenSelect?.close();
|
|
5153
5156
|
if (state.systemTab === "admins") window.NetizenIdentity?.suspendSelector();
|
|
5157
|
+
else if (state.systemTab === "groups") window.NetizenGroupAccess?.closePickers();
|
|
5154
5158
|
else if (state.systemTab === "access") window.NetizenSessionAccess?.closePickers();
|
|
5155
5159
|
state.systemTab = name;
|
|
5156
5160
|
for (const button of document.querySelectorAll("[data-system-tab]")) {
|