netizen-cli 0.15.3__tar.gz → 0.16.1__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.3/netizen_cli.egg-info → netizen_cli-0.16.1}/PKG-INFO +2 -2
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/config.example.yaml +6 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/__init__.py +1 -1
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/admin/auth.py +2 -2
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/admin/credentials.py +84 -85
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/admin/feishu.py +21 -12
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/admin/login.py +13 -1
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/admin/port_config.py +66 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/admin/presentation.py +6 -5
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/admin/static/admin.js +17 -13
- netizen_cli-0.16.1/netizen_cli/admin/static/config-editor.js +141 -0
- netizen_cli-0.16.1/netizen_cli/admin/static/group-access.js +41 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/admin/static/index.html +26 -3
- netizen_cli-0.16.1/netizen_cli/admin/static/progress-card.js +44 -0
- netizen_cli-0.16.1/netizen_cli/admin/static/question-notifications.js +23 -0
- netizen_cli-0.16.1/netizen_cli/admin/static/session-access.js +49 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/admin/static/worktrees.js +1 -1
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/admin/transport.py +13 -7
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/admin/users.py +37 -7
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/admin/web.py +127 -126
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/attachments.py +14 -4
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/bindings.py +90 -43
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/cards/callbacks.py +2 -2
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/cards/controls.py +17 -17
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/cards/fork.py +4 -4
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/cards/reply.py +5 -6
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/cards/scheduled.py +2 -1
- netizen_cli-0.16.1/netizen_cli/channel/app_values.py +483 -0
- netizen_cli-0.16.1/netizen_cli/channel/base.py +964 -0
- netizen_cli-0.16.1/netizen_cli/channel/card_controls.py +1069 -0
- netizen_cli-0.16.1/netizen_cli/channel/commands.py +698 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/channel/completion_mentions.py +7 -2
- netizen_cli-0.16.1/netizen_cli/channel/constants.py +48 -0
- netizen_cli-0.16.1/netizen_cli/channel/entry.py +265 -0
- netizen_cli-0.16.1/netizen_cli/channel/forks.py +297 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/channel/input_preparation.py +2 -2
- netizen_cli-0.16.1/netizen_cli/channel/presentation.py +878 -0
- netizen_cli-0.16.1/netizen_cli/channel/prompts.py +432 -0
- netizen_cli-0.16.1/netizen_cli/channel/questions.py +324 -0
- netizen_cli-0.16.1/netizen_cli/channel/replies.py +405 -0
- netizen_cli-0.16.1/netizen_cli/channel/schedules.py +644 -0
- netizen_cli-0.16.1/netizen_cli/channel/session_cards.py +364 -0
- netizen_cli-0.16.1/netizen_cli/channel/session_tools.py +456 -0
- netizen_cli-0.16.1/netizen_cli/channel/sides.py +845 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/channel/topics.py +15 -1
- netizen_cli-0.16.1/netizen_cli/channel/turn_files.py +200 -0
- netizen_cli-0.16.1/netizen_cli/channel_app.py +151 -0
- netizen_cli-0.16.1/netizen_cli/chat_access.py +25 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/chat_avatars.py +2 -2
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/cli_data.py +24 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/cli_services.py +1 -1
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/cli_setup.py +9 -1
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/cli_update.py +9 -1
- netizen_cli-0.16.1/netizen_cli/codex_runtime.py +335 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/database_migrations.py +3 -1
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/defaults/service.py +16 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/defaults/store.py +3 -2
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/domain.py +1 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/experience.py +10 -4
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/feishu_app_onboarding.py +11 -1
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/feishu_app_permissions.py +16 -2
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/file_inputs.py +29 -2
- netizen_cli-0.16.1/netizen_cli/group_access.py +73 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/image_inputs.py +1 -1
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/main.py +48 -18
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/management/chat_directory.py +13 -1
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/management/chat_labels.py +1 -1
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/management/service.py +59 -23
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/markdown_images.py +1 -1
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/mcp_transport.py +4 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/message_projection.py +6 -6
- netizen_cli-0.16.1/netizen_cli/migrations/v21.py +39 -0
- netizen_cli-0.16.1/netizen_cli/progress_card_config.py +20 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/projects.py +4 -3
- netizen_cli-0.16.1/netizen_cli/question_notifications.py +40 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/quoted_context.py +2 -2
- netizen_cli-0.16.1/netizen_cli/runtime/activity.py +490 -0
- netizen_cli-0.16.1/netizen_cli/runtime/compaction.py +415 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/runtime/contracts.py +8 -0
- netizen_cli-0.16.1/netizen_cli/runtime/forks.py +239 -0
- netizen_cli-0.16.1/netizen_cli/runtime/goals.py +1190 -0
- netizen_cli-0.16.1/netizen_cli/runtime/lifecycle.py +680 -0
- netizen_cli-0.16.1/netizen_cli/runtime/limits.py +29 -0
- netizen_cli-0.16.1/netizen_cli/runtime/naming.py +266 -0
- netizen_cli-0.16.1/netizen_cli/runtime/native_values.py +243 -0
- netizen_cli-0.16.1/netizen_cli/runtime/observation.py +851 -0
- netizen_cli-0.16.1/netizen_cli/runtime/occupancy.py +226 -0
- netizen_cli-0.16.1/netizen_cli/runtime/queries.py +629 -0
- netizen_cli-0.16.1/netizen_cli/runtime/shutdown.py +212 -0
- netizen_cli-0.16.1/netizen_cli/runtime/sides.py +1260 -0
- netizen_cli-0.16.1/netizen_cli/runtime/state.py +652 -0
- netizen_cli-0.16.1/netizen_cli/runtime/submission.py +1081 -0
- netizen_cli-0.16.1/netizen_cli/runtime/subscriptions.py +509 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/runtime/thread_naming.py +11 -3
- netizen_cli-0.16.1/netizen_cli/runtime/turn_control.py +289 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/schedules/mcp.py +14 -3
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/schedules/models.py +1 -1
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/schedules/scheduler.py +16 -2
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/schedules/service.py +15 -4
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/schedules/store.py +37 -8
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/sdk_gap_adapter.py +26 -7
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/sessions/mcp.py +11 -2
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/sessions/policy.py +14 -49
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/sessions/schema.py +1 -1
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/sessions/service.py +29 -4
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/settings.py +7 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/terminal_cleanup.py +2 -2
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/turn_activity.py +9 -3
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/turn_files.py +8 -5
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/turn_patch_children.py +36 -3
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/turn_plan_observer.py +3 -3
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/worktrees/service.py +9 -6
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/worktrees/settings.py +7 -34
- {netizen_cli-0.15.3 → netizen_cli-0.16.1/netizen_cli.egg-info}/PKG-INFO +2 -2
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli.egg-info/SOURCES.txt +44 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli.egg-info/requires.txt +1 -1
- netizen_cli-0.16.1/pyproject.toml +222 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/skills/netizen-user-guide/SKILL.md +1 -1
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/skills/netizen-user-guide/references/admin.md +44 -18
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/skills/netizen-user-guide/references/commands.md +9 -8
- netizen_cli-0.16.1/skills/netizen-user-guide/references/concepts.md +71 -0
- netizen_cli-0.16.1/skills/netizen-user-guide/references/faq.md +148 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/skills/netizen-user-guide/references/feedback-and-files.md +4 -4
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/skills/netizen-user-guide/references/fork-side-goal.md +3 -3
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/skills/netizen-user-guide/references/messages.md +7 -3
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/skills/netizen-user-guide/references/native-capabilities.md +8 -8
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/skills/netizen-user-guide/references/scheduled-tasks.md +7 -3
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/skills/netizen-user-guide/references/session-collaboration.md +7 -3
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/skills/netizen-user-guide/references/sessions.md +23 -22
- netizen_cli-0.16.1/skills/netizen-user-guide/references/status-and-control.md +89 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_binding_scheduled_channel.py +83 -1
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_bindings.py +61 -1
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_card_error_feedback.py +1 -1
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_cards.py +7 -7
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_channel_app.py +131 -32
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_check_sdk.py +3 -1
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_cli_data.py +103 -6
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_codex_runtime.py +296 -44
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_codex_sdk_capabilities.py +2 -1
- netizen_cli-0.16.1/tests/test_codex_sdk_upgrade_0167.py +148 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_completion_mentions.py +2 -2
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_configuration_publication.py +28 -13
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_cron_chat_targets.py +19 -19
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_database_migrations.py +4 -4
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_defaults_worktree_channel.py +1 -1
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_deployment.py +16 -6
- netizen_cli-0.16.1/tests/test_diff_codex_sdk.py +282 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_domain_experience.py +11 -2
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_fork_cards.py +1 -1
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_goal_reply_separation.py +2 -2
- netizen_cli-0.16.1/tests/test_group_access.py +593 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_latest_answer.py +6 -6
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_main.py +79 -2
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_migration_schema_validation.py +1 -1
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_optional_progress_card_settings_migration.py +1 -1
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_persistent_fork_bindings.py +2 -1
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_persistent_fork_channel.py +2 -2
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_persistent_fork_runtime.py +4 -4
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_progress_card_config.py +4 -6
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_progress_card_settings_migration.py +3 -3
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_project_delete_runtime.py +6 -6
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_project_deletion_storage.py +19 -19
- netizen_cli-0.16.1/tests/test_query_indexes_migration.py +97 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_question_notification_config.py +4 -7
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_question_target_parity.py +15 -11
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_runtime_resume_activation.py +1 -1
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_runtime_thread_naming.py +2 -2
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_schedule_auto_archive_migration.py +4 -4
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_schedule_card_retry.py +20 -20
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_schedule_mcp.py +3 -1
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_schedule_scope_matrix.py +3 -4
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_schedule_service.py +7 -7
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_schedule_workspace_cards.py +1 -1
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_schedule_workspace_migration.py +2 -2
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_schedule_workspace_service.py +4 -4
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_schedule_workspace_storage.py +3 -2
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_scheduled_channel.py +55 -14
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_scheduled_runtime.py +21 -3
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_scheduler.py +74 -3
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_schedules_storage.py +105 -30
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_sdk_gap_adapter.py +1 -1
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_session_collaboration_app.py +94 -2
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_session_defaults.py +2 -2
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_session_defaults_migration.py +3 -3
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_session_external_runtime.py +1 -1
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_session_policy.py +15 -5
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_session_tools.py +19 -1
- netizen_cli-0.16.1/tests/test_sqlite_query_readers.py +114 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_status_commands.py +2 -2
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_terminal_cleanup.py +3 -2
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_turn_activity.py +26 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_turn_files.py +23 -2
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_turn_plan_observer.py +2 -1
- netizen_cli-0.16.1/tests/test_upgrade_regression.py +448 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_worktree_runtime_cwd.py +3 -3
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_worktree_service.py +6 -6
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_worktree_settings.py +4 -4
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_worktree_storage.py +9 -9
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_worktree_tools_integration.py +1 -1
- netizen_cli-0.15.3/netizen_cli/admin/static/progress-card.js +0 -118
- netizen_cli-0.15.3/netizen_cli/admin/static/question-notifications.js +0 -91
- netizen_cli-0.15.3/netizen_cli/admin/static/session-access.js +0 -132
- netizen_cli-0.15.3/netizen_cli/channel_app.py +0 -7177
- netizen_cli-0.15.3/netizen_cli/codex_runtime.py +0 -8386
- netizen_cli-0.15.3/netizen_cli/progress_card_config.py +0 -45
- netizen_cli-0.15.3/netizen_cli/question_notifications.py +0 -64
- netizen_cli-0.15.3/pyproject.toml +0 -38
- netizen_cli-0.15.3/skills/netizen-user-guide/references/concepts.md +0 -51
- netizen_cli-0.15.3/skills/netizen-user-guide/references/faq.md +0 -131
- netizen_cli-0.15.3/skills/netizen-user-guide/references/status-and-control.md +0 -86
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/MANIFEST.in +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/README.md +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/_build.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/__main__.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/account_rate_limits.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/admin/__init__.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/admin/answer_previews.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/admin/errors.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/admin/file_previews.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/admin/queries.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/admin/static/admin.css +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/admin/static/attachment-files.js +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/admin/static/chat-picker.css +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/admin/static/chat-picker.js +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/admin/static/content-preview.css +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/admin/static/content-preview.js +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/admin/static/file-browser.js +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/admin/static/identity.js +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/admin/static/login.html +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/admin/static/login.js +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/admin/static/netizen.svg +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/admin/static/project-files.js +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/admin/static/vendor/ace/LICENSE +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/admin/static/vendor/ace/README.md +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/admin/static/vendor/ace/ace.js +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/admin/static/vendor/ace/mode-javascript.js +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/admin/static/vendor/ace/mode-json.js +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/admin/static/vendor/ace/mode-markdown.js +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/admin/static/vendor/ace/mode-python.js +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/builtin_skills.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/cards/__init__.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/cards/chat_target.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/cards/defaults.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/cards/pagination.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/cards/questions.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/cards/session_ids.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/cards/status.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/cards/usage.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/cards/workspace.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/channel/__init__.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/channel/messages.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/channel/ports.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/channel/question_inputs.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/channel/reactions.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/channel/reply_presenter.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/channel/reply_suppression.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/channel/session_pages.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/chat_targets.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/cli.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/cli_packages.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/cli_update_restore.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/cli_update_worker.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/completion_mention.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/defaults/__init__.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/defaults/models.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/deployment/__init__.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/deployment/restart_worker.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/deployment/update_executor.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/deployment/update_protocol.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/error_messages.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/feishu_links.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/git_status.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/instance.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/lark_app.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/management/__init__.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/management/attachment_files.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/management/blocking_io.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/management/coordination.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/management/project_files.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/management/updates.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/message_content.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/message_history.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/message_preparation.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/migrations/__init__.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/migrations/schema.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/migrations/v14.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/migrations/v15.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/migrations/v16.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/migrations/v17.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/migrations/v18.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/migrations/v19.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/migrations/v20.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/model_settings.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/package_resources.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/pagination.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/partial_answers.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/progress_card_settings.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/project_files.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/prompt_projection.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/result_images.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/runtime/__init__.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/runtime/name_writes.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/schedules/__init__.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/service_launcher.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/session_inventory.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/session_settings.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/sessions/__init__.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/sessions/delegation.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/sessions/errors.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/sessions/presentation.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/sessions/sources.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/skill_references.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/task_text.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/thread_history.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/user_questions.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/worktrees/errors.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/worktrees/git.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/worktrees/models.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/worktrees/policy.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli/worktrees/store.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli.egg-info/dependency_links.txt +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli.egg-info/entry_points.txt +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/netizen_cli.egg-info/top_level.txt +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/setup.cfg +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/skills/netizen-lark/SKILL.md +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/skills/netizen-runtime-guidance/SKILL.md +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/skills/netizen-user-guide/references/user-guide.md +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_account_rate_limits.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_admin_update_executor_probe.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_attachments.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_channel_fixtures.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_channel_input_preparation.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_chat_avatars.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_chat_target_cards.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_cli.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_cli_distribution.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_cli_integration.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_cli_packages.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_cli_packaging.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_cli_services.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_cli_setup.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_cli_update.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_codex_sdk_upgrade_0161.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_codex_sdk_upgrade_0163.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_completion_mention_cards.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_completion_topic_delivery.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_defaults_cards.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_defaults_channel.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_defaults_runtime.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_documentation_links.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_error_messages.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_feishu_app_onboarding.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_feishu_app_permissions.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_file_input_channel.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_file_inputs.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_file_pagination.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_git_status.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_image_inputs.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_lark_app.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_lark_sdk_contract.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_markdown_images.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_message_content.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_message_history.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_message_material_inputs.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_message_preparation.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_model_settings.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_name_writes.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_pagination.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_partial_answer_delivery.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_partial_answers.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_probe_child_files.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_probe_feishu_completion_mention.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_probe_feishu_partial_answers.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_probe_feishu_turn_file_card.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_probe_persistent_fork.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_probe_python_sdk.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_probe_scheduled_tasks.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_probe_sdk_completion_race.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_probe_sdk_response_recovery.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_probe_skill_execution.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_probe_thread_naming.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_progress_card_entrypoints.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_progress_card_presentation.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_project_delete_channel.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_project_files.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_prompt_projection.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_question_cards.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_question_channel.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_quoted_context.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_release_script.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_rename_name_channel.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_reply_suppression.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_repository_hygiene.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_result_images.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_resume_channel.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_retired_deployment.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_schedule_cards.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_schedule_run_now.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_schedule_trigger_cards.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_scheduled_auto_archive.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_scheduled_worktrees.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_scheduler_presenter.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_service_launcher.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_session_card_pages.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_session_id_cards.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_session_settings.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_settings_projects.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_status_cards.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_suppress_reply.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_task_text.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_thread_history.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_thread_naming.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_turn_patch_children.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_turn_patch_statistics.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_update_executor.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_usage_card.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_usage_control.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_user_guide_skill.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_user_questions.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_worktree_channel_cwd.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_worktree_git.py +0 -0
- {netizen_cli-0.15.3 → netizen_cli-0.16.1}/tests/test_worktree_new.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: netizen-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.16.1
|
|
4
4
|
Summary: Use native Codex threads through a Feishu Channel.
|
|
5
5
|
Requires-Python: <3.15,>=3.11
|
|
6
6
|
Requires-Dist: h11==0.16.0
|
|
@@ -11,7 +11,7 @@ Requires-Dist: markdown-it-py==4.0.0
|
|
|
11
11
|
Requires-Dist: mdformat==1.0.0
|
|
12
12
|
Requires-Dist: mdformat-gfm==1.0.0
|
|
13
13
|
Requires-Dist: mcp==2.2.0
|
|
14
|
-
Requires-Dist: openai-codex==0.
|
|
14
|
+
Requires-Dist: openai-codex==0.167.0
|
|
15
15
|
Requires-Dist: psutil==7.2.2
|
|
16
16
|
Requires-Dist: pydantic==2.13.4
|
|
17
17
|
Requires-Dist: PyYAML==6.0.3
|
|
@@ -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
|
|
@@ -7,8 +7,11 @@ import os
|
|
|
7
7
|
import stat
|
|
8
8
|
import tempfile
|
|
9
9
|
import threading
|
|
10
|
+
import uuid
|
|
11
|
+
from collections.abc import Callable
|
|
10
12
|
from dataclasses import dataclass, field
|
|
11
13
|
from pathlib import Path
|
|
14
|
+
from typing import Any, Generic, Protocol, TypeVar
|
|
12
15
|
|
|
13
16
|
import yaml
|
|
14
17
|
|
|
@@ -67,6 +70,69 @@ class ConfigFileEditor:
|
|
|
67
70
|
self._snapshot = write_configuration(self._snapshot, loaded)
|
|
68
71
|
|
|
69
72
|
|
|
73
|
+
class ConfigUnavailable(ValueError):
|
|
74
|
+
pass
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
class ConfigConflict(ValueError):
|
|
78
|
+
pass
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
class _SectionValue(Protocol):
|
|
82
|
+
def to_dict(self) -> dict[str, Any]: ...
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
SectionT = TypeVar("SectionT", bound=_SectionValue)
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
class ConfigSection(Generic[SectionT]):
|
|
89
|
+
"""Publish immutable snapshots after serialized writes to the existing YAML."""
|
|
90
|
+
|
|
91
|
+
def __init__(self, value: SectionT, *, section: str, editor: ConfigFileEditor | None,
|
|
92
|
+
conflict_message: str) -> None:
|
|
93
|
+
self._snapshot = (value, uuid.uuid4().hex)
|
|
94
|
+
self._editor, self._section = editor, section
|
|
95
|
+
self._conflict_message = conflict_message
|
|
96
|
+
self._write_lock = threading.Lock()
|
|
97
|
+
|
|
98
|
+
def snapshot(self) -> tuple[SectionT, str]:
|
|
99
|
+
# Readers never wait for file I/O.
|
|
100
|
+
return self._snapshot
|
|
101
|
+
|
|
102
|
+
@property
|
|
103
|
+
def current(self) -> SectionT:
|
|
104
|
+
return self._snapshot[0]
|
|
105
|
+
|
|
106
|
+
@property
|
|
107
|
+
def revision(self) -> str:
|
|
108
|
+
return self._snapshot[1]
|
|
109
|
+
|
|
110
|
+
@property
|
|
111
|
+
def editable(self) -> bool:
|
|
112
|
+
return self._editor is not None
|
|
113
|
+
|
|
114
|
+
def update(self, value: SectionT, *, expected_revision: str) -> None:
|
|
115
|
+
with self._write_lock:
|
|
116
|
+
if expected_revision != self.revision:
|
|
117
|
+
raise ConfigConflict(self._conflict_message)
|
|
118
|
+
self._publish(value)
|
|
119
|
+
|
|
120
|
+
def modify(self, change: Callable[[SectionT], SectionT | None]) -> tuple[SectionT, bool]:
|
|
121
|
+
with self._write_lock:
|
|
122
|
+
value = change(self.current)
|
|
123
|
+
if value is None:
|
|
124
|
+
return self.current, False
|
|
125
|
+
self._publish(value)
|
|
126
|
+
return value, True
|
|
127
|
+
|
|
128
|
+
def _publish(self, value: SectionT) -> None:
|
|
129
|
+
if self._editor is None:
|
|
130
|
+
raise ConfigUnavailable("instance configuration is unavailable")
|
|
131
|
+
self._editor.update_section(self._section, value.to_dict())
|
|
132
|
+
# Every successful save invalidates grants/cursors, even if unchanged.
|
|
133
|
+
self._snapshot = (value, uuid.uuid4().hex)
|
|
134
|
+
|
|
135
|
+
|
|
70
136
|
def _identity(metadata: os.stat_result) -> tuple[int, ...]:
|
|
71
137
|
return (
|
|
72
138
|
metadata.st_dev, metadata.st_ino, metadata.st_mode, metadata.st_size,
|
|
@@ -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]
|