2026-04-01 09:17:21 -05:00
|
|
|
"""Kiro CLI integration."""
|
|
|
|
|
|
|
|
|
|
from ..base import MarkdownIntegration
|
|
|
|
|
|
|
|
|
|
|
2026-05-12 15:48:25 +03:00
|
|
|
# Kiro CLI file-based prompts do NOT support any argument-substitution syntax,
|
|
|
|
|
# so a raw "$ARGUMENTS" token would reach the model verbatim and break the
|
|
|
|
|
# prompt (issue #1926, kirodotdev/Kiro#4141). Use a prose fallback so the
|
|
|
|
|
# rendered prompt instructs the model to take its argument from the user's
|
|
|
|
|
# next message.
|
|
|
|
|
_KIRO_ARG_FALLBACK = "(the user will provide the argument in this conversation)"
|
|
|
|
|
|
|
|
|
|
|
2026-04-01 09:17:21 -05:00
|
|
|
class KiroCliIntegration(MarkdownIntegration):
|
|
|
|
|
key = "kiro-cli"
|
|
|
|
|
config = {
|
|
|
|
|
"name": "Kiro CLI",
|
|
|
|
|
"folder": ".kiro/",
|
|
|
|
|
"commands_subdir": "prompts",
|
|
|
|
|
"install_url": "https://kiro.dev/docs/cli/",
|
|
|
|
|
"requires_cli": True,
|
|
|
|
|
}
|
|
|
|
|
registrar_config = {
|
|
|
|
|
"dir": ".kiro/prompts",
|
|
|
|
|
"format": "markdown",
|
2026-05-12 15:48:25 +03:00
|
|
|
"args": _KIRO_ARG_FALLBACK,
|
2026-04-01 09:17:21 -05:00
|
|
|
"extension": ".md",
|
|
|
|
|
}
|
|
|
|
|
context_file = "AGENTS.md"
|