@tencent-rtc/trtc-agent-skills 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cursor/rules/main.mdc +12 -0
- package/AGENTS.md +14 -104
- package/CLAUDE.md +15 -127
- package/CODEBUDDY.md +15 -125
- package/README.md +7 -5
- package/README.zh.md +7 -5
- package/bin/cli.js +151 -46
- package/hooks/__pycache__/cursor-adapter.cpython-313.pyc +0 -0
- package/hooks/cursor-adapter.py +45 -18
- package/hooks/hooks-cursor.json +5 -18
- package/hooks/hooks.json +6 -31
- package/knowledge-base/chat/web/index.yaml +168 -0
- package/knowledge-base/chat/web/path-d-signals.yaml +4 -0
- package/knowledge-base/conference/web/index.yaml +143 -0
- package/knowledge-base/docs/chat/debug/GenerateTestUserSig.js +23 -0
- package/knowledge-base/docs/chat/debug/lib-generate-test-usersig.min.js +1 -0
- package/knowledge-base/docs/chat/gen-usersig.md +129 -0
- package/knowledge-base/docs/chat/product.md +61 -0
- package/knowledge-base/docs/chat/restapi.md +227 -0
- package/knowledge-base/docs/chat/sdk/android/faq.md +7 -0
- package/knowledge-base/docs/chat/sdk/android/index.md +94 -0
- package/knowledge-base/docs/chat/sdk/flutter/faq.md +7 -0
- package/knowledge-base/docs/chat/sdk/flutter/index.md +83 -0
- package/knowledge-base/docs/chat/sdk/ios/faq.md +7 -0
- package/knowledge-base/docs/chat/sdk/ios/index.md +94 -0
- package/knowledge-base/docs/chat/sdk/web/faq.md +8 -0
- package/knowledge-base/docs/chat/sdk/web/index.md +97 -0
- package/knowledge-base/docs/chat/uikit/android/index.md +28 -0
- package/knowledge-base/docs/chat/uikit/flutter/index.md +17 -0
- package/knowledge-base/docs/chat/uikit/ios/index.md +28 -0
- package/knowledge-base/docs/chat/uikit/react/index.md +6 -0
- package/knowledge-base/docs/chat/uikit/uniapp/index.md +6 -0
- package/knowledge-base/docs/chat/uikit/vue3/index.md +6 -0
- package/knowledge-base/docs/chat/webhook.md +73 -0
- package/knowledge-base/platform-slice-template.md +1041 -133
- package/knowledge-base/products.yaml +76 -0
- package/knowledge-base/scenario-spec.md +1316 -115
- package/knowledge-base/scenarios/conference/base/general-conference.md +22 -2
- package/knowledge-base/scenarios/conference/base/webinar-conference.md +14 -0
- package/knowledge-base/scenarios/conference/medical/1v1-video-consultation.md +19 -0
- package/knowledge-base/scenarios/conference/medical/medical-multidoctor-consultation.md +13 -0
- package/knowledge-base/scenarios/live/entertainment-live-room.md +12 -0
- package/knowledge-base/slice-spec.md +2377 -299
- package/knowledge-base/slices/chat/web/at-mention.md +417 -0
- package/knowledge-base/slices/chat/web/conversation-actions.md +178 -0
- package/knowledge-base/slices/chat/web/conversation-list.md +368 -0
- package/knowledge-base/slices/chat/web/detect-integration.md +36 -0
- package/knowledge-base/slices/chat/web/detect-style.md +88 -0
- package/knowledge-base/slices/chat/web/direct-chat-entry.md +210 -0
- package/knowledge-base/slices/chat/web/login-auth.md +244 -0
- package/knowledge-base/slices/chat/web/message-base-actions.md +273 -0
- package/knowledge-base/slices/chat/web/message-input.md +209 -0
- package/knowledge-base/slices/chat/web/message-list.md +532 -0
- package/knowledge-base/slices/chat/web/send-custom-message.md +189 -0
- package/knowledge-base/slices/chat/web/send-media.md +214 -0
- package/knowledge-base/slices/chat/web/state-api-skeleton.md +60 -0
- package/knowledge-base/slices/chat/web/style-guide.md +210 -0
- package/knowledge-base/slices/conference/web/integration-audit.md +1 -1
- package/knowledge-base/slices/conference/web/login-auth.md +14 -1
- package/knowledge-base/tooling/aliases.yaml +92 -0
- package/knowledge-base/tooling/intent-signals.yaml +181 -0
- package/knowledge-base/tooling/symptom-keywords.yaml +21 -0
- package/package.json +4 -1
- package/skills/trtc/SKILL.md +249 -258
- package/skills/trtc/hooks/__pycache__/report_prompt.cpython-313.pyc +0 -0
- package/skills/{trtc-topic/guardrails → trtc/hooks}/gate_slice_read.py +12 -8
- package/skills/{trtc-topic/guardrails → trtc/hooks}/gate_slice_write.py +16 -12
- package/skills/{trtc-topic/guardrails → trtc/hooks}/stop_require_apply_evidence.py +22 -14
- package/skills/trtc/hooks/topic_phase_gate.py +166 -0
- package/skills/{trtc-topic → trtc}/runtime/README.md +2 -2
- package/skills/{trtc-onboarding/reference/reporting-protocol.md → trtc/runtime/REPORTING.md} +5 -5
- package/skills/{trtc-topic → trtc}/runtime/RUNTIME.md +5 -5
- package/skills/trtc/runtime/lib/__init__.py +0 -0
- package/skills/{trtc-topic → trtc}/runtime/package-lock.json +2 -2
- package/skills/{trtc-topic → trtc}/runtime/package.json +2 -2
- package/skills/{trtc-topic → trtc}/runtime/telemetry-bridge.mjs +1 -1
- package/skills/{trtc-topic/scripts → trtc/tools}/STATE-MACHINE-GUIDE.md +23 -23
- package/skills/trtc/tools/__init__.py +2 -0
- package/skills/trtc/tools/__pycache__/__init__.cpython-313.pyc +0 -0
- package/skills/trtc/tools/__pycache__/query_classifier.cpython-313.pyc +0 -0
- package/skills/trtc/tools/__pycache__/reporting.cpython-313.pyc +0 -0
- package/skills/trtc/tools/__pycache__/search.cpython-313.pyc +0 -0
- package/skills/trtc/tools/__pycache__/session.cpython-313.pyc +0 -0
- package/skills/trtc/tools/apply.py +540 -0
- package/skills/trtc/tools/docs.py +712 -0
- package/skills/trtc/tools/docsbot.py +182 -0
- package/skills/trtc/tools/entry/render_ai_instructions.py +92 -0
- package/skills/trtc/tools/flow.py +1089 -0
- package/skills/{trtc-topic/scripts → trtc/tools}/init_slice_queue.py +5 -4
- package/skills/trtc/tools/kb.py +130 -0
- package/skills/{trtc-topic/scripts → trtc/tools}/next_slice.py +5 -4
- package/skills/trtc/tools/query_classifier.py +301 -0
- package/skills/trtc/tools/reporting.py +468 -0
- package/skills/trtc/tools/reporting_v2.py +263 -0
- package/skills/trtc/tools/search.py +817 -0
- package/skills/trtc/tools/session.py +1261 -0
- package/skills/trtc/tools/state_machine.py +690 -0
- package/skills/trtc-ai-service/README.ja.md +199 -0
- package/skills/trtc-ai-service/README.md +199 -0
- package/skills/trtc-ai-service/README.zh-CN.md +197 -0
- package/skills/trtc-ai-service/SKILL.md +945 -0
- package/skills/trtc-ai-service/auto_adapters/README.md +40 -0
- package/skills/trtc-ai-service/auto_adapters/frontend-spa/README.md +27 -0
- package/skills/trtc-ai-service/auto_adapters/frontend-spa/angular/voice-agent.component.ts.tpl +131 -0
- package/skills/trtc-ai-service/auto_adapters/frontend-spa/manifest.yaml +57 -0
- package/skills/trtc-ai-service/auto_adapters/frontend-spa/react/VoiceAgent.tsx.tpl +142 -0
- package/skills/trtc-ai-service/auto_adapters/frontend-spa/vue/VoiceAgent.vue.tpl +121 -0
- package/skills/trtc-ai-service/auto_adapters/integration_templates/generic-backend.md +45 -0
- package/skills/trtc-ai-service/auto_adapters/integration_templates/generic-frontend.md +51 -0
- package/skills/trtc-ai-service/auto_adapters/integration_templates/generic-rest-api.md +93 -0
- package/skills/trtc-ai-service/auto_adapters/java-backend/README.md +25 -0
- package/skills/trtc-ai-service/auto_adapters/java-backend/manifest.yaml +30 -0
- package/skills/trtc-ai-service/auto_adapters/java-backend/quarkus/VoiceAgentFilter.java.tpl +64 -0
- package/skills/trtc-ai-service/auto_adapters/java-backend/springboot/VoiceAgentFilter.java.tpl +91 -0
- package/skills/trtc-ai-service/auto_adapters/manifest.yaml +43 -0
- package/skills/trtc-ai-service/auto_adapters/node-backend/README.md +25 -0
- package/skills/trtc-ai-service/auto_adapters/node-backend/express.js.tpl +40 -0
- package/skills/trtc-ai-service/auto_adapters/node-backend/fastify.js.tpl +27 -0
- package/skills/trtc-ai-service/auto_adapters/node-backend/koa.js.tpl +31 -0
- package/skills/trtc-ai-service/auto_adapters/node-backend/manifest.yaml +47 -0
- package/skills/trtc-ai-service/auto_adapters/python-backend/README.md +22 -0
- package/skills/trtc-ai-service/auto_adapters/python-backend/django.py.tpl +32 -0
- package/skills/trtc-ai-service/auto_adapters/python-backend/fastapi.py.tpl +35 -0
- package/skills/trtc-ai-service/auto_adapters/python-backend/flask.py.tpl +31 -0
- package/skills/trtc-ai-service/auto_adapters/python-backend/manifest.yaml +45 -0
- package/skills/trtc-ai-service/capabilities/__init__.py +43 -0
- package/skills/trtc-ai-service/capabilities/conversation-core/.env.example +29 -0
- package/skills/trtc-ai-service/capabilities/conversation-core/INTEGRATION.md +134 -0
- package/skills/trtc-ai-service/capabilities/conversation-core/INTERFACE_ADAPT.md +111 -0
- package/skills/trtc-ai-service/capabilities/conversation-core/QUICK_START.md +62 -0
- package/skills/trtc-ai-service/capabilities/conversation-core/manifest.yaml +250 -0
- package/skills/trtc-ai-service/capabilities/conversation-core/requirements.txt +6 -0
- package/skills/trtc-ai-service/capabilities/conversation-core/src/__init__.py +10 -0
- package/skills/trtc-ai-service/capabilities/conversation-core/src/_capability_loader.py +218 -0
- package/skills/trtc-ai-service/capabilities/conversation-core/src/agent.py +231 -0
- package/skills/trtc-ai-service/capabilities/conversation-core/src/credentials.py +132 -0
- package/skills/trtc-ai-service/capabilities/conversation-core/src/health.py +355 -0
- package/skills/trtc-ai-service/capabilities/conversation-core/src/log_filter.py +76 -0
- package/skills/trtc-ai-service/capabilities/conversation-core/src/modality.py +109 -0
- package/skills/trtc-ai-service/capabilities/conversation-core/src/server.py +312 -0
- package/skills/trtc-ai-service/capabilities/conversation-core/src/trtc_client.py +315 -0
- package/skills/trtc-ai-service/capabilities/conversation-core/src/usersig.py +90 -0
- package/skills/trtc-ai-service/capabilities/conversation-core/tests/test_skeleton.py +216 -0
- package/skills/trtc-ai-service/capabilities/conversation-core/web-demo/README.md +48 -0
- package/skills/trtc-ai-service/capabilities/conversation-core/web-demo/app.js +415 -0
- package/skills/trtc-ai-service/capabilities/conversation-core/web-demo/index.html +68 -0
- package/skills/trtc-ai-service/capabilities/conversation-core/web-demo/styles.css +136 -0
- package/skills/trtc-ai-service/capabilities/digital-human/README.md +31 -0
- package/skills/trtc-ai-service/capabilities/digital-human/manifest.yaml +64 -0
- package/skills/trtc-ai-service/capabilities/digital-human/src/__init__.py +2 -0
- package/skills/trtc-ai-service/capabilities/digital-human/src/router.py +43 -0
- package/skills/trtc-ai-service/capabilities/human-handoff/INTERFACE_ADAPT.md +353 -0
- package/skills/trtc-ai-service/capabilities/human-handoff/README.md +44 -0
- package/skills/trtc-ai-service/capabilities/human-handoff/manifest.yaml +227 -0
- package/skills/trtc-ai-service/capabilities/human-handoff/src/__init__.py +2 -0
- package/skills/trtc-ai-service/capabilities/human-handoff/src/adapters/__init__.py +9 -0
- package/skills/trtc-ai-service/capabilities/human-handoff/src/adapters/default_rest.py +242 -0
- package/skills/trtc-ai-service/capabilities/human-handoff/src/adapters/factory.py +89 -0
- package/skills/trtc-ai-service/capabilities/human-handoff/src/adapters/local_queue.py +258 -0
- package/skills/trtc-ai-service/capabilities/human-handoff/src/adapters/mock.py +132 -0
- package/skills/trtc-ai-service/capabilities/human-handoff/src/core/__init__.py +25 -0
- package/skills/trtc-ai-service/capabilities/human-handoff/src/core/intent_detector.py +75 -0
- package/skills/trtc-ai-service/capabilities/human-handoff/src/core/models.py +163 -0
- package/skills/trtc-ai-service/capabilities/human-handoff/src/core/service.py +192 -0
- package/skills/trtc-ai-service/capabilities/human-handoff/src/feedback_store.py +54 -0
- package/skills/trtc-ai-service/capabilities/human-handoff/src/ports/__init__.py +4 -0
- package/skills/trtc-ai-service/capabilities/human-handoff/src/ports/handoff_client.py +86 -0
- package/skills/trtc-ai-service/capabilities/human-handoff/src/queue.py +62 -0
- package/skills/trtc-ai-service/capabilities/human-handoff/src/router.py +201 -0
- package/skills/trtc-ai-service/capabilities/human-handoff/src/summary_link.py +77 -0
- package/skills/trtc-ai-service/capabilities/human-handoff/src/trigger.py +25 -0
- package/skills/trtc-ai-service/capabilities/knowledge-base/INTERFACE_ADAPT.md +297 -0
- package/skills/trtc-ai-service/capabilities/knowledge-base/README.md +51 -0
- package/skills/trtc-ai-service/capabilities/knowledge-base/data/faq.json +20 -0
- package/skills/trtc-ai-service/capabilities/knowledge-base/manifest.yaml +211 -0
- package/skills/trtc-ai-service/capabilities/knowledge-base/src/__init__.py +8 -0
- package/skills/trtc-ai-service/capabilities/knowledge-base/src/adapters/__init__.py +9 -0
- package/skills/trtc-ai-service/capabilities/knowledge-base/src/adapters/default_rest.py +209 -0
- package/skills/trtc-ai-service/capabilities/knowledge-base/src/adapters/factory.py +86 -0
- package/skills/trtc-ai-service/capabilities/knowledge-base/src/adapters/local_json.py +172 -0
- package/skills/trtc-ai-service/capabilities/knowledge-base/src/adapters/mock.py +91 -0
- package/skills/trtc-ai-service/capabilities/knowledge-base/src/core/__init__.py +12 -0
- package/skills/trtc-ai-service/capabilities/knowledge-base/src/core/models.py +77 -0
- package/skills/trtc-ai-service/capabilities/knowledge-base/src/core/scoring.py +73 -0
- package/skills/trtc-ai-service/capabilities/knowledge-base/src/core/service.py +78 -0
- package/skills/trtc-ai-service/capabilities/knowledge-base/src/ports/__init__.py +4 -0
- package/skills/trtc-ai-service/capabilities/knowledge-base/src/ports/kb_client.py +61 -0
- package/skills/trtc-ai-service/capabilities/knowledge-base/src/retriever.py +56 -0
- package/skills/trtc-ai-service/capabilities/knowledge-base/src/router.py +85 -0
- package/skills/trtc-ai-service/capabilities/session-summary/INTERFACE_ADAPT.md +99 -0
- package/skills/trtc-ai-service/capabilities/session-summary/README.md +47 -0
- package/skills/trtc-ai-service/capabilities/session-summary/data/test_session.json +18 -0
- package/skills/trtc-ai-service/capabilities/session-summary/manifest.yaml +165 -0
- package/skills/trtc-ai-service/capabilities/session-summary/src/__init__.py +2 -0
- package/skills/trtc-ai-service/capabilities/session-summary/src/adapters/__init__.py +5 -0
- package/skills/trtc-ai-service/capabilities/session-summary/src/adapters/base.py +31 -0
- package/skills/trtc-ai-service/capabilities/session-summary/src/adapters/default_rest.py +67 -0
- package/skills/trtc-ai-service/capabilities/session-summary/src/adapters/factory.py +51 -0
- package/skills/trtc-ai-service/capabilities/session-summary/src/adapters/local_json.py +42 -0
- package/skills/trtc-ai-service/capabilities/session-summary/src/adapters/mock.py +22 -0
- package/skills/trtc-ai-service/capabilities/session-summary/src/recorder.py +210 -0
- package/skills/trtc-ai-service/capabilities/session-summary/src/router.py +93 -0
- package/skills/trtc-ai-service/capabilities/session-summary/src/summarizer.py +163 -0
- package/skills/trtc-ai-service/capabilities/tool-calling/INTERFACE_ADAPT.md +158 -0
- package/skills/trtc-ai-service/capabilities/tool-calling/README.md +50 -0
- package/skills/trtc-ai-service/capabilities/tool-calling/data/tools.yaml +58 -0
- package/skills/trtc-ai-service/capabilities/tool-calling/examples/__init__.py +1 -0
- package/skills/trtc-ai-service/capabilities/tool-calling/examples/local_tools.py +101 -0
- package/skills/trtc-ai-service/capabilities/tool-calling/manifest.yaml +146 -0
- package/skills/trtc-ai-service/capabilities/tool-calling/src/__init__.py +8 -0
- package/skills/trtc-ai-service/capabilities/tool-calling/src/dispatcher.py +54 -0
- package/skills/trtc-ai-service/capabilities/tool-calling/src/registry.py +219 -0
- package/skills/trtc-ai-service/capabilities/tool-calling/src/router.py +50 -0
- package/skills/trtc-ai-service/references/business-contract-spec.md +263 -0
- package/skills/trtc-ai-service/scenarios/custom-builder/README.md +86 -0
- package/skills/trtc-ai-service/scenarios/custom-builder/output-templates/recipe.yaml.j2 +194 -0
- package/skills/trtc-ai-service/scenarios/custom-builder/prompts/q1-business-scenario.md +43 -0
- package/skills/trtc-ai-service/scenarios/custom-builder/prompts/q2-io-modality.md +57 -0
- package/skills/trtc-ai-service/scenarios/custom-builder/prompts/q3-ui-form.md +55 -0
- package/skills/trtc-ai-service/scenarios/custom-builder/prompts/q4-capabilities.md +78 -0
- package/skills/trtc-ai-service/scenarios/customer-service/README.md +114 -0
- package/skills/trtc-ai-service/scenarios/customer-service/recipe.yaml +154 -0
- package/skills/trtc-ai-service/scenarios/customer-service/sample-data/README.md +32 -0
- package/skills/trtc-ai-service/scenarios/customer-service/sample-data/faq-sample.json +37 -0
- package/skills/trtc-ai-service/scenarios/customer-service/system-prompt.template.md +94 -0
- package/skills/trtc-ai-service/scenarios/customer-service/ui/admin-board/app.js +347 -0
- package/skills/trtc-ai-service/scenarios/customer-service/ui/admin-board/index.html +125 -0
- package/skills/trtc-ai-service/scenarios/customer-service/ui/admin-board/styles.css +487 -0
- package/skills/trtc-ai-service/scenarios/customer-service/ui/admin-board/tokens.css +71 -0
- package/skills/trtc-ai-service/scenarios/customer-service/ui/design-system/DESIGN_GUIDELINES.md +370 -0
- package/skills/trtc-ai-service/scenarios/customer-service/ui/voice-customer-service/README.md +68 -0
- package/skills/trtc-ai-service/scenarios/customer-service/ui/voice-customer-service/app.js +1307 -0
- package/skills/trtc-ai-service/scenarios/customer-service/ui/voice-customer-service/data.js +40 -0
- package/skills/trtc-ai-service/scenarios/customer-service/ui/voice-customer-service/index.html +233 -0
- package/skills/trtc-ai-service/scenarios/customer-service/ui/voice-customer-service/mock-shop.json +21 -0
- package/skills/trtc-ai-service/scenarios/customer-service/ui/voice-customer-service/styles.css +603 -0
- package/skills/trtc-ai-service/scenarios/customer-service/ui/voice-customer-service/tokens.css +71 -0
- package/skills/trtc-ai-service/scenarios/customer-service/ui/widget-floating/agent-link.js +323 -0
- package/skills/trtc-ai-service/scenarios/customer-service/ui/widget-floating/app.js +458 -0
- package/skills/trtc-ai-service/scenarios/customer-service/ui/widget-floating/index.html +109 -0
- package/skills/trtc-ai-service/scenarios/customer-service/ui/widget-floating/styles.css +489 -0
- package/skills/trtc-ai-service/scenarios/customer-service/ui/widget-floating/tokens.css +59 -0
- package/skills/trtc-ai-service/scripts/add-capability.py +364 -0
- package/skills/trtc-ai-service/scripts/contract-adapt.py +334 -0
- package/skills/trtc-ai-service/scripts/detect-stack.py +40 -0
- package/skills/trtc-ai-service/scripts/lib/__init__.py +20 -0
- package/skills/trtc-ai-service/scripts/lib/adapter_codegen.py +509 -0
- package/skills/trtc-ai-service/scripts/lib/arbitrator.py +152 -0
- package/skills/trtc-ai-service/scripts/lib/contract_resolver.py +519 -0
- package/skills/trtc-ai-service/scripts/lib/credential_validators.py +253 -0
- package/skills/trtc-ai-service/scripts/lib/curl_parser.py +303 -0
- package/skills/trtc-ai-service/scripts/lib/degrader.py +140 -0
- package/skills/trtc-ai-service/scripts/lib/injector.py +347 -0
- package/skills/trtc-ai-service/scripts/lib/manifest_resolver.py +288 -0
- package/skills/trtc-ai-service/scripts/lib/openapi_parser.py +289 -0
- package/skills/trtc-ai-service/scripts/lib/stack_detector.py +159 -0
- package/skills/trtc-ai-service/scripts/lib/tokens_compile.py +204 -0
- package/skills/trtc-ai-service/scripts/post-install-patch.py +225 -0
- package/skills/trtc-ai-service/scripts/setup-credentials.py +393 -0
- package/skills/trtc-ai-service/scripts/verify-credentials.py +108 -0
- package/skills/trtc-ai-service/start.sh +111 -0
- package/skills/trtc-ai-service/tests/__init__.py +1 -0
- package/skills/trtc-ai-service/tests/test_arbitrator.py +64 -0
- package/skills/trtc-ai-service/tests/test_capability_overlay.py +85 -0
- package/skills/trtc-ai-service/tests/test_contract_resolver.py +190 -0
- package/skills/trtc-ai-service/tests/test_handoff_ports.py +195 -0
- package/skills/trtc-ai-service/tests/test_kb_ports.py +195 -0
- package/skills/trtc-ai-service/tests/test_manifest_resolver.py +95 -0
- package/skills/trtc-ai-service/tests/test_recipe_assembly.py +175 -0
- package/skills/trtc-ai-service/tests/test_stack_and_degrader.py +101 -0
- package/skills/trtc-ai-service/tests/test_verify_credentials.py +285 -0
- package/skills/trtc-ai-service/triggers.yaml +29 -0
- package/skills/trtc-chat/.docs-query.yaml +8 -0
- package/skills/trtc-chat/SKILL.md +186 -0
- package/skills/trtc-chat/docs/SKILL.md +31 -0
- package/skills/trtc-chat/flows/maintenance.md +19 -0
- package/skills/trtc-chat/flows/onboarding.md +79 -0
- package/skills/trtc-chat/references/01-detect-project.md +136 -0
- package/skills/trtc-chat/references/02-path-a-questions.md +182 -0
- package/skills/trtc-chat/references/02-path-a-scaffold-template.md +59 -0
- package/skills/trtc-chat/references/02-path-a-script.md +266 -0
- package/skills/trtc-chat/references/02-path-a-templates.md +159 -0
- package/skills/trtc-chat/references/03-path-b-script.md +226 -0
- package/skills/trtc-chat/references/04-path-c-script.md +95 -0
- package/skills/trtc-chat/references/04-uikit-redirect.md +32 -0
- package/skills/trtc-chat/references/05-path-d-script.md +647 -0
- package/skills/trtc-chat/references/05-slice-loading.md +139 -0
- package/skills/trtc-chat/references/06-a-defensive-coding.md +139 -0
- package/skills/trtc-chat/references/06-hard-rules.md +190 -0
- package/skills/trtc-chat/references/08-state-config.md +229 -0
- package/skills/trtc-chat/references/09-troubleshoot.md +91 -0
- package/skills/trtc-chat/references/10-references-index.md +63 -0
- package/skills/trtc-chat/references/11-what-to-do-next-template.md +338 -0
- package/skills/trtc-chat/references/12-page-composition.md +73 -0
- package/skills/trtc-chat/references/13-reporting.md +128 -0
- package/skills/trtc-chat/references/14-official-docs.md +169 -0
- package/skills/trtc-chat/references/execution-units.yaml +27 -0
- package/skills/trtc-chat/references/vue3.md +104 -0
- package/skills/trtc-chat/tests/test_chat_bundle_contract.py +293 -0
- package/skills/trtc-chat/tools/__init__.py +5 -0
- package/skills/trtc-chat/tools/_delegate.py +32 -0
- package/skills/trtc-chat/tools/flow.py +8 -0
- package/skills/trtc-chat/tools/kb.py +8 -0
- package/skills/trtc-chat/tools/reporting_v2.py +8 -0
- package/skills/trtc-chat/tools/session.py +8 -0
- package/skills/trtc-conference/SKILL.md +324 -0
- package/skills/trtc-conference/flows/onboarding.md +205 -0
- package/skills/trtc-conference/flows/topic.md +474 -0
- package/skills/trtc-conference/flows/troubleshoot.md +85 -0
- package/skills/trtc-conference/hooks/pretooluse_require_business_decisions.py +213 -0
- package/skills/trtc-conference/playbooks/medical-quickstart.md +84 -0
- package/skills/trtc-conference/playbooks/official-roomkit.md +97 -0
- package/skills/trtc-conference/references/local-usersig/basic-info-config.ts +39 -0
- package/skills/trtc-conference/references/usersig-handling.md +134 -0
- package/skills/trtc-conference/templates/medical-consultation/src/config/lib-generate-test-usersig-es.min.d.ts +4 -0
- package/skills/trtc-conference/templates/medical-consultation/src/config/lib-generate-test-usersig-es.min.js +2 -0
- package/skills/trtc-conference/tests/__pycache__/test_conference_onboarding_contract.cpython-313-pytest-9.0.2.pyc +0 -0
- package/skills/trtc-conference/tests/__pycache__/test_conference_topic_flow_contract.cpython-313-pytest-9.0.2.pyc +0 -0
- package/skills/trtc-conference/tests/test_conference_index_contract.py +43 -0
- package/skills/trtc-conference/tests/test_conference_onboarding_contract.py +103 -0
- package/skills/trtc-conference/tests/test_conference_template_contract.py +25 -0
- package/skills/trtc-conference/tests/test_conference_topic_flow_contract.py +132 -0
- package/skills/trtc-conference/tools/apply_checks.py +328 -0
- package/skills/trtc-conference/verify_lib/__init__.py +0 -0
- package/skills/{trtc-apply/guardrails/apply_lib → trtc-conference/verify_lib}/rule_parser.py +1 -1
- package/skills/trtc-docs/SKILL.md +91 -119
- package/.cursor/rules/ui-mode.mdc +0 -99
- package/ai-instructions/base.md +0 -13
- package/ai-instructions/ui-mode.md +0 -93
- package/knowledge-base/index.yaml +0 -462
- package/skills/trtc/room-builder/SKILL.md +0 -133
- package/skills/trtc/room-builder/templates/scenarios/medical-consultation/README.md +0 -108
- package/skills/trtc/room-builder/tools/render_ai_instructions.py +0 -226
- package/skills/trtc-apply/SKILL.md +0 -97
- package/skills/trtc-onboarding/SKILL.md +0 -841
- package/skills/trtc-onboarding/reference/path-a1-demo.md +0 -103
- package/skills/trtc-onboarding/reference/path-a2-integrate.md +0 -737
- package/skills/trtc-onboarding/reference/path-b-troubleshoot.md +0 -186
- package/skills/trtc-onboarding/reference/path-c-expand.md +0 -43
- package/skills/trtc-onboarding/reference/supported-matrix.md +0 -100
- package/skills/trtc-search/SKILL.md +0 -228
- package/skills/trtc-topic/SKILL.md +0 -622
- package/skills/trtc-topic/scripts/apply.py +0 -581
- package/skills/trtc-topic/scripts/lib/state_machine.py +0 -328
- package/skills/trtc-topic/tests/README.md +0 -70
- package/skills/trtc-topic/tests/conftest.py +0 -72
- package/skills/trtc-topic/tests/test_apply_cli.py +0 -480
- package/skills/trtc-topic/tests/test_end_to_end.py +0 -305
- package/skills/trtc-topic/tests/test_finalize_session.py +0 -51
- package/skills/trtc-topic/tests/test_gates.py +0 -316
- package/skills/trtc-topic/tests/test_session_resolver.py +0 -260
- package/skills/trtc-topic/tests/test_state_machine.py +0 -414
- package/skills/trtc-topic/tests/test_stop_require_apply.py +0 -99
- package/skills/trtc-topic/tests/test_topic_skill_invariants.py +0 -130
- /package/skills/{trtc-topic → trtc}/runtime/lib/platforms.py +0 -0
- /package/skills/{trtc-topic → trtc}/runtime/telemetry_collector.py +0 -0
- /package/skills/{trtc-onboarding/reference → trtc/runtime}/usersig-handling.md +0 -0
- /package/skills/{trtc-topic/scripts → trtc/tools}/finalize_session.py +0 -0
- /package/skills/{trtc-apply/guardrails/apply_lib → trtc-ai-service/capabilities/conversation-core/tests}/__init__.py +0 -0
- /package/skills/{trtc-topic → trtc-conference}/references/execution-units.yaml +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios/medical-consultation/src/config → trtc-conference/references/local-usersig}/lib-generate-test-usersig-es.min.d.ts +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios/medical-consultation/src/config → trtc-conference/references/local-usersig}/lib-generate-test-usersig-es.min.js +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/docs/backend-contract.zh-CN.md +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/docs/integration.zh-CN.md +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/docs/theme.zh-CN.md +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/index.html +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/package.json +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/postcss.config.js +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/App.vue +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/components/ConsultationManagePanel.vue +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/components/LanguageSwitch.vue +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/components/LoadingSpinner.vue +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/components/MedicalAlert.vue +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/components/MedicalBusinessPanel.vue +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/components/MedicalButton.vue +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/components/MedicalConfirmDialog.vue +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/components/MedicalDataPanel.vue +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/components/MedicalRecordPanel.vue +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/components/PrescriptionPanel.vue +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/config/basic-info-config.ts +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/config/runtime-config.ts +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/env.d.ts +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/features/consultation/components/ConsultationChatPanel.vue +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/features/consultation/components/ConsultationMembersPanel.vue +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/features/consultation/components/ConsultationTranscriptionPanel.vue +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/features/consultation/components/ConsultationVideoStage.vue +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/features/consultation/components/InviteDoctorDialog.vue +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/features/consultation/components/KickMemberConfirmDialog.vue +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/features/consultation/types.ts +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/features/consultation/useConsultationChat.ts +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/features/consultation/useConsultationDevices.ts +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/features/consultation/useConsultationParticipants.ts +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/features/consultation/useConsultationPermissions.ts +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/features/consultation/utils.ts +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/i18n/en-US/index.ts +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/i18n/index.ts +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/i18n/medicalTranslate.ts +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/i18n/state.ts +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/i18n/zh-CN/index.ts +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/main.ts +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/mock/appointments.ts +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/mock/users.ts +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/router/index.ts +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/services/adapters/index.ts +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/services/adapters/integration/appointmentService.ts +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/services/adapters/integration/authService.ts +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/services/adapters/integration/launchContext.ts +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/services/adapters/integration/userService.ts +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/services/adapters/mock/appointmentService.ts +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/services/adapters/mock/authService.ts +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/services/adapters/mock/userService.ts +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/services/adapters/types.ts +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/shared/icons.ts +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/styles/index.css +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/styles/tailwind.css +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/styles/theme.css +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/utils/auth.ts +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/utils/format.ts +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/utils/navigation.ts +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/utils/session.ts +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/views/DoctorConsultationView.vue +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/views/DoctorDashboardView.vue +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/views/LoginView.vue +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/views/PatientConsultationFinishedView.vue +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/views/PatientConsultationView.vue +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/views/PatientSelectDoctorView.vue +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/views/PatientWaitingView.vue +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/tsconfig.json +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/tsconfig.node.json +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/vite.config.ts +0 -0
- /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation//346/216/245/345/205/245/350/257/264/346/230/216.md" +0 -0
- /package/skills/{trtc-topic/runtime/lib → trtc-conference/tools}/__init__.py +0 -0
package/bin/cli.js
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @tencent-rtc/trtc-agent-skills installer
|
|
7
7
|
*
|
|
8
|
-
* Installs the TRTC AI Integration skill suite (
|
|
9
|
-
* trtc + trtc-onboarding/docs/topic/search/apply) plus the
|
|
10
|
-
* knowledge-base into your IDE's skills directory, and wires up the
|
|
8
|
+
* Installs the TRTC AI Integration skill suite (cross-referencing skills:
|
|
9
|
+
* trtc + trtc-onboarding/docs/topic/search/apply + trtc-ai-service) plus the
|
|
10
|
+
* shared knowledge-base into your IDE's skills directory, and wires up the
|
|
11
11
|
* `tencent-rtc-skill-tool` MCP server (used for prompt / runtime telemetry).
|
|
12
12
|
*
|
|
13
13
|
* IMPORTANT — why skills are copied as SIBLING DIRECTORIES:
|
|
@@ -50,15 +50,33 @@ const SKILLS_SRC = path.join(PKG_ROOT, "skills");
|
|
|
50
50
|
const KB_SRC = path.join(PKG_ROOT, "knowledge-base");
|
|
51
51
|
const HOOKS_SRC = path.join(PKG_ROOT, "hooks");
|
|
52
52
|
|
|
53
|
-
//
|
|
54
|
-
|
|
53
|
+
// Dynamically discover all skills under SKILLS_SRC. Each skill must be a
|
|
54
|
+
// directory containing a SKILL.md entry point. `trtc` is always listed first;
|
|
55
|
+
// the rest are sorted alphabetically. This avoids the stale-hardcoded-list
|
|
56
|
+
// problem — adding a new skill directory is enough to get it installed.
|
|
57
|
+
//
|
|
58
|
+
// Security: only skills in SKILL_ALLOWLIST are installed. This prevents
|
|
59
|
+
// draft / fork / debug directories from being silently picked up.
|
|
60
|
+
const SKILL_ALLOWLIST = new Set([
|
|
55
61
|
"trtc",
|
|
56
|
-
"trtc-onboarding",
|
|
57
62
|
"trtc-docs",
|
|
58
|
-
"trtc-
|
|
59
|
-
"trtc-
|
|
60
|
-
"trtc-
|
|
61
|
-
];
|
|
63
|
+
"trtc-conference",
|
|
64
|
+
"trtc-ai-service",
|
|
65
|
+
"trtc-chat",
|
|
66
|
+
]);
|
|
67
|
+
|
|
68
|
+
function getSkillNames() {
|
|
69
|
+
return fs.readdirSync(SKILLS_SRC, { withFileTypes: true })
|
|
70
|
+
.filter(entry => entry.isDirectory())
|
|
71
|
+
.map(entry => entry.name)
|
|
72
|
+
.filter(name => SKILL_ALLOWLIST.has(name))
|
|
73
|
+
.filter(name => fs.existsSync(path.join(SKILLS_SRC, name, "SKILL.md")))
|
|
74
|
+
.sort((a, b) => {
|
|
75
|
+
if (a === "trtc") return -1;
|
|
76
|
+
if (b === "trtc") return 1;
|
|
77
|
+
return a.localeCompare(b);
|
|
78
|
+
});
|
|
79
|
+
}
|
|
62
80
|
|
|
63
81
|
// IDE skill-install targets (project-level). Each IDE reads skills from a
|
|
64
82
|
// different directory, but the layout inside is identical: one dir per skill.
|
|
@@ -94,9 +112,9 @@ const MCP_SERVER_ENTRY = "@tencent-rtc/skill-tool@latest";
|
|
|
94
112
|
// The original hooks.json uses ${CLAUDE_PLUGIN_ROOT} / ${CODEBUDDY_PLUGIN_ROOT}
|
|
95
113
|
// placeholders that get expanded by the IDE in plugin mode; in npx mode we
|
|
96
114
|
// materialize them to absolute paths under the IDE's settings dir.
|
|
97
|
-
// cursor: hooks-cursor.json is rewritten + merged into
|
|
98
|
-
// (
|
|
99
|
-
//
|
|
115
|
+
// cursor: hooks-cursor.json is rewritten + merged into <root>/.cursor/hooks.json
|
|
116
|
+
// (project-level). cursor-adapter.py is copied to
|
|
117
|
+
// <root>/.cursor/hooks/trtc-agent-skills/ and its hardcoded
|
|
100
118
|
// $HOME/.cursor/plugins/local/... reference is rewritten to the actual path.
|
|
101
119
|
const HOOKS_TARGETS = {
|
|
102
120
|
claude: {
|
|
@@ -119,22 +137,64 @@ const HOOKS_TARGETS = {
|
|
|
119
137
|
hooksDir: ".codex/hooks",
|
|
120
138
|
// Codex loads hooks from <repo>/.codex/hooks.json (or ~/.codex/hooks.json)
|
|
121
139
|
// — NOT from .agents/settings.json. See https://developers.openai.com/codex/hooks
|
|
140
|
+
//
|
|
141
|
+
// Codex CLI ≥0.135 parses hooks.json with a strict serde schema that rejects
|
|
142
|
+
// unknown top-level fields ("unknown field `__trtc_agent_skills__`, expected
|
|
143
|
+
// `hooks`"). We therefore mark codex as `strictSchema: true` so the merge
|
|
144
|
+
// logic skips the marker injection (uninstall identifies our entries by
|
|
145
|
+
// hook command path substrings instead — see OWNED_COMMAND_HINTS).
|
|
122
146
|
settingsFile: ".codex/hooks.json",
|
|
123
147
|
sourceConfig: "hooks.json",
|
|
124
148
|
rootPlaceholder: "${CLAUDE_PLUGIN_ROOT}",
|
|
125
149
|
rootRewrite: ".codex",
|
|
126
150
|
fallbackPlaceholder: "${CODEBUDDY_PLUGIN_ROOT}",
|
|
151
|
+
strictSchema: true,
|
|
127
152
|
},
|
|
128
153
|
cursor: {
|
|
129
|
-
|
|
130
|
-
//
|
|
131
|
-
|
|
154
|
+
// Namespace under .cursor/hooks/trtc-agent-skills/ so we never collide
|
|
155
|
+
// with another skill's hooks/ contents. cursor-adapter.py auto-detects
|
|
156
|
+
// PLUGIN_ROOT by walking up to the nearest dir containing skills/, so
|
|
157
|
+
// this nested location still resolves correctly.
|
|
158
|
+
hooksDir: ".cursor/hooks/trtc-agent-skills",
|
|
159
|
+
hooksFiles: ["cursor-adapter.py"],
|
|
160
|
+
settingsFile: ".cursor/hooks.json",
|
|
132
161
|
sourceConfig: "hooks-cursor.json",
|
|
133
162
|
// The hardcoded path string we need to rewrite in hooks-cursor.json.
|
|
134
163
|
cursorAdapterPlaceholder: "$HOME/.cursor/plugins/local/trtc-agent-skills/hooks/cursor-adapter.py",
|
|
135
164
|
},
|
|
136
165
|
};
|
|
137
166
|
|
|
167
|
+
// For IDEs whose hook config schema rejects unknown fields (codex), we cannot
|
|
168
|
+
// embed our `__trtc_agent_skills__` ownership markers. Instead, uninstall
|
|
169
|
+
// detects "our" hook entries by checking whether any command string contains
|
|
170
|
+
// one of these path-segment hints — every guardrail script we ship lives under
|
|
171
|
+
// `skills/<skill>/hooks/` or `skills/<skill>/guardrails/`, and the cursor
|
|
172
|
+
// adapter under our namespaced hooks subdir.
|
|
173
|
+
const OWNED_COMMAND_HINTS = [
|
|
174
|
+
"/skills/trtc/hooks/",
|
|
175
|
+
"/skills/trtc/room-builder/guardrails/",
|
|
176
|
+
"/skills/trtc-topic/guardrails/",
|
|
177
|
+
"/skills/trtc-apply/guardrails/",
|
|
178
|
+
"/skills/trtc-conference/hooks/",
|
|
179
|
+
"/hooks/trtc-agent-skills/cursor-adapter.py",
|
|
180
|
+
];
|
|
181
|
+
|
|
182
|
+
function isOwnedHookEntry(entry) {
|
|
183
|
+
if (!entry || typeof entry !== "object") return false;
|
|
184
|
+
if (entry.__trtc_agent_skills__) return true;
|
|
185
|
+
// Cursor-style: { command: "...", ... }
|
|
186
|
+
if (typeof entry.command === "string" && OWNED_COMMAND_HINTS.some(h => entry.command.includes(h))) {
|
|
187
|
+
return true;
|
|
188
|
+
}
|
|
189
|
+
// Claude/Codex-style: { matcher?, hooks: [{ command, ... }] }
|
|
190
|
+
if (Array.isArray(entry.hooks)) {
|
|
191
|
+
return entry.hooks.some(h => h && typeof h === "object"
|
|
192
|
+
&& typeof h.command === "string"
|
|
193
|
+
&& OWNED_COMMAND_HINTS.some(hint => h.command.includes(hint)));
|
|
194
|
+
}
|
|
195
|
+
return false;
|
|
196
|
+
}
|
|
197
|
+
|
|
138
198
|
// AI instruction files distribution per IDE.
|
|
139
199
|
// - root-md : project-root markdown files (CLAUDE.md / AGENTS.md / CODEBUDDY.md).
|
|
140
200
|
// If the file already exists, our content is wrapped in HTML
|
|
@@ -290,13 +350,20 @@ function printHelp() {
|
|
|
290
350
|
}
|
|
291
351
|
|
|
292
352
|
function listSkills() {
|
|
353
|
+
const descriptions = {
|
|
354
|
+
"trtc": "Entry router — detects product/platform, routes to sub-skills",
|
|
355
|
+
"trtc-ai-service": "AI customer service scenarios (TRTC Conversational AI)",
|
|
356
|
+
"trtc-onboarding": "Get-started / integration / troubleshooting flow",
|
|
357
|
+
"trtc-docs": "Docs & error-code lookup",
|
|
358
|
+
"trtc-topic": "Step-by-step scenario walkthrough",
|
|
359
|
+
"trtc-search": "Internal slice lookup (AI-facing)",
|
|
360
|
+
"trtc-apply": "Internal compile/integration quality gate",
|
|
361
|
+
};
|
|
293
362
|
console.log(`\n ${c.bold("Skills shipped in this package:")}\n`);
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
console.log(` ${c.cyan("trtc-search/")} ${c.dim("Internal slice lookup (AI-facing)")}`);
|
|
299
|
-
console.log(` ${c.cyan("trtc-apply/")} ${c.dim("Internal compile/integration quality gate")}`);
|
|
363
|
+
for (const name of getSkillNames()) {
|
|
364
|
+
const desc = descriptions[name] || "";
|
|
365
|
+
console.log(` ${c.cyan(name + "/")}` + (desc ? ` ${c.dim(desc)}` : ""));
|
|
366
|
+
}
|
|
300
367
|
console.log("");
|
|
301
368
|
}
|
|
302
369
|
|
|
@@ -304,7 +371,7 @@ function listSkills() {
|
|
|
304
371
|
function cleanSkills(skillsRootAbs) {
|
|
305
372
|
if (!fs.existsSync(skillsRootAbs)) return 0;
|
|
306
373
|
let wiped = 0;
|
|
307
|
-
for (const name of
|
|
374
|
+
for (const name of getSkillNames()) {
|
|
308
375
|
const target = path.join(skillsRootAbs, name);
|
|
309
376
|
if (fs.existsSync(target)) { rmrf(target); wiped++; }
|
|
310
377
|
}
|
|
@@ -345,9 +412,9 @@ function cleanAiInstructions(ideList, resolvedRoot) {
|
|
|
345
412
|
}
|
|
346
413
|
}
|
|
347
414
|
|
|
348
|
-
// Strip our hook entries from each IDE's settings.
|
|
349
|
-
// __trtc_agent_skills__
|
|
350
|
-
//
|
|
415
|
+
// Strip our hook entries from each IDE's settings file. We tag entries with
|
|
416
|
+
// __trtc_agent_skills__ where the IDE schema allows (claude/codebuddy/cursor),
|
|
417
|
+
// and fall back to command-path matching for strict-schema IDEs (codex).
|
|
351
418
|
function cleanHooksSettings(ideList, resolvedRoot) {
|
|
352
419
|
for (const ide of ideList) {
|
|
353
420
|
const target = HOOKS_TARGETS[ide];
|
|
@@ -369,23 +436,35 @@ function cleanHooksSettings(ideList, resolvedRoot) {
|
|
|
369
436
|
for (const event of Object.keys(settings.hooks)) {
|
|
370
437
|
const val = settings.hooks[event];
|
|
371
438
|
if (Array.isArray(val)) {
|
|
372
|
-
settings.hooks[event] = val.filter(e => !(e
|
|
439
|
+
settings.hooks[event] = val.filter(e => !isOwnedHookEntry(e));
|
|
373
440
|
if (settings.hooks[event].length === 0) delete settings.hooks[event];
|
|
441
|
+
} else if (val && typeof val === "object" && Array.isArray(val.hooks)) {
|
|
442
|
+
// Some IDEs nest hooks under a single object per event instead of
|
|
443
|
+
// an array. Filter the inner hooks list.
|
|
444
|
+
val.hooks = val.hooks.filter(h => !isOwnedHookEntry(h));
|
|
445
|
+
if (val.hooks.length === 0) delete settings.hooks[event];
|
|
374
446
|
} else {
|
|
375
|
-
//
|
|
376
|
-
delete settings.hooks[event];
|
|
447
|
+
// Unknown shape — leave it alone rather than risk corrupting it.
|
|
377
448
|
}
|
|
378
449
|
}
|
|
379
450
|
if (Object.keys(settings.hooks).length === 0) delete settings.hooks;
|
|
380
451
|
}
|
|
381
452
|
|
|
453
|
+
// For strict-schema codex, if we cleared everything, remove the file so
|
|
454
|
+
// codex doesn't see a stale empty file.
|
|
455
|
+
const onlyHadOurState = !settings.hooks && Object.keys(settings).length === 0;
|
|
456
|
+
if (onlyHadOurState) {
|
|
457
|
+
rmrf(settingsPath);
|
|
458
|
+
continue;
|
|
459
|
+
}
|
|
460
|
+
|
|
382
461
|
fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + "\n", "utf8");
|
|
383
462
|
}
|
|
384
463
|
}
|
|
385
464
|
|
|
386
465
|
function installSkills(skillsRootAbs) {
|
|
387
466
|
ensureDir(skillsRootAbs);
|
|
388
|
-
for (const name of
|
|
467
|
+
for (const name of getSkillNames()) {
|
|
389
468
|
const src = path.join(SKILLS_SRC, name);
|
|
390
469
|
if (fs.existsSync(src)) {
|
|
391
470
|
copyRecursive(src, path.join(skillsRootAbs, name));
|
|
@@ -409,7 +488,14 @@ function copyKnowledgeBase(skillsRootAbs) {
|
|
|
409
488
|
// to the plugin install root. In npx mode there's no plugin root, so we
|
|
410
489
|
// materialize those placeholders to absolute paths pointing at the IDE's
|
|
411
490
|
// settings dir (where we put .{ide}/skills/, .{ide}/hooks/, etc).
|
|
412
|
-
|
|
491
|
+
//
|
|
492
|
+
// `hooksDestAbs` is the absolute path the hooks/ source dir was actually
|
|
493
|
+
// copied to (e.g. <root>/.cursor/hooks/trtc-agent-skills for cursor, or
|
|
494
|
+
// <root>/.claude/hooks for claude). We use it to resolve cursor-adapter.py
|
|
495
|
+
// rather than reconstructing it from `ideAbsRoot + "hooks"`, because cursor
|
|
496
|
+
// nests its hooks one level deeper (under trtc-agent-skills/) for namespace
|
|
497
|
+
// isolation — see HOOKS_TARGETS.cursor.hooksDir.
|
|
498
|
+
function rewriteHooksContent(content, target, ideAbsRoot, hooksDestAbs) {
|
|
413
499
|
let out = content;
|
|
414
500
|
if (target.rootPlaceholder) {
|
|
415
501
|
// Replace BOTH ${CLAUDE_PLUGIN_ROOT} and ${CODEBUDDY_PLUGIN_ROOT} — the
|
|
@@ -433,7 +519,12 @@ function rewriteHooksContent(content, target, ideAbsRoot) {
|
|
|
433
519
|
// We need the resulting JSON string to evaluate to a shell-quoted path so
|
|
434
520
|
// project paths with spaces don't break shell parsing — that means
|
|
435
521
|
// emitting `\"<abs>\"` (JSON-escaped quotes) into the string.
|
|
436
|
-
|
|
522
|
+
//
|
|
523
|
+
// Use hooksDestAbs (the actual copy destination) — NOT ideAbsRoot+"hooks"
|
|
524
|
+
// — because cursor's hooksDir is namespaced as
|
|
525
|
+
// .cursor/hooks/trtc-agent-skills, so the script lives one level deeper
|
|
526
|
+
// than the .cursor/hooks/ that ideAbsRoot+"hooks" would point at.
|
|
527
|
+
const cursorAdapterAbs = path.join(hooksDestAbs, "cursor-adapter.py");
|
|
437
528
|
const replacement = `\\"${cursorAdapterAbs}\\"`;
|
|
438
529
|
out = out.split(target.cursorAdapterPlaceholder).join(replacement);
|
|
439
530
|
}
|
|
@@ -456,12 +547,12 @@ function copyHooksDir(target, resolvedRoot) {
|
|
|
456
547
|
// ~/.cursor/hooks.json we merge per-event arrays so a previously-installed
|
|
457
548
|
// project's adapter path gets replaced by ours but the user's own hook
|
|
458
549
|
// entries (if any) are preserved.
|
|
459
|
-
function mergeHooksConfig(target, resolvedRoot, ideAbsRoot) {
|
|
550
|
+
function mergeHooksConfig(target, resolvedRoot, ideAbsRoot, hooksDestAbs) {
|
|
460
551
|
const srcPath = path.join(HOOKS_SRC, target.sourceConfig);
|
|
461
552
|
if (!fs.existsSync(srcPath)) return null;
|
|
462
553
|
|
|
463
554
|
const rawSrc = fs.readFileSync(srcPath, "utf8");
|
|
464
|
-
const rewritten = rewriteHooksContent(rawSrc, target, ideAbsRoot);
|
|
555
|
+
const rewritten = rewriteHooksContent(rawSrc, target, ideAbsRoot, hooksDestAbs);
|
|
465
556
|
let parsed;
|
|
466
557
|
try { parsed = JSON.parse(rewritten); }
|
|
467
558
|
catch (err) {
|
|
@@ -487,10 +578,16 @@ function mergeHooksConfig(target, resolvedRoot, ideAbsRoot) {
|
|
|
487
578
|
const incomingHooks = parsed.hooks || {};
|
|
488
579
|
if (!existing.hooks || typeof existing.hooks !== "object") existing.hooks = {};
|
|
489
580
|
|
|
490
|
-
//
|
|
491
|
-
//
|
|
492
|
-
//
|
|
581
|
+
// For strict-schema IDEs (codex) we MUST NOT embed any ownership marker —
|
|
582
|
+
// codex CLI ≥0.135 rejects the whole file with
|
|
583
|
+
// "unknown field `__trtc_agent_skills__`, expected `hooks`"
|
|
584
|
+
// and skips all hooks. Identify our entries on uninstall via command-path
|
|
585
|
+
// hints (see isOwnedHookEntry) instead.
|
|
586
|
+
const useMarker = !target.strictSchema;
|
|
587
|
+
|
|
588
|
+
// Marker to identify our entries so a future uninstall can filter precisely.
|
|
493
589
|
const tagged = (entry) => {
|
|
590
|
+
if (!useMarker) return entry;
|
|
494
591
|
if (entry && typeof entry === "object") {
|
|
495
592
|
return Object.assign({}, entry, { __trtc_agent_skills__: true });
|
|
496
593
|
}
|
|
@@ -501,24 +598,32 @@ function mergeHooksConfig(target, resolvedRoot, ideAbsRoot) {
|
|
|
501
598
|
if (Array.isArray(eventValue)) {
|
|
502
599
|
// Cursor format: hooks.<event> = [{command: ...}, ...]
|
|
503
600
|
const stripped = (existing.hooks[eventName] || [])
|
|
504
|
-
.filter(e => !(e
|
|
601
|
+
.filter(e => !isOwnedHookEntry(e));
|
|
505
602
|
existing.hooks[eventName] = stripped.concat(eventValue.map(tagged));
|
|
506
603
|
} else if (Array.isArray(existing.hooks[eventName])) {
|
|
507
604
|
// existing is array (cursor-style), incoming is non-array (claude-style):
|
|
508
605
|
// overwrite — this combination shouldn't happen in practice.
|
|
509
606
|
existing.hooks[eventName] = eventValue;
|
|
510
607
|
} else {
|
|
511
|
-
// Claude/Codebuddy format: hooks.<event> = [{matcher, hooks:
|
|
512
|
-
//
|
|
608
|
+
// Claude/Codebuddy/Codex format: hooks.<event> = [{matcher, hooks:[...]}, ...]
|
|
609
|
+
// For strict-schema codex, the bundled hooks.json IS the only source for
|
|
610
|
+
// this key and we own the file; just replace.
|
|
513
611
|
existing.hooks[eventName] = eventValue;
|
|
514
612
|
}
|
|
515
613
|
}
|
|
516
614
|
|
|
517
615
|
// Top-level marker so a future uninstall can detect our presence quickly.
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
616
|
+
// Skip for strict-schema IDEs (codex) — see useMarker above.
|
|
617
|
+
if (useMarker) {
|
|
618
|
+
existing.__trtc_agent_skills__ = {
|
|
619
|
+
version: PKG_VERSION,
|
|
620
|
+
hookEvents: Object.keys(incomingHooks),
|
|
621
|
+
};
|
|
622
|
+
} else if (existing.__trtc_agent_skills__) {
|
|
623
|
+
// Defensive: if a previous (buggy) install left this field behind, clean
|
|
624
|
+
// it up so codex doesn't keep failing schema validation.
|
|
625
|
+
delete existing.__trtc_agent_skills__;
|
|
626
|
+
}
|
|
522
627
|
|
|
523
628
|
// Preserve / propagate top-level keys that the IDE expects (e.g. cursor
|
|
524
629
|
// requires `"version": 1` at the root of ~/.cursor/hooks.json or it rejects
|
|
@@ -543,7 +648,7 @@ function installHooks(ideList, resolvedRoot) {
|
|
|
543
648
|
const hooksDest = copyHooksDir(target, resolvedRoot);
|
|
544
649
|
console.log(c.green(" ✓ ") + `${ide} hooks → ${hooksDest}/`);
|
|
545
650
|
|
|
546
|
-
const merged = mergeHooksConfig(target, resolvedRoot, ideAbsRoot);
|
|
651
|
+
const merged = mergeHooksConfig(target, resolvedRoot, ideAbsRoot, hooksDest);
|
|
547
652
|
if (merged) {
|
|
548
653
|
const isUserLevel = path.isAbsolute(target.settingsFile);
|
|
549
654
|
const prefix = isUserLevel ? c.yellow(" ⚠ ") : c.green(" ✓ ");
|
|
@@ -812,7 +917,7 @@ function main() {
|
|
|
812
917
|
}
|
|
813
918
|
|
|
814
919
|
installSkills(skillsRootAbs);
|
|
815
|
-
for (const name of
|
|
920
|
+
for (const name of getSkillNames()) console.log(c.green(" ✓ ") + name + "/");
|
|
816
921
|
|
|
817
922
|
const kbDest = copyKnowledgeBase(skillsRootAbs);
|
|
818
923
|
console.log(c.green(" ✓ ") + "knowledge-base/ " + c.dim("→ " + kbDest));
|
|
Binary file
|
package/hooks/cursor-adapter.py
CHANGED
|
@@ -25,8 +25,8 @@ Cursor event mapping (see hooks-cursor.json):
|
|
|
25
25
|
sessionStart -> trtc-prepare-ui
|
|
26
26
|
beforeReadFile -> gate-slice-read
|
|
27
27
|
preToolUse -> gate-slice-write (filtered to Write/Edit inside)
|
|
28
|
-
afterFileEdit -> verify-ui-post-write
|
|
29
|
-
stop -> stop-apply-evidence, trtc-verify-ui
|
|
28
|
+
afterFileEdit -> verify-ui-post-write
|
|
29
|
+
stop -> stop-apply-evidence, trtc-verify-ui
|
|
30
30
|
(Claude Code's `Stop` event fires per agent loop
|
|
31
31
|
iteration end. Cursor's `stop` event has the same
|
|
32
32
|
semantic ("Called when the agent loop ends") and
|
|
@@ -42,10 +42,9 @@ Cursor event mapping (see hooks-cursor.json):
|
|
|
42
42
|
firing. Empirically (Cursor 3.3.8) `stop` does
|
|
43
43
|
fire reliably; the original "stop never fires"
|
|
44
44
|
observation was caused by hooks not being loaded
|
|
45
|
-
at all, not by the `stop` event itself.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
install path — plugin-level hooks declared in
|
|
45
|
+
at all, not by the `stop` event itself. npx
|
|
46
|
+
installs to project-level `.cursor/hooks.json`;
|
|
47
|
+
plugin-level hooks declared in
|
|
49
48
|
.cursor-plugin/plugin.json are NOT loaded by
|
|
50
49
|
current Cursor versions.)
|
|
51
50
|
|
|
@@ -62,7 +61,24 @@ import sys
|
|
|
62
61
|
from pathlib import Path
|
|
63
62
|
|
|
64
63
|
ADAPTER_DIR = Path(__file__).resolve().parent
|
|
65
|
-
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def _find_plugin_root(start: Path) -> Path:
|
|
67
|
+
# Walk up until we find a directory that contains skills/. This makes the
|
|
68
|
+
# adapter location-independent: it works whether it lives at
|
|
69
|
+
# <plugin>/hooks/cursor-adapter.py (Cursor plugin install + the original
|
|
70
|
+
# npx layout) or under a namespaced subdir like
|
|
71
|
+
# <plugin>/hooks/trtc-agent-skills/cursor-adapter.py (current npx layout,
|
|
72
|
+
# chosen so multiple skill packages can co-exist under .cursor/hooks/).
|
|
73
|
+
# Falls back to the old `.parent` behaviour if no `skills/` is found, so
|
|
74
|
+
# we never regress an existing install.
|
|
75
|
+
for candidate in (start, *start.parents):
|
|
76
|
+
if (candidate / "skills").is_dir():
|
|
77
|
+
return candidate
|
|
78
|
+
return start.parent
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
PLUGIN_ROOT = _find_plugin_root(ADAPTER_DIR)
|
|
66
82
|
|
|
67
83
|
|
|
68
84
|
# Optional debug logging — only writes when TRTC_HOOK_DEBUG_LOG is set to a
|
|
@@ -103,23 +119,20 @@ def _probe_log(key, payload) -> None:
|
|
|
103
119
|
|
|
104
120
|
# Dispatch table: dispatch_key -> relative script path under PLUGIN_ROOT.
|
|
105
121
|
DISPATCH = {
|
|
106
|
-
"
|
|
107
|
-
"
|
|
108
|
-
"gate-slice-write":
|
|
109
|
-
"
|
|
110
|
-
"
|
|
111
|
-
"stop-apply-evidence": "skills/trtc-topic/guardrails/stop_require_apply_evidence.py",
|
|
112
|
-
"trtc-verify-ui": "skills/trtc/room-builder/guardrails/trtc_verify_ui.py",
|
|
113
|
-
"verify-apply-project": "skills/trtc-apply/guardrails/verify_apply_project.py",
|
|
122
|
+
"gate-slice-read": "skills/trtc/hooks/gate_slice_read.py",
|
|
123
|
+
"topic-phase-gate": "skills/trtc/hooks/topic_phase_gate.py",
|
|
124
|
+
"gate-slice-write": "skills/trtc/hooks/gate_slice_write.py",
|
|
125
|
+
"stop-apply-evidence": "skills/trtc/hooks/stop_require_apply_evidence.py",
|
|
126
|
+
"pretooluse-require-business-decisions": "skills/trtc-conference/hooks/pretooluse_require_business_decisions.py",
|
|
114
127
|
}
|
|
115
128
|
|
|
116
129
|
# Dispatch keys whose underlying scripts read JSON from stdin.
|
|
117
130
|
# Other keys are CLI-only and will receive empty stdin.
|
|
118
131
|
STDIN_KEYS = {
|
|
119
132
|
"gate-slice-read",
|
|
133
|
+
"topic-phase-gate",
|
|
120
134
|
"gate-slice-write",
|
|
121
|
-
"
|
|
122
|
-
"verify-slice-must",
|
|
135
|
+
"pretooluse-require-business-decisions",
|
|
123
136
|
}
|
|
124
137
|
|
|
125
138
|
|
|
@@ -164,7 +177,21 @@ def _translate_payload(key: str, cursor: dict) -> dict:
|
|
|
164
177
|
tool_input = cursor.get("tool_input") or cursor.get("toolInput") or {}
|
|
165
178
|
return {"tool_name": tool_name, "tool_input": tool_input}
|
|
166
179
|
|
|
167
|
-
if key
|
|
180
|
+
if key == "topic-phase-gate":
|
|
181
|
+
tool_name = cursor.get("tool_name") or cursor.get("toolName")
|
|
182
|
+
if tool_name not in ("Write", "Edit"):
|
|
183
|
+
return {}
|
|
184
|
+
tool_input = cursor.get("tool_input") or cursor.get("toolInput") or {}
|
|
185
|
+
return {"tool_name": tool_name, "tool_input": tool_input}
|
|
186
|
+
|
|
187
|
+
if key == "pretooluse-require-business-decisions":
|
|
188
|
+
tool_name = cursor.get("tool_name") or cursor.get("toolName")
|
|
189
|
+
if tool_name not in ("Write", "Edit"):
|
|
190
|
+
return {}
|
|
191
|
+
tool_input = cursor.get("tool_input") or cursor.get("toolInput") or {}
|
|
192
|
+
return {"tool_name": tool_name, "tool_input": tool_input}
|
|
193
|
+
|
|
194
|
+
if key in ("verify-ui-post-write",):
|
|
168
195
|
# Cursor's afterFileEdit payload: {file_path, edits}
|
|
169
196
|
file_path = cursor.get("file_path") or cursor.get("filePath")
|
|
170
197
|
return {"tool_name": "Edit", "tool_input": {"file_path": file_path}}
|
package/hooks/hooks-cursor.json
CHANGED
|
@@ -1,38 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 1,
|
|
3
3
|
"hooks": {
|
|
4
|
-
|
|
5
|
-
{
|
|
6
|
-
"command": "python3 $HOME/.cursor/plugins/local/trtc-agent-skills/hooks/cursor-adapter.py trtc-prepare-ui"
|
|
7
|
-
}
|
|
8
|
-
],
|
|
9
|
-
"beforeReadFile": [
|
|
4
|
+
"beforeReadFile": [
|
|
10
5
|
{
|
|
11
6
|
"command": "python3 $HOME/.cursor/plugins/local/trtc-agent-skills/hooks/cursor-adapter.py gate-slice-read"
|
|
12
7
|
}
|
|
13
8
|
],
|
|
14
9
|
"preToolUse": [
|
|
15
10
|
{
|
|
16
|
-
"command": "python3 $HOME/.cursor/plugins/local/trtc-agent-skills/hooks/cursor-adapter.py
|
|
17
|
-
}
|
|
18
|
-
],
|
|
19
|
-
"afterFileEdit": [
|
|
11
|
+
"command": "python3 $HOME/.cursor/plugins/local/trtc-agent-skills/hooks/cursor-adapter.py topic-phase-gate"
|
|
12
|
+
},
|
|
20
13
|
{
|
|
21
|
-
"command": "python3 $HOME/.cursor/plugins/local/trtc-agent-skills/hooks/cursor-adapter.py
|
|
14
|
+
"command": "python3 $HOME/.cursor/plugins/local/trtc-agent-skills/hooks/cursor-adapter.py gate-slice-write"
|
|
22
15
|
},
|
|
23
16
|
{
|
|
24
|
-
"command": "python3 $HOME/.cursor/plugins/local/trtc-agent-skills/hooks/cursor-adapter.py
|
|
17
|
+
"command": "python3 $HOME/.cursor/plugins/local/trtc-agent-skills/hooks/cursor-adapter.py pretooluse-require-business-decisions"
|
|
25
18
|
}
|
|
26
19
|
],
|
|
27
20
|
"stop": [
|
|
28
21
|
{
|
|
29
22
|
"command": "python3 $HOME/.cursor/plugins/local/trtc-agent-skills/hooks/cursor-adapter.py stop-apply-evidence"
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"command": "python3 $HOME/.cursor/plugins/local/trtc-agent-skills/hooks/cursor-adapter.py trtc-verify-ui"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"command": "python3 $HOME/.cursor/plugins/local/trtc-agent-skills/hooks/cursor-adapter.py verify-apply-project"
|
|
36
23
|
}
|
|
37
24
|
]
|
|
38
25
|
}
|
package/hooks/hooks.json
CHANGED
|
@@ -1,22 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"hooks": {
|
|
3
|
-
"SessionStart": [
|
|
4
|
-
{
|
|
5
|
-
"hooks": [
|
|
6
|
-
{
|
|
7
|
-
"type": "command",
|
|
8
|
-
"command": "[ ! -f \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc/room-builder/guardrails/trtc_prepare_ui.py\" ] || python3 \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc/room-builder/guardrails/trtc_prepare_ui.py\""
|
|
9
|
-
}
|
|
10
|
-
]
|
|
11
|
-
}
|
|
12
|
-
],
|
|
13
3
|
"PreToolUse": [
|
|
14
4
|
{
|
|
15
5
|
"matcher": "Read",
|
|
16
6
|
"hooks": [
|
|
17
7
|
{
|
|
18
8
|
"type": "command",
|
|
19
|
-
"command": "[ ! -f \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc
|
|
9
|
+
"command": "[ ! -f \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc/hooks/gate_slice_read.py\" ] || python3 \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc/hooks/gate_slice_read.py\""
|
|
20
10
|
}
|
|
21
11
|
]
|
|
22
12
|
},
|
|
@@ -25,22 +15,15 @@
|
|
|
25
15
|
"hooks": [
|
|
26
16
|
{
|
|
27
17
|
"type": "command",
|
|
28
|
-
"command": "[ ! -f \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc
|
|
29
|
-
}
|
|
30
|
-
]
|
|
31
|
-
}
|
|
32
|
-
],
|
|
33
|
-
"PostToolUse": [
|
|
34
|
-
{
|
|
35
|
-
"matcher": "Write|Edit",
|
|
36
|
-
"hooks": [
|
|
18
|
+
"command": "[ ! -f \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc/hooks/topic_phase_gate.py\" ] || python3 \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc/hooks/topic_phase_gate.py\""
|
|
19
|
+
},
|
|
37
20
|
{
|
|
38
21
|
"type": "command",
|
|
39
|
-
"command": "[ ! -f \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc/
|
|
22
|
+
"command": "[ ! -f \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc/hooks/gate_slice_write.py\" ] || python3 \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc/hooks/gate_slice_write.py\""
|
|
40
23
|
},
|
|
41
24
|
{
|
|
42
25
|
"type": "command",
|
|
43
|
-
"command": "[ ! -f \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc-
|
|
26
|
+
"command": "[ ! -f \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc-conference/hooks/pretooluse_require_business_decisions.py\" ] || python3 \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc-conference/hooks/pretooluse_require_business_decisions.py\""
|
|
44
27
|
}
|
|
45
28
|
]
|
|
46
29
|
}
|
|
@@ -50,15 +33,7 @@
|
|
|
50
33
|
"hooks": [
|
|
51
34
|
{
|
|
52
35
|
"type": "command",
|
|
53
|
-
"command": "[ ! -f \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
"type": "command",
|
|
57
|
-
"command": "[ ! -f \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc/room-builder/guardrails/trtc_verify_ui.py\" ] || python3 \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc/room-builder/guardrails/trtc_verify_ui.py\""
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
"type": "command",
|
|
61
|
-
"command": "[ ! -f \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc-apply/guardrails/verify_apply_project.py\" ] || python3 \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc-apply/guardrails/verify_apply_project.py\""
|
|
36
|
+
"command": "[ ! -f \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc/hooks/stop_require_apply_evidence.py\" ] || python3 \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc/hooks/stop_require_apply_evidence.py\""
|
|
62
37
|
}
|
|
63
38
|
]
|
|
64
39
|
}
|