openfic 0.4.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- LICENSE +202 -0
- alembic.ini +147 -0
- app/__init__.py +16 -0
- app/agent_runtime/__init__.py +31 -0
- app/agent_runtime/agents/__init__.py +21 -0
- app/agent_runtime/agents/definitions.py +220 -0
- app/agent_runtime/agents/tool_categories.py +88 -0
- app/agent_runtime/audit/__init__.py +25 -0
- app/agent_runtime/audit/collector.py +427 -0
- app/agent_runtime/audit/queue.py +109 -0
- app/agent_runtime/audit/repo.py +181 -0
- app/agent_runtime/context/__init__.py +10 -0
- app/agent_runtime/context/build_context.py +70 -0
- app/agent_runtime/context/compaction/__init__.py +11 -0
- app/agent_runtime/context/compaction/config.py +4 -0
- app/agent_runtime/context/compaction/overlay.py +65 -0
- app/agent_runtime/context/compaction/service.py +424 -0
- app/agent_runtime/context/compaction/tokens.py +28 -0
- app/agent_runtime/context/compaction/transcript.py +91 -0
- app/agent_runtime/context/compaction/turns.py +57 -0
- app/agent_runtime/context/compaction/window.py +116 -0
- app/agent_runtime/context/errors.py +8 -0
- app/agent_runtime/context/helpers/__init__.py +11 -0
- app/agent_runtime/context/helpers/canonical_mentions.py +209 -0
- app/agent_runtime/context/parts/__init__.py +0 -0
- app/agent_runtime/context/parts/history.py +127 -0
- app/agent_runtime/context/parts/rules.py +27 -0
- app/agent_runtime/context/parts/skills.py +71 -0
- app/agent_runtime/context/parts/system_prompt.py +80 -0
- app/agent_runtime/context/processors/__init__.py +0 -0
- app/agent_runtime/context/processors/filter.py +62 -0
- app/agent_runtime/context/processors/sanitize.py +17 -0
- app/agent_runtime/context/processors/to_langchain.py +41 -0
- app/agent_runtime/context/types.py +13 -0
- app/agent_runtime/fork.py +191 -0
- app/agent_runtime/graph/__init__.py +11 -0
- app/agent_runtime/graph/config.py +32 -0
- app/agent_runtime/graph/node_events.py +151 -0
- app/agent_runtime/graph/orchestrator/__init__.py +7 -0
- app/agent_runtime/graph/orchestrator/graph.py +137 -0
- app/agent_runtime/graph/orchestrator/state.py +14 -0
- app/agent_runtime/graph/react_agent.py +895 -0
- app/agent_runtime/graph/state.py +16 -0
- app/agent_runtime/modes.py +3 -0
- app/agent_runtime/persistence/__init__.py +24 -0
- app/agent_runtime/persistence/child_runs.py +621 -0
- app/agent_runtime/persistence/compaction_repo.py +276 -0
- app/agent_runtime/persistence/compaction_types.py +39 -0
- app/agent_runtime/persistence/errors.py +10 -0
- app/agent_runtime/persistence/loader.py +150 -0
- app/agent_runtime/persistence/model.py +226 -0
- app/agent_runtime/persistence/persister.py +468 -0
- app/agent_runtime/persistence/plan_repo.py +141 -0
- app/agent_runtime/persistence/repo.py +267 -0
- app/agent_runtime/persistence/task_projection.py +342 -0
- app/agent_runtime/persistence/types.py +33 -0
- app/agent_runtime/plan/__init__.py +5 -0
- app/agent_runtime/plan/service.py +392 -0
- app/agent_runtime/revisions.py +792 -0
- app/agent_runtime/runner/__init__.py +4 -0
- app/agent_runtime/runner/checkpointer.py +119 -0
- app/agent_runtime/runner/event_scope.py +6 -0
- app/agent_runtime/runner/event_translator.py +313 -0
- app/agent_runtime/runner/run_registry.py +164 -0
- app/agent_runtime/runner/session_runner.py +1180 -0
- app/agent_runtime/runner/subagent_runner.py +1071 -0
- app/agent_runtime/streaming/__init__.py +11 -0
- app/agent_runtime/streaming/replay_buffer.py +123 -0
- app/agent_runtime/tool_call_recovery.py +183 -0
- app/agent_runtime/tools/__init__.py +21 -0
- app/agent_runtime/tools/base.py +224 -0
- app/agent_runtime/tools/errors.py +2 -0
- app/agent_runtime/tools/hooks/__init__.py +13 -0
- app/agent_runtime/tools/hooks/auth.py +106 -0
- app/agent_runtime/tools/hooks/chapter_refresh.py +78 -0
- app/agent_runtime/tools/hooks/dispatch_description.py +48 -0
- app/agent_runtime/tools/hooks/note_refresh.py +77 -0
- app/agent_runtime/tools/impls/__init__.py +25 -0
- app/agent_runtime/tools/impls/chapter/__init__.py +25 -0
- app/agent_runtime/tools/impls/chapter/create_volume.py +64 -0
- app/agent_runtime/tools/impls/chapter/delete_chapter.py +98 -0
- app/agent_runtime/tools/impls/chapter/delete_volume.py +61 -0
- app/agent_runtime/tools/impls/chapter/diff_preview.py +273 -0
- app/agent_runtime/tools/impls/chapter/edit_chapter.py +193 -0
- app/agent_runtime/tools/impls/chapter/edit_volume.py +74 -0
- app/agent_runtime/tools/impls/chapter/list_chapters.py +50 -0
- app/agent_runtime/tools/impls/chapter/list_volumes.py +46 -0
- app/agent_runtime/tools/impls/chapter/move_chapter_to_volume.py +108 -0
- app/agent_runtime/tools/impls/chapter/read_chapter.py +64 -0
- app/agent_runtime/tools/impls/chapter/refs.py +72 -0
- app/agent_runtime/tools/impls/chapter/search_chapters.py +392 -0
- app/agent_runtime/tools/impls/chapter/update_index.py +46 -0
- app/agent_runtime/tools/impls/chapter/write_chapter.py +170 -0
- app/agent_runtime/tools/impls/context/__init__.py +13 -0
- app/agent_runtime/tools/impls/context/read_chapter_summaries.py +94 -0
- app/agent_runtime/tools/impls/context/read_range_summaries.py +50 -0
- app/agent_runtime/tools/impls/context/read_world_info.py +60 -0
- app/agent_runtime/tools/impls/interaction/__init__.py +3 -0
- app/agent_runtime/tools/impls/interaction/ask_user.py +60 -0
- app/agent_runtime/tools/impls/note/__init__.py +0 -0
- app/agent_runtime/tools/impls/note/create_note_category.py +120 -0
- app/agent_runtime/tools/impls/note/delete_note.py +105 -0
- app/agent_runtime/tools/impls/note/edit_note.py +167 -0
- app/agent_runtime/tools/impls/note/list_notes.py +75 -0
- app/agent_runtime/tools/impls/note/move_note.py +142 -0
- app/agent_runtime/tools/impls/note/read_note.py +64 -0
- app/agent_runtime/tools/impls/note/refs.py +115 -0
- app/agent_runtime/tools/impls/note/write_note.py +148 -0
- app/agent_runtime/tools/impls/orchestration/__init__.py +3 -0
- app/agent_runtime/tools/impls/orchestration/common.py +288 -0
- app/agent_runtime/tools/impls/orchestration/dispatch_subagent.py +304 -0
- app/agent_runtime/tools/impls/orchestration/notify_subagent.py +153 -0
- app/agent_runtime/tools/impls/orchestration/recycle_subagent.py +103 -0
- app/agent_runtime/tools/impls/plan/__init__.py +4 -0
- app/agent_runtime/tools/impls/plan/_shared.py +81 -0
- app/agent_runtime/tools/impls/plan/create_plan.py +60 -0
- app/agent_runtime/tools/impls/plan/get_plan.py +40 -0
- app/agent_runtime/tools/impls/plan/list_plan.py +39 -0
- app/agent_runtime/tools/impls/plan/update_plan.py +60 -0
- app/agent_runtime/tools/permission_metadata.py +127 -0
- app/agent_runtime/tools/registry.py +45 -0
- app/agent_runtime/types.py +21 -0
- app/api/__init__.py +1 -0
- app/api/exceptions.py +91 -0
- app/api/middleware/__init__.py +3 -0
- app/api/middleware/access_log.py +118 -0
- app/api/routers/__init__.py +1 -0
- app/api/routers/agent_definitions.py +194 -0
- app/api/routers/agent_memories.py +101 -0
- app/api/routers/agent_rules.py +111 -0
- app/api/routers/agent_runtime.py +1106 -0
- app/api/routers/audit.py +148 -0
- app/api/routers/background.py +163 -0
- app/api/routers/chapter_context.py +741 -0
- app/api/routers/chapters.py +297 -0
- app/api/routers/dashboard.py +236 -0
- app/api/routers/health.py +23 -0
- app/api/routers/import_router.py +275 -0
- app/api/routers/model_icons.py +41 -0
- app/api/routers/model_provider_catalog.py +63 -0
- app/api/routers/model_providers.py +423 -0
- app/api/routers/models.py +295 -0
- app/api/routers/notes.py +367 -0
- app/api/routers/projects.py +204 -0
- app/api/routers/prompt_chains.py +475 -0
- app/api/routers/retrieval_index.py +134 -0
- app/api/routers/settings.py +420 -0
- app/api/routers/skills.py +131 -0
- app/api/routers/tasks.py +242 -0
- app/api/routers/volumes.py +149 -0
- app/api/routers/world_info.py +225 -0
- app/api/routers/world_info_entries.py +582 -0
- app/api/schemas/__init__.py +1 -0
- app/api/schemas/agent.py +235 -0
- app/api/schemas/agent_definition.py +63 -0
- app/api/schemas/agent_memory.py +35 -0
- app/api/schemas/agent_rule.py +38 -0
- app/api/schemas/audit.py +95 -0
- app/api/schemas/background.py +77 -0
- app/api/schemas/chapter.py +139 -0
- app/api/schemas/chapter_context.py +238 -0
- app/api/schemas/dashboard.py +145 -0
- app/api/schemas/health.py +12 -0
- app/api/schemas/import_schema.py +39 -0
- app/api/schemas/model.py +122 -0
- app/api/schemas/model_provider.py +85 -0
- app/api/schemas/note.py +139 -0
- app/api/schemas/project.py +48 -0
- app/api/schemas/prompt_chain.py +147 -0
- app/api/schemas/retrieval_index.py +46 -0
- app/api/schemas/setting.py +83 -0
- app/api/schemas/skill.py +43 -0
- app/api/schemas/task.py +83 -0
- app/api/schemas/volume.py +45 -0
- app/api/schemas/world_info.py +203 -0
- app/background/__init__.py +1 -0
- app/background/events/__init__.py +1 -0
- app/background/events/publisher.py +114 -0
- app/background/events/types.py +17 -0
- app/background/jobs/__init__.py +1 -0
- app/background/jobs/base.py +42 -0
- app/background/jobs/constants.py +12 -0
- app/background/jobs/definitions/__init__.py +72 -0
- app/background/jobs/definitions/chapter_summary.py +338 -0
- app/background/jobs/definitions/long_term_summary.py +15 -0
- app/background/jobs/definitions/retrieval_chapter_index_batch.py +376 -0
- app/background/jobs/definitions/session_title.py +163 -0
- app/background/jobs/definitions/summary_batch.py +525 -0
- app/background/jobs/models.py +76 -0
- app/background/jobs/repos.py +207 -0
- app/background/jobs/service.py +453 -0
- app/background/jobs/session_title_jobs.py +31 -0
- app/background/jobs/states.py +43 -0
- app/background/llm/__init__.py +1 -0
- app/background/llm/resolver.py +75 -0
- app/background/runtime/__init__.py +1 -0
- app/background/runtime/context.py +160 -0
- app/background/runtime/dispatcher.py +35 -0
- app/background/runtime/registry.py +34 -0
- app/background/runtime/supervisor.py +192 -0
- app/background/runtime/watchdog.py +58 -0
- app/background/runtime/worker.py +239 -0
- app/background/transport/__init__.py +1 -0
- app/background/transport/base.py +33 -0
- app/background/transport/messages.py +27 -0
- app/background/transport/zmq.py +128 -0
- app/cli.py +91 -0
- app/core/__init__.py +1 -0
- app/core/encryption.py +60 -0
- app/core/errors.py +79 -0
- app/core/ids.py +18 -0
- app/core/storage.py +98 -0
- app/core/txt_parser.py +362 -0
- app/core/types.py +26 -0
- app/core/utils/__init__.py +1 -0
- app/core/utils/tiktoken.py +34 -0
- app/logging.py +65 -0
- app/macro/__init__.py +34 -0
- app/macro/compiler.py +213 -0
- app/macro/evaluator.py +234 -0
- app/macro/handlers/__init__.py +12 -0
- app/macro/handlers/base.py +58 -0
- app/macro/handlers/conditional_handler.py +78 -0
- app/macro/handlers/mem_handler.py +105 -0
- app/macro/lexer.py +227 -0
- app/macro/parser.py +149 -0
- app/macro/registry.py +76 -0
- app/macro/types.py +120 -0
- app/main.py +350 -0
- app/memory/__init__.py +4 -0
- app/memory/chapter/__init__.py +35 -0
- app/memory/chapter/context_builder.py +318 -0
- app/memory/chapter/sequence.py +43 -0
- app/memory/chapter/summary_generator.py +260 -0
- app/memory/chapter/summary_service.py +1231 -0
- app/memory/chapter/summary_tools.py +61 -0
- app/memory/prompt_chain_runner.py +327 -0
- app/models/__init__.py +25 -0
- app/models/adapters/__init__.py +41 -0
- app/models/adapters/anthropic.py +38 -0
- app/models/adapters/base.py +95 -0
- app/models/adapters/deepseek.py +54 -0
- app/models/adapters/google_genai.py +89 -0
- app/models/adapters/mistral.py +74 -0
- app/models/adapters/openai.py +51 -0
- app/models/adapters/openai_compat_family.py +107 -0
- app/models/adapters/openai_compatible.py +65 -0
- app/models/adapters/openrouter.py +66 -0
- app/models/builtin.py +138 -0
- app/models/catalog/__init__.py +22 -0
- app/models/catalog/assets/logos/anthropic.svg +3 -0
- app/models/catalog/assets/logos/cohere.svg +5 -0
- app/models/catalog/assets/logos/deepseek.svg +3 -0
- app/models/catalog/assets/logos/google.svg +3 -0
- app/models/catalog/assets/logos/groq.svg +3 -0
- app/models/catalog/assets/logos/huggingface.svg +3 -0
- app/models/catalog/assets/logos/mistral.svg +3 -0
- app/models/catalog/assets/logos/nova.svg +3 -0
- app/models/catalog/assets/logos/nvidia.svg +3 -0
- app/models/catalog/assets/logos/ollama-cloud.svg +7 -0
- app/models/catalog/assets/logos/openai.svg +3 -0
- app/models/catalog/assets/logos/openrouter.svg +8 -0
- app/models/catalog/assets/modelsdev-catalog.snapshot.json +1 -0
- app/models/catalog/icon_proxy.py +162 -0
- app/models/catalog/service.py +483 -0
- app/models/catalog/types.py +63 -0
- app/models/clients/__init__.py +35 -0
- app/models/clients/client_factory.py +55 -0
- app/models/clients/deepseek_payload.py +27 -0
- app/models/clients/embedding_client.py +176 -0
- app/models/clients/fastembed_embeddings.py +355 -0
- app/models/clients/llm_client.py +563 -0
- app/models/clients/model_factory.py +204 -0
- app/models/clients/rerank_client.py +166 -0
- app/models/entities/__init__.py +9 -0
- app/models/entities/model.py +83 -0
- app/models/entities/model_provider.py +45 -0
- app/models/registry.py +118 -0
- app/models/repos/__init__.py +8 -0
- app/models/repos/model_provider_repo.py +141 -0
- app/models/repos/model_repo.py +269 -0
- app/models/services/__init__.py +9 -0
- app/models/services/model_provider_service.py +443 -0
- app/models/services/model_service.py +276 -0
- app/models/strategies/__init__.py +10 -0
- app/models/strategies/base.py +95 -0
- app/models/strategies/embedding_strategy.py +60 -0
- app/models/strategies/llm_strategy.py +103 -0
- app/prompts/__init__.py +25 -0
- app/prompts/assistant/agent/actor.yaml +114 -0
- app/prompts/assistant/agent/auditor.yaml +133 -0
- app/prompts/assistant/agent/composer.yaml +170 -0
- app/prompts/assistant/agent/explorer.yaml +97 -0
- app/prompts/assistant/agent/primary.yaml +281 -0
- app/prompts/assistant/agent/reviewer.yaml +149 -0
- app/prompts/assistant/agent/writer.yaml +291 -0
- app/prompts/assistant/compaction.yaml +35 -0
- app/prompts/background/session_title.yaml +52 -0
- app/prompts/loader.py +291 -0
- app/prompts/memory/far_range_summary.yaml +82 -0
- app/prompts/memory/mid_range_summary.yaml +91 -0
- app/retrieval/__init__.py +29 -0
- app/retrieval/chapter_index.py +1149 -0
- app/retrieval/engine.py +388 -0
- app/retrieval/index_status.py +109 -0
- app/retrieval/internal/__init__.py +4 -0
- app/retrieval/internal/common/__init__.py +4 -0
- app/retrieval/internal/common/codec.py +20 -0
- app/retrieval/internal/common/naming.py +15 -0
- app/retrieval/internal/contracts/__init__.py +4 -0
- app/retrieval/internal/contracts/index_contracts.py +77 -0
- app/retrieval/internal/indexing/__init__.py +4 -0
- app/retrieval/internal/indexing/chunking.py +121 -0
- app/retrieval/internal/indexing/table_schema.py +38 -0
- app/retrieval/internal/query/__init__.py +4 -0
- app/retrieval/internal/query/builder.py +206 -0
- app/retrieval/internal/query/filters.py +22 -0
- app/retrieval/internal/query/ranking.py +112 -0
- app/retrieval/internal/validation.py +120 -0
- app/retrieval/service.py +220 -0
- app/retrieval/types.py +94 -0
- app/settings.py +121 -0
- app/socket/__init__.py +19 -0
- app/socket/emitter.py +21 -0
- app/socket/handlers.py +236 -0
- app/socket/server.py +19 -0
- app/storage/__init__.py +4 -0
- app/storage/database.py +111 -0
- app/storage/migrations/README +1 -0
- app/storage/migrations/env.py +93 -0
- app/storage/migrations/script.py.mako +28 -0
- app/storage/migrations/versions/1001_initial_schema.py +1092 -0
- app/storage/migrations/versions/1002_remove_plan_dependencies_and_enable_composer_note_write.py +106 -0
- app/storage/migrations/versions/legacy/001_add_cover_path_to_projects.py +37 -0
- app/storage/migrations/versions/legacy/002_add_chapters_table.py +51 -0
- app/storage/migrations/versions/legacy/003_add_world_info_tables.py +101 -0
- app/storage/migrations/versions/legacy/004_project_id_nullable.py +41 -0
- app/storage/migrations/versions/legacy/005_world_info_structure_changes.py +67 -0
- app/storage/migrations/versions/legacy/006_add_model_tables.py +85 -0
- app/storage/migrations/versions/legacy/007_update_provider_icon_fields.py +40 -0
- app/storage/migrations/versions/legacy/008_add_prompt_chain_tables.py +177 -0
- app/storage/migrations/versions/legacy/009_fix_prompt_chain_names.py +49 -0
- app/storage/migrations/versions/legacy/010_add_embedding_support.py +73 -0
- app/storage/migrations/versions/legacy/011_add_chapter_context_module.py +209 -0
- app/storage/migrations/versions/legacy/012_add_tasks_table.py +58 -0
- app/storage/migrations/versions/legacy/013_add_entry_uid.py +136 -0
- app/storage/migrations/versions/legacy/014_add_agent_prompts_and_session_id.py +433 -0
- app/storage/migrations/versions/legacy/015_add_version_control_tables.py +87 -0
- app/storage/migrations/versions/legacy/016_add_artifact_table.py +57 -0
- app/storage/migrations/versions/legacy/017_link_task_messages_to_checkpoints.py +45 -0
- app/storage/migrations/versions/legacy/018_add_agent_audit_logs.py +126 -0
- app/storage/migrations/versions/legacy/019_add_revision_status.py +45 -0
- app/storage/migrations/versions/legacy/020_update_agent_prompts.py +410 -0
- app/storage/migrations/versions/legacy/021_remove_prompt_chains_table.py +149 -0
- app/storage/migrations/versions/legacy/022_add_deepseek_model_params.py +49 -0
- app/storage/migrations/versions/legacy/023_split_task_messages_table.py +113 -0
- app/storage/migrations/versions/legacy/024_add_dashboard_audit_indexes.py +58 -0
- app/storage/migrations/versions/legacy/025_add_structured_agent_message_fields.py +75 -0
- app/storage/migrations/versions/legacy/026_add_audit_token_cache.py +39 -0
- app/storage/migrations/versions/legacy/027_add_task_token_usage.py +71 -0
- app/storage/migrations/versions/legacy/028_add_background_jobs.py +97 -0
- app/storage/migrations/versions/legacy/029_rebuild_chapter_summaries.py +97 -0
- app/storage/migrations/versions/legacy/030_rebuild_agent_checkpoints_and_snapshots.py +167 -0
- app/storage/migrations/versions/legacy/031_add_writing_activity_events.py +71 -0
- app/storage/migrations/versions/legacy/032_remove_chapter_context_window_config.py +30 -0
- app/storage/migrations/versions/legacy/033_remove_world_info_entry_scan_and_inject.py +44 -0
- app/storage/migrations/versions/legacy/034_rebuild_background_jobs_generic_runtime_schema.py +184 -0
- app/storage/migrations/versions/legacy/035_add_background_job_event_sequence.py +35 -0
- app/storage/migrations/versions/legacy/036_rework_summary_staleness_tracking.py +72 -0
- app/storage/migrations/versions/legacy/037_add_skills_table.py +44 -0
- app/storage/migrations/versions/legacy/038_add_skill_order_index.py +47 -0
- app/storage/migrations/versions/legacy/039_add_agent_rules_and_memories.py +48 -0
- app/storage/migrations/versions/legacy/040_add_agent_run_messages.py +70 -0
- app/storage/migrations/versions/legacy/041_replace_artifacts_with_agent_artifact.py +116 -0
- app/storage/migrations/versions/legacy/042_agent_revision_rollback.py +167 -0
- app/storage/migrations/versions/legacy/043_add_agent_run_message_type.py +73 -0
- app/storage/migrations/versions/legacy/044_add_reasoning_duration_to_agent_run_messages.py +41 -0
- app/storage/migrations/versions/legacy/045_add_context_anchor_order_to_tasks_and_revisions.py +63 -0
- app/storage/migrations/versions/legacy/046_add_task_running_state.py +46 -0
- app/storage/migrations/versions/legacy/047_add_retrieval_indexes.py +78 -0
- app/storage/migrations/versions/legacy/048_add_volumes_and_chapter_volume_id.py +171 -0
- app/storage/migrations/versions/legacy/049_remove_model_encoding_format.py +44 -0
- app/storage/migrations/versions/legacy/050_remove_context_anchor_from_tasks_and_revisions.py +66 -0
- app/storage/migrations/versions/legacy/051_add_pa_sa_agent_definitions.py +400 -0
- app/storage/migrations/versions/legacy/052_persistent_subagent_threads.py +142 -0
- app/storage/migrations/versions/legacy/053_add_plan_tables.py +74 -0
- app/storage/migrations/versions/legacy/054_replace_clarifier_with_explorer.py +93 -0
- app/storage/migrations/versions/legacy/055_remove_builtin_agent_definition_rows.py +154 -0
- app/storage/migrations/versions/legacy/056_add_subagent_audit_metadata.py +53 -0
- app/storage/migrations/versions/legacy/057_add_title_to_plan_todos.py +45 -0
- app/storage/migrations/versions/legacy/058_remove_async_subagent_mode.py +117 -0
- app/storage/migrations/versions/legacy/059_fix_skill_id_unique_constraint.py +77 -0
- app/storage/migrations/versions/legacy/060_add_retrieval_chapter_index_states.py +100 -0
- app/storage/migrations/versions/legacy/061_add_builtin_model_flag.py +61 -0
- app/storage/migrations/versions/legacy/062_agent_context_compactions.py +132 -0
- app/storage/migrations/versions/legacy/063_add_notes_and_note_categories.py +77 -0
- app/storage/migrations/versions/legacy/064_drop_tasks_chapter_id.py +31 -0
- app/storage/migrations/versions/legacy/065_add_revision_note_snapshots.py +153 -0
- app/storage/migrations/versions/legacy/066_add_agent_definition_source_and_delegatable.py +46 -0
- app/storage/migrations/versions/legacy/067_add_agent_definition_description.py +33 -0
- app/storage/migrations/versions/legacy/068_drop_skill_order_index.py +30 -0
- app/storage/migrations/versions/legacy/069_decouple_skills_from_agents.py +302 -0
- app/storage/migrations/versions/legacy/070_remove_artifact_tooling.py +116 -0
- app/storage/migrations/versions/legacy/071_add_title_to_agent_rules.py +46 -0
- app/storage/migrations/versions/legacy/072_add_summary_volume_and_global_order.py +103 -0
- app/storage/migrations/versions/legacy/073_simplify_world_info_entries.py +62 -0
- app/storage/models/__init__.py +74 -0
- app/storage/models/agent_audit_log.py +98 -0
- app/storage/models/agent_memory.py +20 -0
- app/storage/models/agent_rule.py +21 -0
- app/storage/models/chapter.py +42 -0
- app/storage/models/chapter_summary.py +41 -0
- app/storage/models/commit.py +57 -0
- app/storage/models/note.py +43 -0
- app/storage/models/project.py +35 -0
- app/storage/models/prompt_chain_version.py +46 -0
- app/storage/models/prompt_entry.py +43 -0
- app/storage/models/retrieval_chapter_index_state.py +47 -0
- app/storage/models/retrieval_index.py +45 -0
- app/storage/models/revision.py +87 -0
- app/storage/models/revision_chapter_snapshot.py +30 -0
- app/storage/models/revision_note_snapshot.py +52 -0
- app/storage/models/setting.py +31 -0
- app/storage/models/skill.py +23 -0
- app/storage/models/task.py +49 -0
- app/storage/models/task_message.py +34 -0
- app/storage/models/volume.py +29 -0
- app/storage/models/world_info.py +36 -0
- app/storage/models/world_info_entry.py +43 -0
- app/storage/models/writing_activity_event.py +34 -0
- app/storage/repos/__init__.py +44 -0
- app/storage/repos/agent_definition_repo.py +51 -0
- app/storage/repos/agent_memory_repo.py +73 -0
- app/storage/repos/agent_rule_repo.py +73 -0
- app/storage/repos/chapter_repo.py +393 -0
- app/storage/repos/chapter_summary_repo.py +350 -0
- app/storage/repos/commit_repo.py +120 -0
- app/storage/repos/dashboard_repo.py +370 -0
- app/storage/repos/note_category_repo.py +96 -0
- app/storage/repos/note_repo.py +108 -0
- app/storage/repos/project_repo.py +110 -0
- app/storage/repos/prompt_chain_version_repo.py +217 -0
- app/storage/repos/prompt_entry_repo.py +80 -0
- app/storage/repos/retrieval_chapter_index_state_repo.py +99 -0
- app/storage/repos/retrieval_index_repo.py +100 -0
- app/storage/repos/revision_chapter_snapshot_repo.py +48 -0
- app/storage/repos/revision_note_snapshot_repo.py +73 -0
- app/storage/repos/revision_repo.py +238 -0
- app/storage/repos/setting_repo.py +87 -0
- app/storage/repos/skill_repo.py +66 -0
- app/storage/repos/task_message_repo.py +85 -0
- app/storage/repos/task_repo.py +205 -0
- app/storage/repos/volume_repo.py +123 -0
- app/storage/repos/world_info_entry_repo.py +264 -0
- app/storage/repos/world_info_repo.py +135 -0
- app/storage/repos/writing_activity_repo.py +123 -0
- app/storage/services/__init__.py +40 -0
- app/storage/services/agent_definition_service.py +211 -0
- app/storage/services/agent_memory_service.py +87 -0
- app/storage/services/agent_rule_service.py +92 -0
- app/storage/services/chapter_service.py +700 -0
- app/storage/services/dashboard_service.py +231 -0
- app/storage/services/import_service.py +113 -0
- app/storage/services/mention_service.py +162 -0
- app/storage/services/model_provider_service.py +492 -0
- app/storage/services/note_service.py +491 -0
- app/storage/services/project_service.py +166 -0
- app/storage/services/prompt_chain_service.py +488 -0
- app/storage/services/skill_service.py +175 -0
- app/storage/services/task_service.py +228 -0
- app/storage/services/version_control_service.py +22 -0
- app/storage/services/volume_service.py +161 -0
- app/storage/services/world_info_entry_service.py +592 -0
- app/storage/services/world_info_service.py +213 -0
- app/storage/services/writing_activity_service.py +114 -0
- frontend/KaTeX_AMS-Regular.0cdd387c-415ebc.woff2 +0 -0
- frontend/KaTeX_AMS-Regular.30da91e8-320c86.woff +0 -0
- frontend/KaTeX_AMS-Regular.68534840-8707af.ttf +0 -0
- frontend/KaTeX_Caligraphic-Bold.07d8e303-296718.ttf +0 -0
- frontend/KaTeX_Caligraphic-Bold.1ae6bd74-13a745.woff +0 -0
- frontend/KaTeX_Caligraphic-Bold.de7701e4-8da0de.woff2 +0 -0
- frontend/KaTeX_Caligraphic-Regular.3398dd02-ca2677.woff +0 -0
- frontend/KaTeX_Caligraphic-Regular.5d53e70a-78577a.woff2 +0 -0
- frontend/KaTeX_Caligraphic-Regular.ed0b7437-86fa03.ttf +0 -0
- frontend/KaTeX_Fraktur-Bold.74444efd-9df2cb.woff2 +0 -0
- frontend/KaTeX_Fraktur-Bold.9163df9c-e136bf.ttf +0 -0
- frontend/KaTeX_Fraktur-Bold.9be7ceb8-8e0807.woff +0 -0
- frontend/KaTeX_Fraktur-Regular.1e6f9579-72a1b6.ttf +0 -0
- frontend/KaTeX_Fraktur-Regular.51814d27-01639f.woff2 +0 -0
- frontend/KaTeX_Fraktur-Regular.5e28753b-1623ef.woff +0 -0
- frontend/KaTeX_Main-Bold.0f60d1b8-9c1400.woff2 +0 -0
- frontend/KaTeX_Main-Bold.138ac28d-f6a9d1.ttf +0 -0
- frontend/KaTeX_Main-Bold.c76c5d69-3e009f.woff +0 -0
- frontend/KaTeX_Main-BoldItalic.70ee1f64-c44328.ttf +0 -0
- frontend/KaTeX_Main-BoldItalic.99cd42a3-76eea2.woff2 +0 -0
- frontend/KaTeX_Main-BoldItalic.a6f7ec0d-aff1a0.woff +0 -0
- frontend/KaTeX_Main-Italic.0d85ae7c-d40724.ttf +0 -0
- frontend/KaTeX_Main-Italic.97479ca6-130367.woff2 +0 -0
- frontend/KaTeX_Main-Italic.f1d6ef86-8f045f.woff +0 -0
- frontend/KaTeX_Main-Regular.c2342cd8-b20392.woff2 +0 -0
- frontend/KaTeX_Main-Regular.c6368d87-ddbe43.woff +0 -0
- frontend/KaTeX_Main-Regular.d0332f52-bc81fd.ttf +0 -0
- frontend/KaTeX_Math-BoldItalic.850c0af5-72151f.woff +0 -0
- frontend/KaTeX_Math-BoldItalic.dc47344d-86a7bd.woff2 +0 -0
- frontend/KaTeX_Math-BoldItalic.f9377ab0-e26c07.ttf +0 -0
- frontend/KaTeX_Math-Italic.08ce98e5-a78738.ttf +0 -0
- frontend/KaTeX_Math-Italic.7af58c5e-53a319.woff2 +0 -0
- frontend/KaTeX_Math-Italic.8a8d2445-2cff6e.woff +0 -0
- frontend/KaTeX_SansSerif-Bold.1ece03f7-1e7c46.ttf +0 -0
- frontend/KaTeX_SansSerif-Bold.e99ae511-b8f72c.woff2 +0 -0
- frontend/KaTeX_SansSerif-Bold.ece03cfd-653992.woff +0 -0
- frontend/KaTeX_SansSerif-Italic.00b26ac8-fd5381.woff2 +0 -0
- frontend/KaTeX_SansSerif-Italic.3931dd81-49033e.ttf +0 -0
- frontend/KaTeX_SansSerif-Italic.91ee6750-61e745.woff +0 -0
- frontend/KaTeX_SansSerif-Regular.11e4dc8a-889c3e.woff +0 -0
- frontend/KaTeX_SansSerif-Regular.68e8c73e-99e811.woff2 +0 -0
- frontend/KaTeX_SansSerif-Regular.f36ea897-bb70d9.ttf +0 -0
- frontend/KaTeX_Script-Regular.036d4e95-d42627.woff2 +0 -0
- frontend/KaTeX_Script-Regular.1c67f068-219300.ttf +0 -0
- frontend/KaTeX_Script-Regular.d96cdf2b-4535e4.woff +0 -0
- frontend/KaTeX_Size1-Regular.6b47c401-03ed8d.woff2 +0 -0
- frontend/KaTeX_Size1-Regular.95b6d2f1-3f8e20.ttf +0 -0
- frontend/KaTeX_Size1-Regular.c943cc98-c22ccd.woff +0 -0
- frontend/KaTeX_Size2-Regular.2014c523-5b00fe.woff +0 -0
- frontend/KaTeX_Size2-Regular.a6b2099f-0346e2.ttf +0 -0
- frontend/KaTeX_Size2-Regular.d04c5421-b10617.woff2 +0 -0
- frontend/KaTeX_Size3-Regular.500e04d5-873e46.ttf +0 -0
- frontend/KaTeX_Size3-Regular.6ab6b62e-6b4dda.woff +0 -0
- frontend/KaTeX_Size3-Regular.73d59127-d0ef41.woff2 +0 -0
- frontend/KaTeX_Size4-Regular.99f9c675-b0affe.woff +0 -0
- frontend/KaTeX_Size4-Regular.a4af7d41-3d6e35.woff2 +0 -0
- frontend/KaTeX_Size4-Regular.c647367d-e1025f.ttf +0 -0
- frontend/KaTeX_Typewriter-Regular.71d517d6-90d682.woff2 +0 -0
- frontend/KaTeX_Typewriter-Regular.e14fed02-5be182.woff +0 -0
- frontend/KaTeX_Typewriter-Regular.f01f3e87-052e78.ttf +0 -0
- frontend/Tooltip-B8gZJWmn_c811.7d61ca85.js +4 -0
- frontend/Tooltip-B8gZJWmn_f0ab.5626f153.js +1 -0
- frontend/abap_f7b1.353a50a8.js +1 -0
- frontend/actionscript-3_7939.e7a77059.js +1 -0
- frontend/ada_460c.f4e24a5c.js +1 -0
- frontend/andromeeda_8038.ed7a2156.js +1 -0
- frontend/angular-ts_aa42.b9f8f80d.js +1 -0
- frontend/angular-ts_d5ae.bb999702.js +1 -0
- frontend/apache_678d.c2a49c5b.js +1 -0
- frontend/apex_d98e.d00e46b3.js +1 -0
- frontend/apl_b91d.818b84ef.js +1 -0
- frontend/applescript_314e.298b5bc0.js +1 -0
- frontend/ara_2d36.09d0478a.js +1 -0
- frontend/architecture-YZFGNWBL_d477.5f443ed5.js +1 -0
- frontend/architectureDiagram-Q4EWVU46_5f02.01c1541d.js +36 -0
- frontend/architectureDiagram-Q4EWVU46_6204.94fdca9c.js +1 -0
- frontend/architectureDiagram-Q4EWVU46_95a5.9fb293d4.js +1 -0
- frontend/architectureDiagram-Q4EWVU46_e226.8ddfe651.js +1 -0
- frontend/asciidoc_b81c.cead7ef0.js +1 -0
- frontend/asm_ba0f.18b39899.js +1 -0
- frontend/astro_68c5.8aeb9b9e.js +1 -0
- frontend/aurora-x_7c04.1335d8d0.js +1 -0
- frontend/awk_c5c2.ec936da4.js +1 -0
- frontend/ayu-dark_a42d.13cdbfa1.js +1 -0
- frontend/ayu-light_2f4e.f447a738.js +1 -0
- frontend/ayu-mirage_04c2.cd712c47.js +1 -0
- frontend/ballerina_ceec.329e3d21.js +1 -0
- frontend/bat_01e7.b1a87e7e.js +1 -0
- frontend/beancount_6133.5d896469.js +1 -0
- frontend/berry_167d.4242b192.js +1 -0
- frontend/bibtex_b151.6ce27cdf.js +1 -0
- frontend/bicep_b1ce.8fffea4a.js +1 -0
- frontend/bird2_13d2.a6691d9a.js +1 -0
- frontend/blade_27e2.29708033.js +1 -0
- frontend/blockDiagram-DXYQGD6D_5967.58917ed7.js +15 -0
- frontend/blockDiagram-DXYQGD6D_6b13.d44a20cd.js +9 -0
- frontend/blockDiagram-DXYQGD6D_9fb3.2cc99360.js +127 -0
- frontend/blockDiagram-DXYQGD6D_ec1a.b459a1a1.js +1 -0
- frontend/bsl_2583.da221aa5.js +1 -0
- frontend/c3_2198.1063f2d1.js +1 -0
- frontend/c4Diagram-AHTNJAMY_61bf.0330e4ac.js +5 -0
- frontend/cadence_6fbd.9fa4ceb8.js +1 -0
- frontend/cairo_0d5d.e8132d46.js +1 -0
- frontend/catppuccin-frappe_dfb9.bf05db2c.js +1 -0
- frontend/catppuccin-latte_3f74.9c3a1d64.js +1 -0
- frontend/catppuccin-macchiato_c5eb.4b2b2434.js +1 -0
- frontend/catppuccin-mocha_4012.8565be3c.js +1 -0
- frontend/charts_12de.18fb5ec6.js +1 -0
- frontend/charts_3171.fc8534d9.js +1 -0
- frontend/cl100k_base_49ac.732e40ac.js +1 -0
- frontend/clarity_3c7f.d1b57aa3.js +1 -0
- frontend/classDiagram-6PBFFD2Q_90e6.90e1ffc8.js +1 -0
- frontend/classDiagram-v2-HSJHXN6E_d52d.9d9f3b70.js +201 -0
- frontend/classDiagram-v2-HSJHXN6E_f975.7c0ce124.js +1 -0
- frontend/clojure_472d.86b61973.js +1 -0
- frontend/cobol_778e.3fecda9b.js +1 -0
- frontend/codeowners_64cb.8e37e962.js +1 -0
- frontend/codeql_013d.79ebbe94.js +1 -0
- frontend/coffee_a7b5.913dad9b.js +1 -0
- frontend/common-lisp_b285.606ed7c5.js +1 -0
- frontend/components_3a48.8f5be173.js +1 -0
- frontend/components_4f39.1b1cc8b9.js +1 -0
- frontend/components_76f7.1e466de7.js +1 -0
- frontend/components_8d32.47e76482.js +1 -0
- frontend/components_f29e.12cb60d6.js +1 -0
- frontend/coq_170f.cb715932.js +1 -0
- frontend/core_290f.1e95bfec.js +1 -0
- frontend/cose-bilkent-S5V4N54A_0496.f257e31e.js +1 -0
- frontend/cose-bilkent-S5V4N54A_4819.17da8b5a.js +1 -0
- frontend/crystal_ec27.ecb9a663.js +1 -0
- frontend/cue_1f41.6e02cbed.js +1 -0
- frontend/cypher_6a4f.3c434120.js +1 -0
- frontend/d_7b48.3367b5d0.js +1 -0
- frontend/dagre-KV5264BT_22a0.d516c095.js +1 -0
- frontend/dark-plus_f732.9aea63be.js +1 -0
- frontend/dart_962a.510bc341.js +1 -0
- frontend/dashboard-page_30af.41388d3e.css +10 -0
- frontend/dashboard-page_5b97.74798736.js +1 -0
- frontend/dashboard-page_a41c.46f7558c.css +2 -0
- frontend/dashboard-page_a41c.46f7558c.css.map +1 -0
- frontend/dashboard-page_b6de.1a941b17.js +8 -0
- frontend/dashboard-page_b6de.1a941b17.js.map +1 -0
- frontend/dashboard-page_d7f9.7fd2d7a8.js +1 -0
- frontend/dashboard-page_f84a.1b302736.js +13 -0
- frontend/dax_2864.5a68eb05.js +1 -0
- frontend/desktop_d7af.52cbac10.js +1 -0
- frontend/diagram-5BDNPKRD_401f.499aab8f.js +9 -0
- frontend/diagram-5BDNPKRD_5f92.25e9cd54.js +1 -0
- frontend/diagram-G4DWMVQ6_1086.d9d22831.js +1 -0
- frontend/diagram-G4DWMVQ6_9969.ae7bf4c4.js +24 -0
- frontend/diagram-MMDJMWI5_78bd.88a5b733.js +43 -0
- frontend/diagram-TYMM5635_2936.831138b9.js +24 -0
- frontend/dist_wasm_3502.f1a9a96f.js +1 -0
- frontend/dist_wasm_556c.70385ebc.js +1 -0
- frontend/docker_1dee.f4d7ec36.js +1 -0
- frontend/dotenv_6f7c.c4e52247.js +1 -0
- frontend/dracula-soft_767a.f04fcc3d.js +1 -0
- frontend/dracula_4369.ccb3040c.js +1 -0
- frontend/dream-maker_d7b6.1823bfd1.js +1 -0
- frontend/edge_09ac.c5b4aceb.js +1 -0
- frontend/elixir_0d96.f39434ad.js +1 -0
- frontend/elm_0204.aa7a42c9.js +1 -0
- frontend/emacs-lisp_97d0.a9c2ab38.js +1 -0
- frontend/erDiagram-SMLLAGMA_0fb3.935bba92.js +80 -0
- frontend/erb_5222.8521f728.js +1 -0
- frontend/erlang_178b.0cacbc3b.js +1 -0
- frontend/everforest-dark_4742.6898b43d.js +1 -0
- frontend/everforest-light_cf18.042c6d63.js +1 -0
- frontend/fennel_b0d8.ddbfb954.js +1 -0
- frontend/fish_dbdc.e601ca8a.js +1 -0
- frontend/flowDiagram-DWJPFMVM_59f9.65fb8ca4.js +152 -0
- frontend/fluent_b4ad.749b7e0a.js +1 -0
- frontend/fonts/ChillKai.woff2 +0 -0
- frontend/fonts/JetBrainsMapleMono.woff2 +0 -0
- frontend/fonts/SourceHanSansCN-VF.ttf.woff2 +0 -0
- frontend/fonts/SourceHanSerifCN-VF.ttf.woff2 +0 -0
- frontend/fortran-fixed-form_f739.771d4bb2.js +1 -0
- frontend/fortran-free-form_74c8.cb251871.js +1 -0
- frontend/fsharp_3185.5f85fe56.js +1 -0
- frontend/ganttDiagram-T4ZO3ILL_b7a4.0de67326.js +287 -0
- frontend/gdresource_3289.a66dda3b.js +1 -0
- frontend/gdscript_8886.2939156b.js +1 -0
- frontend/gdshader_6d32.0b42dbe8.js +1 -0
- frontend/genie_c920.8b4d6179.js +1 -0
- frontend/gherkin_4376.e131a54f.js +1 -0
- frontend/git-commit_147e.6ca0248a.js +1 -0
- frontend/git-commit_83ab.dfc51ba6.js +1 -0
- frontend/git-rebase_4ed5.3c20209f.js +1 -0
- frontend/gitGraph-7Q5UKJZL_d741.859d59ea.js +1 -0
- frontend/gitGraphDiagram-UUTBAWPF_85e6.a4d7e8a1.js +104 -0
- frontend/github-dark-default_55bc.eaefbb77.js +1 -0
- frontend/github-dark-dimmed_6596.94f36cc8.js +1 -0
- frontend/github-dark-high-contrast_6510.736b2ae9.js +1 -0
- frontend/github-dark_24be.ab6b0ac6.js +1 -0
- frontend/github-light-default_2f23.fab1c327.js +1 -0
- frontend/github-light-high-contrast_4de4.4fd64bee.js +1 -0
- frontend/github-light_a6d5.37877702.js +1 -0
- frontend/gleam_a29c.cbe886d0.js +1 -0
- frontend/glimmer-js_df98.3438bdb3.js +1 -0
- frontend/glimmer-ts_0ff2.9651c3aa.js +1 -0
- frontend/gn_a240.5ebf278a.js +1 -0
- frontend/gnuplot_a4cf.d5f93d03.js +1 -0
- frontend/groovy_a89b.8219509d.js +1 -0
- frontend/gruvbox-dark-hard_f910.dbd332a9.js +1 -0
- frontend/gruvbox-dark-medium_5235.acc99c0b.js +1 -0
- frontend/gruvbox-dark-soft_39a9.42ccd2fb.js +1 -0
- frontend/gruvbox-light-hard_7a1b.e3ede131.js +1 -0
- frontend/gruvbox-light-medium_3bd7.b6a12454.js +1 -0
- frontend/gruvbox-light-soft_b7b5.2a70b609.js +1 -0
- frontend/hack_2424.55a662cc.js +1 -0
- frontend/handlebars_d03a.8897f8d7.js +1 -0
- frontend/haskell_0af5.4a274382.js +1 -0
- frontend/hcl_9cdd.1b7cfab9.js +1 -0
- frontend/highlighted-body-OFNGDK62_f9c8.0895d503.js +1 -0
- frontend/hjson_5017.b1bf990a.js +1 -0
- frontend/horizon-bright_40a5.39bc854c.js +1 -0
- frontend/horizon_d5a7.6ede728b.js +1 -0
- frontend/houston_c9c0.4ced256b.js +1 -0
- frontend/http_b99b.3505111d.js +1 -0
- frontend/hurl_b6ca.184f59f9.js +1 -0
- frontend/hurl_df61.c54ec0a8.js +1 -0
- frontend/hxml_191f.eca25a5f.js +1 -0
- frontend/hxml_b42e.36071085.js +1 -0
- frontend/hy_0daf.80c203f4.js +1 -0
- frontend/imba_4447.6b26a19d.js +1 -0
- frontend/index.html +6 -0
- frontend/index_0508.97ae2c00.js +22 -0
- frontend/index_0571.16d34222.js +5 -0
- frontend/index_096d.572912bd.js +1 -0
- frontend/index_0bb7.0f9db4f3.js +119 -0
- frontend/index_0d90.72561686.js +94 -0
- frontend/index_0f8c.7a528391.js +56 -0
- frontend/index_141c.2a93ecfd.js +10 -0
- frontend/index_1902.fdb9ce5e.js +5 -0
- frontend/index_3420.3fc140eb.js +22 -0
- frontend/index_36a3.1ddcb397.js +11 -0
- frontend/index_3ea1.6b24efc8.css +5 -0
- frontend/index_3ea1.6b24efc8.css.map +1 -0
- frontend/index_3f8d.934e14f8.css +34 -0
- frontend/index_3f8d.934e14f8.css.map +1 -0
- frontend/index_48dd.a8bae1d4.js +17 -0
- frontend/index_4bb5.ac17502d.css +8 -0
- frontend/index_4bb5.ac17502d.css.map +1 -0
- frontend/index_4cca.f9de8987.js +747 -0
- frontend/index_5546.38805549.js +62 -0
- frontend/index_5781.115679d7.js +15 -0
- frontend/index_5781.115679d7.js.map +1 -0
- frontend/index_5e11.9c5bacec.js +1 -0
- frontend/index_65ec.67db9663.js +3 -0
- frontend/index_65ec.67db9663.js.map +1 -0
- frontend/index_6762.5f93096c.js +1 -0
- frontend/index_7498.1f151492.js +1 -0
- frontend/index_7d26.50fea387.js +50 -0
- frontend/index_8124.5c3addba.js +1 -0
- frontend/index_8814.6cd2046b.js +9 -0
- frontend/index_8af1.c2b5fbe5.js +2 -0
- frontend/index_969e.09883d4a.js +2 -0
- frontend/index_969e.09883d4a.js.map +1 -0
- frontend/index_a1ba.6c3e3cb7.js +1 -0
- frontend/index_a3b0.d5faff70.js +60 -0
- frontend/index_a405.34fba37f.js +1 -0
- frontend/index_a8a6.0d6f9e04.js +9 -0
- frontend/index_a907.1253dd9e.js +1 -0
- frontend/index_ab91.da36f7f1.css +1 -0
- frontend/index_b17d.33ab0fbb.js +7 -0
- frontend/index_b17d.33ab0fbb.js.map +1 -0
- frontend/index_c45a.4d046074.js +2 -0
- frontend/index_c45a.4d046074.js.map +1 -0
- frontend/index_c5fe.4a69f3e3.js +5 -0
- frontend/index_c688.cec04ada.js +80 -0
- frontend/index_c91e.3009863b.js +2 -0
- frontend/index_c91e.3009863b.js.map +1 -0
- frontend/index_caf7.9b4ff466.css +1 -0
- frontend/index_ce0d.6c6c3bcb.js +1 -0
- frontend/index_cff3.695e37d3.js +1 -0
- frontend/index_d8c9.13bf2682.js +2 -0
- frontend/index_d8c9.13bf2682.js.map +1 -0
- frontend/index_de64.7a623fb2.js +49 -0
- frontend/index_de65.479e9c0d.js +1 -0
- frontend/index_e0dc.428eacaa.js +21 -0
- frontend/index_e277.c88a5815.js +1 -0
- frontend/index_e436.b63fbb7c.js +1 -0
- frontend/index_e524.8cd271cc.js +1 -0
- frontend/index_e9e0.6c8e1da2.css +1 -0
- frontend/info-OMHHGYJF_a2d5.bf453cc5.js +1 -0
- frontend/infoDiagram-42DDH7IO_86b7.537f6859.js +1 -0
- frontend/ini_65c7.b9b4f217.js +1 -0
- frontend/ishikawaDiagram-UXIWVN3A_b74a.586170cb.js +64 -0
- frontend/jinja_5db1.3c47b30d.js +1 -0
- frontend/jison_99f4.472a4ef5.js +1 -0
- frontend/journeyDiagram-VCZTEJTY_5599.866fe58f.js +134 -0
- frontend/journeyDiagram-VCZTEJTY_f13a.e145f61a.js +1 -0
- frontend/json5_8a32.47e56a0d.js +1 -0
- frontend/jsonc_1556.4d197203.js +1 -0
- frontend/jsonl_1dd5.77dbe152.js +1 -0
- frontend/jsonnet_6ed4.97d599ab.js +1 -0
- frontend/jssm_4905.f8a5c5ee.js +1 -0
- frontend/julia_e387.314b763d.js +1 -0
- frontend/just_5882.23d5b005.js +1 -0
- frontend/kanagawa-dragon_33a9.891adeb0.js +1 -0
- frontend/kanagawa-lotus_d0b4.357bb936.js +1 -0
- frontend/kanagawa-wave_c527.5a56288a.js +1 -0
- frontend/kanban-definition-6JOO6SKY_c5fb.192b0905.js +79 -0
- frontend/kdl_84de.8e867e98.js +1 -0
- frontend/kotlin_95b4.b48f3621.js +1 -0
- frontend/kusto_d35c.06b7232a.js +1 -0
- frontend/laserwave_d064.03af1caf.js +1 -0
- frontend/latex_2a10.52e53c4e.js +1 -0
- frontend/lean_ef17.903dd610.js +1 -0
- frontend/light-plus_5568.b51f3bc4.js +1 -0
- frontend/liquid_8e13.99fe0413.js +1 -0
- frontend/lite_f9dd.7a8881e9.js +1 -0
- frontend/llvm_ab28.97e49655.js +1 -0
- frontend/log_012d.cf52f345.js +1 -0
- frontend/logo_d347.620317f9.js +1 -0
- frontend/luau_6cf4.ad95007f.js +1 -0
- frontend/make_1440.ae59f7e7.js +1 -0
- frontend/marko_9ca9.74c0bada.js +1 -0
- frontend/material-theme-darker_f70e.dba0eb87.js +1 -0
- frontend/material-theme-lighter_168a.4e118b74.js +1 -0
- frontend/material-theme-ocean_694d.fe18d653.js +1 -0
- frontend/material-theme-palenight_6100.8099ab7a.js +1 -0
- frontend/material-theme_29e7.a0d11ba0.js +1 -0
- frontend/matlab_7579.38fea88f.js +1 -0
- frontend/mdc_b06f.e71eb5f8.js +1 -0
- frontend/mdx_abf9.8a51d2ac.js +1 -0
- frontend/mermaid-GHXKKRXX_fcfe.a08cf817.js +1 -0
- frontend/mermaid_ac1a.0cc8e672.js +1 -0
- frontend/min-dark_5c90.d8255ff2.js +1 -0
- frontend/min-light_a3a0.34e24d3c.js +1 -0
- frontend/mindmap-definition-QFDTVHPH_04b2.1319a530.js +1 -0
- frontend/mindmap-definition-QFDTVHPH_61c5.a1a8d3de.js +90 -0
- frontend/mipsasm_9b83.d7f7fc2d.js +1 -0
- frontend/mojo_70e7.4748c6cf.js +1 -0
- frontend/monokai_235b.3e871d66.js +1 -0
- frontend/moonbit_afe1.50921d0f.js +1 -0
- frontend/move_7196.fae373a1.js +1 -0
- frontend/narrat_38a8.34ed9a65.js +1 -0
- frontend/nextflow-groovy_1c99.ae57c666.js +1 -0
- frontend/nextflow_ada1.31973d1d.js +1 -0
- frontend/nginx_8b59.2611a345.js +1 -0
- frontend/night-owl-light_b429.9f1fb989.js +1 -0
- frontend/night-owl_9134.346851cb.js +1 -0
- frontend/nim_abe1.29fba78b.js +1 -0
- frontend/nim_f359.af70f477.js +1 -0
- frontend/nix_0aec.6843c846.js +1 -0
- frontend/nord_43fa.5d9edcd1.js +1 -0
- frontend/nushell_4701.94142839.js +1 -0
- frontend/o200k_base_bc33.ba57d828.js +1 -0
- frontend/o200k_base_e3b0.4cc66435.js +1 -0
- frontend/objective-c_3781.ec78e6e9.js +1 -0
- frontend/objective-cpp_ca8a.8a352604.js +1 -0
- frontend/ocaml_c889.d04bf593.js +1 -0
- frontend/odin_c7c4.f1ac1155.js +1 -0
- frontend/one-dark-pro_27ca.0abef63c.js +1 -0
- frontend/one-light_b7c6.f0d5fcf4.js +1 -0
- frontend/openscad_cd9e.3f6a4d3c.js +1 -0
- frontend/packet-4T2RLAQJ_a074.d2b74010.js +1 -0
- frontend/pascal_783b.0341d117.js +1 -0
- frontend/perl_f157.1ece7752.js +1 -0
- frontend/pie-ZZUOXDRM_b88b.e70e3b77.js +1 -0
- frontend/pieDiagram-DEJITSTG_0e3f.54ed6dd7.js +29 -0
- frontend/pkl_9ed7.8ab6d16e.js +1 -0
- frontend/plastic_bdfc.aed063ca.js +1 -0
- frontend/plsql_cd3c.07ab562e.js +1 -0
- frontend/po_8f55.d0f5d029.js +1 -0
- frontend/poimandres_5c90.2e7253c8.js +1 -0
- frontend/polar_6fd9.4294463d.js +1 -0
- frontend/powerquery_deff.f37201b8.js +1 -0
- frontend/powershell_3bb6.edd5e06d.js +1 -0
- frontend/prisma_f9c1.33807636.js +1 -0
- frontend/prolog_ba5c.c5dd637e.js +1 -0
- frontend/proto_5c4d.b9b9a14a.js +1 -0
- frontend/pug_e7db.4c8d8f5e.js +1 -0
- frontend/puppet_971e.33940bed.js +1 -0
- frontend/purescript_9124.36b9ac48.js +1 -0
- frontend/qml_4329.7b651d3c.js +1 -0
- frontend/qmldir_0627.5fcbd9a3.js +1 -0
- frontend/qss_4b81.bf58bda5.js +1 -0
- frontend/quadrantDiagram-34T5L4WZ_edc8.b9e1e1ac.js +1 -0
- frontend/racket_3ca4.f794c162.js +1 -0
- frontend/radar-PYXPWWZC_c91c.7e4e5c4f.js +1 -0
- frontend/raku_5553.af4da2e5.js +1 -0
- frontend/razor_6a5f.2972be11.js +1 -0
- frontend/razor_84f8.8498e900.js +1 -0
- frontend/red_d0fb.dcf8b3f9.js +1 -0
- frontend/reg_465c.245e6d67.js +1 -0
- frontend/rel_5e6c.1683b27b.js +1 -0
- frontend/renderers_4faa.b4c59b16.js +9 -0
- frontend/renderers_5bb3.b30ef545.js +14 -0
- frontend/renderers_ddbf.dd215c00.js +1 -0
- frontend/requirementDiagram-MS252O5E_1a93.ef6261f9.js +79 -0
- frontend/riscv_0e86.19123e91.js +1 -0
- frontend/ron_285a.8d27bda1.js +1 -0
- frontend/rose-pine-dawn_a9fd.f84d7ac1.js +1 -0
- frontend/rose-pine-moon_430b.d98acf59.js +1 -0
- frontend/rose-pine_bc03.6628f9b7.js +1 -0
- frontend/rosmsg_7dc3.cd54845c.js +1 -0
- frontend/rst_483c.5c4a0886.js +1 -0
- frontend/rst_5c1b.e78cc2e2.js +1 -0
- frontend/rust_3110.223308c5.js +1 -0
- frontend/sankeyDiagram-XADWPNL6_7156.d14f8d7f.js +4 -0
- frontend/sas_1f1b.ddd3df58.js +1 -0
- frontend/sass_a8e8.e4f0683c.js +1 -0
- frontend/scala_d1b1.1d57d5b5.js +1 -0
- frontend/scheme_cdf1.abc2ccee.js +1 -0
- frontend/sdbl_f675.624fba1f.js +1 -0
- frontend/sequenceDiagram-FGHM5R23_ceb5.21cdc562.js +148 -0
- frontend/shaderlab_9dce.e76c742d.js +1 -0
- frontend/shaderlab_d853.6551c0f5.js +1 -0
- frontend/shellsession_003c.8b32c5f2.js +1 -0
- frontend/slack-dark_bb20.919a1434.js +1 -0
- frontend/slack-ochin_f8b7.483ec717.js +1 -0
- frontend/smalltalk_6e6c.72cf20fb.js +1 -0
- frontend/snazzy-light_85aa.a10b17d3.js +1 -0
- frontend/solarized-dark_1d60.41976821.js +1 -0
- frontend/solarized-light_dc7f.aa5990d7.js +1 -0
- frontend/solidity_8151.848a6308.js +1 -0
- frontend/soy_d31a.a3e27f95.js +1 -0
- frontend/sparql_1f37.e7a68095.js +1 -0
- frontend/splunk_9f54.49eebf9d.js +1 -0
- frontend/ssh-config_98fd.d3ef4039.js +1 -0
- frontend/stata_022f.7caad294.js +1 -0
- frontend/stateDiagram-FHFEXIEX_6916.0f1dbe48.js +1 -0
- frontend/stateDiagram-FHFEXIEX_9e52.97b0edb0.js +1 -0
- frontend/stateDiagram-v2-QKLJ7IA2_b07a.ad565929.js +226 -0
- frontend/stateDiagram-v2-QKLJ7IA2_e632.3a118bbe.js +1 -0
- frontend/summary-panel_00fd.9316e4a9.js +2 -0
- frontend/summary-panel_00fd.9316e4a9.js.map +1 -0
- frontend/summary-panel_d5a9.d1f011e1.css +2 -0
- frontend/summary-panel_d5a9.d1f011e1.css.map +1 -0
- frontend/surrealql_1339.30275818.js +1 -0
- frontend/svelte_601e.99bfb9cd.js +1 -0
- frontend/swift_967b.eb96ec8d.js +1 -0
- frontend/synthwave-84_c969.d61a1635.js +1 -0
- frontend/system-verilog_2513.c69072df.js +1 -0
- frontend/systemd_bd84.d2155dc5.js +1 -0
- frontend/talonscript_9f9d.6472e37b.js +1 -0
- frontend/tasl_b7a7.9e5e8fdc.js +1 -0
- frontend/tcl_aae3.cd7200ec.js +1 -0
- frontend/templ_076d.8b76fb1f.js +1 -0
- frontend/templ_95a4.17744bd5.js +1 -0
- frontend/terraform_1b76.5340d4b5.js +1 -0
- frontend/tex_5c62.9e5ce53a.js +1 -0
- frontend/tex_da98.750166ac.js +1 -0
- frontend/timeline-definition-GMOUNBTQ_029b.cec2ab0d.js +115 -0
- frontend/tokyo-night_352c.e7b85338.js +1 -0
- frontend/toml_f78d.215c3a5d.js +1 -0
- frontend/treeView-SZITEDCU_0ee9.74fa8a7f.js +1 -0
- frontend/treemap-W4RFUUIX_df56.7e2902af.js +1 -0
- frontend/ts-tags_666e.cfab363b.js +1 -0
- frontend/tsv_42f2.e1e50017.js +1 -0
- frontend/turtle_a05b.7859e46f.js +1 -0
- frontend/twig_2d9a.0e73b4ae.js +1 -0
- frontend/twig_4cae.c28a751c.js +1 -0
- frontend/twig_5112.17b5eb81.js +1 -0
- frontend/twig_51bf.a9f4a028.js +1 -0
- frontend/twig_538b.71340bc3.js +1 -0
- frontend/twig_54a6.218f7234.js +1 -0
- frontend/twig_558b.bac2b380.js +1 -0
- frontend/twig_7a66.c9995fe5.js +1 -0
- frontend/twig_a5c5.ac4847ab.js +1 -0
- frontend/twig_b492.063bf08b.js +1 -0
- frontend/twig_c3c3.d82617c5.js +1 -0
- frontend/twig_c893.f67d784a.js +1 -0
- frontend/twig_d044.3fdab553.js +1 -0
- frontend/twig_e87b.68e7e8a4.js +1 -0
- frontend/twig_fd72.aed9c356.js +1 -0
- frontend/typespec_bf83.601af9b1.js +1 -0
- frontend/typst_611d.47291ed8.js +1 -0
- frontend/v_f930.10d85c6d.js +1 -0
- frontend/vala_3179.b2fc07cb.js +1 -0
- frontend/vb_a12f.1eb399c8.js +1 -0
- frontend/vennDiagram-DHZGUBPP_9dfb.d92ddc4d.js +23 -0
- frontend/verilog_a710.469e4bbc.js +1 -0
- frontend/vesper_a286.062fd32f.js +1 -0
- frontend/vhdl_9601.3cee7220.js +1 -0
- frontend/viml_55b7.2c1b9480.js +1 -0
- frontend/vitesse-black_1db4.999800c9.js +1 -0
- frontend/vitesse-dark_2d91.10e86cd9.js +1 -0
- frontend/vitesse-light_4ed0.237fa728.js +1 -0
- frontend/vue-html_c053.a12104d1.js +1 -0
- frontend/vue-vine_164d.0b8ee429.js +1 -0
- frontend/vue-vine_337d.dccfaa8c.js +1 -0
- frontend/vue-vine_3535.2fde1fdc.js +1 -0
- frontend/vue-vine_4c00.b1231bc0.js +1 -0
- frontend/vue-vine_6dbf.4f666348.js +1 -0
- frontend/vue-vine_898c.92f4dc1f.js +1 -0
- frontend/vue-vine_cd58.c340c247.js +1 -0
- frontend/vue_0979.337d51c1.js +1 -0
- frontend/vue_315c.1611934c.js +1 -0
- frontend/vue_795f.4ef379ac.js +1 -0
- frontend/vue_8819.7973ccfc.js +1 -0
- frontend/vue_d05e.51617ac5.js +1 -0
- frontend/vyper_e451.aabb3a2b.js +1 -0
- frontend/wardley-RL74JXVD_0475.7a449935.js +1 -0
- frontend/wardleyDiagram-NUSXRM2D_13f0.32279fc4.js +1 -0
- frontend/wardleyDiagram-NUSXRM2D_161b.a46906ab.js +1 -0
- frontend/wardleyDiagram-NUSXRM2D_2539.c2eeb87e.js +1 -0
- frontend/wardleyDiagram-NUSXRM2D_313b.74685f3b.js +1 -0
- frontend/wardleyDiagram-NUSXRM2D_36ad.74f1abf7.js +1 -0
- frontend/wardleyDiagram-NUSXRM2D_4825.de4f970f.js +1 -0
- frontend/wardleyDiagram-NUSXRM2D_6356.8548da39.js +4 -0
- frontend/wardleyDiagram-NUSXRM2D_9e22.a60b1f43.js +1 -0
- frontend/wardleyDiagram-NUSXRM2D_9ffa.1bd5034f.js +1 -0
- frontend/wardleyDiagram-NUSXRM2D_a230.910f9fa8.js +19 -0
- frontend/wardleyDiagram-NUSXRM2D_a475.4d5e6fe9.js +1 -0
- frontend/wardleyDiagram-NUSXRM2D_beff.c8810211.js +1 -0
- frontend/wardleyDiagram-NUSXRM2D_c010.2866c317.js +1 -0
- frontend/wardleyDiagram-NUSXRM2D_c2d0.aa796e35.js +21 -0
- frontend/wardleyDiagram-NUSXRM2D_c3b1.e740cc70.js +1 -0
- frontend/wardleyDiagram-NUSXRM2D_c44c.2ef6ac54.js +57 -0
- frontend/wardleyDiagram-NUSXRM2D_e356.897f926d.js +1 -0
- frontend/wardleyDiagram-NUSXRM2D_f5f6.d4281812.js +1 -0
- frontend/wardleyDiagram-NUSXRM2D_fab3.99c6da73.js +1 -0
- frontend/wardleyDiagram-NUSXRM2D_fb40.0de77f0f.js +3 -0
- frontend/wasm_924c.17e410b1.js +1 -0
- frontend/wenyan_8115.ed11e8de.js +1 -0
- frontend/wgsl_bb9e.7943c1dc.js +1 -0
- frontend/wikitext_7d26.1ec45a2e.js +1 -0
- frontend/wit_aaa5.b9f2704b.js +1 -0
- frontend/wolfram_7ed4.228661f8.js +1 -0
- frontend/xsl_9486.fb899b53.js +1 -0
- frontend/xsl_978a.b066fca6.js +1 -0
- frontend/xsl_de89.1598d9bd.js +1 -0
- frontend/xychartDiagram-5P7HB3ND_f819.0d61d612.js +1 -0
- frontend/yaml_126c.ff9d0dca.js +1 -0
- frontend/zenscript_f6e1.bdd84c4c.js +1 -0
- frontend/zig_f3e1.1974109a.js +1 -0
- openfic-0.4.1.dist-info/METADATA +137 -0
- openfic-0.4.1.dist-info/RECORD +1009 -0
- openfic-0.4.1.dist-info/WHEEL +4 -0
- openfic-0.4.1.dist-info/entry_points.txt +2 -0
- openfic-0.4.1.dist-info/licenses/LICENSE +202 -0
LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
alembic.ini
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# A generic, single database configuration.
|
|
2
|
+
|
|
3
|
+
[alembic]
|
|
4
|
+
# path to migration scripts.
|
|
5
|
+
# this is typically a path given in POSIX (e.g. forward slashes)
|
|
6
|
+
# format, relative to the token %(here)s which refers to the location of this
|
|
7
|
+
# ini file
|
|
8
|
+
script_location = %(here)s/app/storage/migrations
|
|
9
|
+
|
|
10
|
+
# template used to generate migration file names; The default value is %%(rev)s_%%(slug)s
|
|
11
|
+
# Uncomment the line below if you want the files to be prepended with date and time
|
|
12
|
+
# see https://alembic.sqlalchemy.org/en/latest/tutorial.html#editing-the-ini-file
|
|
13
|
+
# for all available tokens
|
|
14
|
+
# file_template = %%(year)d_%%(month).2d_%%(day).2d_%%(hour).2d%%(minute).2d-%%(rev)s_%%(slug)s
|
|
15
|
+
|
|
16
|
+
# sys.path path, will be prepended to sys.path if present.
|
|
17
|
+
# defaults to the current working directory. for multiple paths, the path separator
|
|
18
|
+
# is defined by "path_separator" below.
|
|
19
|
+
prepend_sys_path = .
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# timezone to use when rendering the date within the migration file
|
|
23
|
+
# as well as the filename.
|
|
24
|
+
# If specified, requires the tzdata library which can be installed by adding
|
|
25
|
+
# `alembic[tz]` to the pip requirements.
|
|
26
|
+
# string value is passed to ZoneInfo()
|
|
27
|
+
# leave blank for localtime
|
|
28
|
+
# timezone =
|
|
29
|
+
|
|
30
|
+
# max length of characters to apply to the "slug" field
|
|
31
|
+
# truncate_slug_length = 40
|
|
32
|
+
|
|
33
|
+
# set to 'true' to run the environment during
|
|
34
|
+
# the 'revision' command, regardless of autogenerate
|
|
35
|
+
# revision_environment = false
|
|
36
|
+
|
|
37
|
+
# set to 'true' to allow .pyc and .pyo files without
|
|
38
|
+
# a source .py file to be detected as revisions in the
|
|
39
|
+
# versions/ directory
|
|
40
|
+
# sourceless = false
|
|
41
|
+
|
|
42
|
+
# version location specification; This defaults
|
|
43
|
+
# to <script_location>/versions. When using multiple version
|
|
44
|
+
# directories, initial revisions must be specified with --version-path.
|
|
45
|
+
# The path separator used here should be the separator specified by "path_separator"
|
|
46
|
+
# below.
|
|
47
|
+
# version_locations = %(here)s/bar:%(here)s/bat:%(here)s/alembic/versions
|
|
48
|
+
|
|
49
|
+
# path_separator; This indicates what character is used to split lists of file
|
|
50
|
+
# paths, including version_locations and prepend_sys_path within configparser
|
|
51
|
+
# files such as alembic.ini.
|
|
52
|
+
# The default rendered in new alembic.ini files is "os", which uses os.pathsep
|
|
53
|
+
# to provide os-dependent path splitting.
|
|
54
|
+
#
|
|
55
|
+
# Note that in order to support legacy alembic.ini files, this default does NOT
|
|
56
|
+
# take place if path_separator is not present in alembic.ini. If this
|
|
57
|
+
# option is omitted entirely, fallback logic is as follows:
|
|
58
|
+
#
|
|
59
|
+
# 1. Parsing of the version_locations option falls back to using the legacy
|
|
60
|
+
# "version_path_separator" key, which if absent then falls back to the legacy
|
|
61
|
+
# behavior of splitting on spaces and/or commas.
|
|
62
|
+
# 2. Parsing of the prepend_sys_path option falls back to the legacy
|
|
63
|
+
# behavior of splitting on spaces, commas, or colons.
|
|
64
|
+
#
|
|
65
|
+
# Valid values for path_separator are:
|
|
66
|
+
#
|
|
67
|
+
# path_separator = :
|
|
68
|
+
# path_separator = ;
|
|
69
|
+
# path_separator = space
|
|
70
|
+
# path_separator = newline
|
|
71
|
+
#
|
|
72
|
+
# Use os.pathsep. Default configuration used for new projects.
|
|
73
|
+
path_separator = os
|
|
74
|
+
|
|
75
|
+
# set to 'true' to search source files recursively
|
|
76
|
+
# in each "version_locations" directory
|
|
77
|
+
# new in Alembic version 1.10
|
|
78
|
+
# recursive_version_locations = false
|
|
79
|
+
|
|
80
|
+
# the output encoding used when revision files
|
|
81
|
+
# are written from script.py.mako
|
|
82
|
+
# output_encoding = utf-8
|
|
83
|
+
|
|
84
|
+
# database URL. This is consumed by the user-maintained env.py script only.
|
|
85
|
+
# other means of configuring database URLs may be customized within the env.py
|
|
86
|
+
# file.
|
|
87
|
+
# sqlalchemy.url = driver://user:pass@localhost/dbname
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
[post_write_hooks]
|
|
91
|
+
# post_write_hooks defines scripts or Python functions that are run
|
|
92
|
+
# on newly generated revision scripts. See the documentation for further
|
|
93
|
+
# detail and examples
|
|
94
|
+
|
|
95
|
+
# format using "black" - use the console_scripts runner, against the "black" entrypoint
|
|
96
|
+
# hooks = black
|
|
97
|
+
# black.type = console_scripts
|
|
98
|
+
# black.entrypoint = black
|
|
99
|
+
# black.options = -l 79 REVISION_SCRIPT_FILENAME
|
|
100
|
+
|
|
101
|
+
# lint with attempts to fix using "ruff" - use the module runner, against the "ruff" module
|
|
102
|
+
# hooks = ruff
|
|
103
|
+
# ruff.type = module
|
|
104
|
+
# ruff.module = ruff
|
|
105
|
+
# ruff.options = check --fix REVISION_SCRIPT_FILENAME
|
|
106
|
+
|
|
107
|
+
# Alternatively, use the exec runner to execute a binary found on your PATH
|
|
108
|
+
# hooks = ruff
|
|
109
|
+
# ruff.type = exec
|
|
110
|
+
# ruff.executable = ruff
|
|
111
|
+
# ruff.options = check --fix REVISION_SCRIPT_FILENAME
|
|
112
|
+
|
|
113
|
+
# Logging configuration. This is also consumed by the user-maintained
|
|
114
|
+
# env.py script only.
|
|
115
|
+
[loggers]
|
|
116
|
+
keys = root,sqlalchemy,alembic
|
|
117
|
+
|
|
118
|
+
[handlers]
|
|
119
|
+
keys = console
|
|
120
|
+
|
|
121
|
+
[formatters]
|
|
122
|
+
keys = generic
|
|
123
|
+
|
|
124
|
+
[logger_root]
|
|
125
|
+
level = WARNING
|
|
126
|
+
handlers = console
|
|
127
|
+
qualname =
|
|
128
|
+
|
|
129
|
+
[logger_sqlalchemy]
|
|
130
|
+
level = WARNING
|
|
131
|
+
handlers =
|
|
132
|
+
qualname = sqlalchemy.engine
|
|
133
|
+
|
|
134
|
+
[logger_alembic]
|
|
135
|
+
level = INFO
|
|
136
|
+
handlers =
|
|
137
|
+
qualname = alembic
|
|
138
|
+
|
|
139
|
+
[handler_console]
|
|
140
|
+
class = StreamHandler
|
|
141
|
+
args = (sys.stderr,)
|
|
142
|
+
level = NOTSET
|
|
143
|
+
formatter = generic
|
|
144
|
+
|
|
145
|
+
[formatter_generic]
|
|
146
|
+
format = %(levelname)-5.5s [%(name)s] %(message)s
|
|
147
|
+
datefmt = %H:%M:%S
|
app/__init__.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import warnings
|
|
3
|
+
|
|
4
|
+
from langchain_core._api.deprecation import LangChainPendingDeprecationWarning
|
|
5
|
+
|
|
6
|
+
os.environ.setdefault("LANGGRAPH_STRICT_MSGPACK", "true")
|
|
7
|
+
warnings.filterwarnings(
|
|
8
|
+
"ignore",
|
|
9
|
+
message="The default value of `allowed_objects` will change in a future version.*",
|
|
10
|
+
category=LangChainPendingDeprecationWarning,
|
|
11
|
+
)
|
|
12
|
+
warnings.filterwarnings(
|
|
13
|
+
"ignore",
|
|
14
|
+
message=r"encoding_format is not default parameter.*",
|
|
15
|
+
category=UserWarning,
|
|
16
|
+
)
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
from app.agent_runtime.types import TerminationCondition, ReactAgentConfig
|
|
2
|
+
from app.agent_runtime.graph.state import AgentRuntimeState
|
|
3
|
+
from app.agent_runtime.graph.orchestrator import OrchestratorState, build_orchestrator_graph
|
|
4
|
+
from app.agent_runtime.runner.session_runner import SessionRunner
|
|
5
|
+
from app.agent_runtime.tools import AgentTool, ToolRegistry, ToolExecutionError
|
|
6
|
+
from app.agent_runtime.persistence import (
|
|
7
|
+
MessagePersister,
|
|
8
|
+
PersistedMessage,
|
|
9
|
+
PersistenceError,
|
|
10
|
+
PersistenceLoadError,
|
|
11
|
+
PersistenceWriteError,
|
|
12
|
+
load_history,
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
__all__ = [
|
|
16
|
+
"TerminationCondition",
|
|
17
|
+
"ReactAgentConfig",
|
|
18
|
+
"AgentRuntimeState",
|
|
19
|
+
"OrchestratorState",
|
|
20
|
+
"build_orchestrator_graph",
|
|
21
|
+
"SessionRunner",
|
|
22
|
+
"AgentTool",
|
|
23
|
+
"ToolRegistry",
|
|
24
|
+
"ToolExecutionError",
|
|
25
|
+
"MessagePersister",
|
|
26
|
+
"PersistedMessage",
|
|
27
|
+
"PersistenceError",
|
|
28
|
+
"PersistenceLoadError",
|
|
29
|
+
"PersistenceWriteError",
|
|
30
|
+
"load_history",
|
|
31
|
+
]
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"""Code-owned agent definitions for the PA/SA runtime."""
|
|
2
|
+
|
|
3
|
+
from app.agent_runtime.agents.definitions import (
|
|
4
|
+
DEFAULT_AGENT_DEFINITIONS,
|
|
5
|
+
DEFAULT_AGENT_KEYS,
|
|
6
|
+
AgentDefinition,
|
|
7
|
+
get_default_agent_definition,
|
|
8
|
+
)
|
|
9
|
+
from app.agent_runtime.agents.tool_categories import (
|
|
10
|
+
TOOL_CATEGORIES,
|
|
11
|
+
get_tool_names_for_categories,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
__all__ = [
|
|
15
|
+
"AgentDefinition",
|
|
16
|
+
"DEFAULT_AGENT_DEFINITIONS",
|
|
17
|
+
"DEFAULT_AGENT_KEYS",
|
|
18
|
+
"TOOL_CATEGORIES",
|
|
19
|
+
"get_default_agent_definition",
|
|
20
|
+
"get_tool_names_for_categories",
|
|
21
|
+
]
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
"""Default PA/SA agent definitions."""
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from dataclasses import dataclass
|
|
5
|
+
from types import MappingProxyType
|
|
6
|
+
from typing import Any, Literal
|
|
7
|
+
|
|
8
|
+
from sqlalchemy import select
|
|
9
|
+
from sqlalchemy.ext.asyncio import AsyncSession
|
|
10
|
+
from sqlmodel import col
|
|
11
|
+
|
|
12
|
+
from app.agent_runtime.persistence.model import AgentDefinitionRecord
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@dataclass(frozen=True)
|
|
16
|
+
class AgentDefinition:
|
|
17
|
+
key: str
|
|
18
|
+
display_name: str
|
|
19
|
+
description: str
|
|
20
|
+
kind: Literal["primary", "subagent"]
|
|
21
|
+
prompt_agent_name: str
|
|
22
|
+
model_id: str | None
|
|
23
|
+
tool_category_keys: tuple[str, ...]
|
|
24
|
+
enabled_skill_ids: tuple[str, ...]
|
|
25
|
+
metadata: Mapping[str, Any]
|
|
26
|
+
enabled: bool = True
|
|
27
|
+
source: Literal["builtin", "custom"] = "builtin"
|
|
28
|
+
delegatable_agents: tuple[str, ...] = ()
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
DEFAULT_AGENT_KEYS: tuple[str, ...] = (
|
|
32
|
+
"primary",
|
|
33
|
+
"explorer",
|
|
34
|
+
"composer",
|
|
35
|
+
"auditor",
|
|
36
|
+
"writer",
|
|
37
|
+
"actor",
|
|
38
|
+
"reviewer",
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
DEFAULT_AGENT_DEFINITIONS: Mapping[str, AgentDefinition] = MappingProxyType(
|
|
43
|
+
{
|
|
44
|
+
"primary": AgentDefinition(
|
|
45
|
+
key="primary",
|
|
46
|
+
display_name="Orchestrator",
|
|
47
|
+
description="负责任务拆解、调度子智能体并整合最终结果。",
|
|
48
|
+
kind="primary",
|
|
49
|
+
prompt_agent_name="primary",
|
|
50
|
+
model_id=None,
|
|
51
|
+
tool_category_keys=(
|
|
52
|
+
"orchestration",
|
|
53
|
+
"interaction",
|
|
54
|
+
"plan_read",
|
|
55
|
+
"plan_write",
|
|
56
|
+
"chapter_read",
|
|
57
|
+
"summary_read",
|
|
58
|
+
"world_read",
|
|
59
|
+
"note_read",
|
|
60
|
+
"note_write",
|
|
61
|
+
),
|
|
62
|
+
enabled_skill_ids=(),
|
|
63
|
+
metadata=MappingProxyType({}),
|
|
64
|
+
),
|
|
65
|
+
"explorer": AgentDefinition(
|
|
66
|
+
key="explorer",
|
|
67
|
+
display_name="Explorer",
|
|
68
|
+
description="负责信息搜集、上下文梳理与证据查找",
|
|
69
|
+
kind="subagent",
|
|
70
|
+
prompt_agent_name="explorer",
|
|
71
|
+
model_id=None,
|
|
72
|
+
tool_category_keys=(
|
|
73
|
+
"chapter_read",
|
|
74
|
+
"summary_read",
|
|
75
|
+
"world_read",
|
|
76
|
+
"note_read",
|
|
77
|
+
),
|
|
78
|
+
enabled_skill_ids=(),
|
|
79
|
+
metadata=MappingProxyType({}),
|
|
80
|
+
),
|
|
81
|
+
"composer": AgentDefinition(
|
|
82
|
+
key="composer",
|
|
83
|
+
display_name="Composer",
|
|
84
|
+
description="负责剧情设计、结构规划与写作方案的组织",
|
|
85
|
+
kind="subagent",
|
|
86
|
+
prompt_agent_name="composer",
|
|
87
|
+
model_id=None,
|
|
88
|
+
tool_category_keys=(
|
|
89
|
+
"chapter_read",
|
|
90
|
+
"summary_read",
|
|
91
|
+
"world_read",
|
|
92
|
+
"plan_read",
|
|
93
|
+
"note_read",
|
|
94
|
+
"note_write",
|
|
95
|
+
),
|
|
96
|
+
enabled_skill_ids=(),
|
|
97
|
+
metadata=MappingProxyType({}),
|
|
98
|
+
),
|
|
99
|
+
"auditor": AgentDefinition(
|
|
100
|
+
key="auditor",
|
|
101
|
+
display_name="Auditor",
|
|
102
|
+
description="负责审查计划,产出评审意见、指出问题并提出修正建议。",
|
|
103
|
+
kind="subagent",
|
|
104
|
+
prompt_agent_name="auditor",
|
|
105
|
+
model_id=None,
|
|
106
|
+
tool_category_keys=(
|
|
107
|
+
"chapter_read",
|
|
108
|
+
"summary_read",
|
|
109
|
+
"world_read",
|
|
110
|
+
"plan_read",
|
|
111
|
+
"note_read",
|
|
112
|
+
),
|
|
113
|
+
enabled_skill_ids=(),
|
|
114
|
+
metadata=MappingProxyType({}),
|
|
115
|
+
),
|
|
116
|
+
"writer": AgentDefinition(
|
|
117
|
+
key="writer",
|
|
118
|
+
display_name="Writer",
|
|
119
|
+
description="负责章节内容撰写、补写与正文修改。",
|
|
120
|
+
kind="subagent",
|
|
121
|
+
prompt_agent_name="writer",
|
|
122
|
+
model_id=None,
|
|
123
|
+
tool_category_keys=(
|
|
124
|
+
"chapter_read",
|
|
125
|
+
"summary_read",
|
|
126
|
+
"world_read",
|
|
127
|
+
"plan_read",
|
|
128
|
+
"chapter_write",
|
|
129
|
+
"note_read",
|
|
130
|
+
"note_write",
|
|
131
|
+
),
|
|
132
|
+
enabled_skill_ids=(),
|
|
133
|
+
metadata=MappingProxyType({}),
|
|
134
|
+
),
|
|
135
|
+
"actor": AgentDefinition(
|
|
136
|
+
key="actor",
|
|
137
|
+
display_name="Actor",
|
|
138
|
+
description="负责按既定目标执行修改并推进具体动作。",
|
|
139
|
+
kind="subagent",
|
|
140
|
+
prompt_agent_name="actor",
|
|
141
|
+
model_id=None,
|
|
142
|
+
tool_category_keys=(
|
|
143
|
+
"chapter_read",
|
|
144
|
+
"summary_read",
|
|
145
|
+
"world_read",
|
|
146
|
+
"plan_read",
|
|
147
|
+
"chapter_write",
|
|
148
|
+
"note_read",
|
|
149
|
+
"note_write",
|
|
150
|
+
),
|
|
151
|
+
enabled_skill_ids=(),
|
|
152
|
+
metadata=MappingProxyType({}),
|
|
153
|
+
),
|
|
154
|
+
"reviewer": AgentDefinition(
|
|
155
|
+
key="reviewer",
|
|
156
|
+
display_name="Reviewer",
|
|
157
|
+
description="负责审查写作内容,产出评审意见、指出问题并提出修正建议。",
|
|
158
|
+
kind="subagent",
|
|
159
|
+
prompt_agent_name="reviewer",
|
|
160
|
+
model_id=None,
|
|
161
|
+
tool_category_keys=(
|
|
162
|
+
"chapter_read",
|
|
163
|
+
"summary_read",
|
|
164
|
+
"world_read",
|
|
165
|
+
"plan_read",
|
|
166
|
+
),
|
|
167
|
+
enabled_skill_ids=(),
|
|
168
|
+
metadata=MappingProxyType({}),
|
|
169
|
+
),
|
|
170
|
+
}
|
|
171
|
+
)
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
def get_default_agent_definition(key: str) -> AgentDefinition:
|
|
175
|
+
return DEFAULT_AGENT_DEFINITIONS[key]
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
def agent_definition_from_record(record: AgentDefinitionRecord) -> AgentDefinition:
|
|
179
|
+
return AgentDefinition(
|
|
180
|
+
key=record.key,
|
|
181
|
+
display_name=record.display_name,
|
|
182
|
+
description=record.description,
|
|
183
|
+
kind=record.kind, # type: ignore[arg-type]
|
|
184
|
+
prompt_agent_name=record.prompt_agent_name,
|
|
185
|
+
model_id=record.model_id,
|
|
186
|
+
tool_category_keys=tuple(record.tool_category_keys_json or ()),
|
|
187
|
+
enabled_skill_ids=tuple(record.enabled_skill_ids_json or ()),
|
|
188
|
+
metadata=MappingProxyType(dict(record.metadata_json or {})),
|
|
189
|
+
enabled=record.enabled,
|
|
190
|
+
source=record.source, # type: ignore[arg-type]
|
|
191
|
+
delegatable_agents=tuple(record.delegatable_agents or ()),
|
|
192
|
+
)
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
async def load_agent_definition(
|
|
196
|
+
session: AsyncSession,
|
|
197
|
+
key: str,
|
|
198
|
+
) -> AgentDefinition:
|
|
199
|
+
result = await session.execute(
|
|
200
|
+
select(AgentDefinitionRecord).where(col(AgentDefinitionRecord.key) == key)
|
|
201
|
+
)
|
|
202
|
+
record = result.scalar_one_or_none()
|
|
203
|
+
if record is not None:
|
|
204
|
+
return agent_definition_from_record(record)
|
|
205
|
+
return get_default_agent_definition(key)
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
async def load_all_agent_definitions(
|
|
209
|
+
session: AsyncSession,
|
|
210
|
+
) -> dict[str, AgentDefinition]:
|
|
211
|
+
definitions = dict(DEFAULT_AGENT_DEFINITIONS)
|
|
212
|
+
result = await session.execute(
|
|
213
|
+
select(AgentDefinitionRecord).order_by(
|
|
214
|
+
col(AgentDefinitionRecord.order_index),
|
|
215
|
+
col(AgentDefinitionRecord.key),
|
|
216
|
+
)
|
|
217
|
+
)
|
|
218
|
+
for record in result.scalars():
|
|
219
|
+
definitions[record.key] = agent_definition_from_record(record)
|
|
220
|
+
return definitions
|