@a1st/aix-schema 0.1.0 → 0.3.0

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/schema.json CHANGED
@@ -630,6 +630,384 @@
630
630
  "description": "Map of prompt names to their definitions (or false to disable)",
631
631
  "default": {}
632
632
  },
633
+ "agents": {
634
+ "type": "object",
635
+ "additionalProperties": {
636
+ "anyOf": [
637
+ {
638
+ "anyOf": [
639
+ {
640
+ "type": "string",
641
+ "description": "Source reference: local path (./, ../, /, file:), git URL (https://), or git shorthand (github:)"
642
+ },
643
+ {
644
+ "type": "object",
645
+ "properties": {
646
+ "description": {
647
+ "type": "string",
648
+ "description": "When this agent should be used"
649
+ },
650
+ "mode": {
651
+ "type": "string",
652
+ "enum": ["primary", "subagent"],
653
+ "default": "subagent",
654
+ "description": "Whether the agent is a primary assistant or a delegated subagent"
655
+ },
656
+ "model": {
657
+ "type": "string",
658
+ "description": "Model alias or model ID for this agent"
659
+ },
660
+ "tools": {
661
+ "type": "array",
662
+ "items": {
663
+ "type": "string"
664
+ },
665
+ "description": "Tool names or tool IDs available to this agent"
666
+ },
667
+ "permissions": {
668
+ "type": "object",
669
+ "additionalProperties": {
670
+ "type": "string",
671
+ "enum": ["allow", "ask", "deny"],
672
+ "description": "Permission policy for an agent capability"
673
+ },
674
+ "description": "Portable capability permissions such as edit, bash, web, or write"
675
+ },
676
+ "mcp": {
677
+ "type": "object",
678
+ "additionalProperties": {
679
+ "anyOf": [
680
+ {
681
+ "type": "object",
682
+ "properties": {
683
+ "enabled": {
684
+ "type": "boolean",
685
+ "description": "Whether server is active (default: true)"
686
+ },
687
+ "tools": {
688
+ "anyOf": [
689
+ {
690
+ "type": "array",
691
+ "items": {
692
+ "type": "string"
693
+ },
694
+ "description": "Allowed tool names"
695
+ },
696
+ {
697
+ "type": "object",
698
+ "properties": {
699
+ "include": {
700
+ "type": "array",
701
+ "items": {
702
+ "type": "string"
703
+ },
704
+ "description": "Tools to include"
705
+ },
706
+ "exclude": {
707
+ "type": "array",
708
+ "items": {
709
+ "type": "string"
710
+ },
711
+ "description": "Tools to exclude"
712
+ }
713
+ },
714
+ "additionalProperties": false
715
+ }
716
+ ],
717
+ "description": "Tool access control"
718
+ },
719
+ "disabledTools": {
720
+ "type": "array",
721
+ "items": {
722
+ "type": "string"
723
+ },
724
+ "description": "Tools to disable (Windsurf format)"
725
+ },
726
+ "resources": {
727
+ "anyOf": [
728
+ {
729
+ "type": "array",
730
+ "items": {
731
+ "type": "string"
732
+ },
733
+ "description": "Allowed resource patterns (glob)"
734
+ },
735
+ {
736
+ "type": "object",
737
+ "properties": {
738
+ "include": {
739
+ "type": "array",
740
+ "items": {
741
+ "type": "string"
742
+ },
743
+ "description": "Resource patterns to include"
744
+ },
745
+ "exclude": {
746
+ "type": "array",
747
+ "items": {
748
+ "type": "string"
749
+ },
750
+ "description": "Resource patterns to exclude"
751
+ }
752
+ },
753
+ "additionalProperties": false
754
+ }
755
+ ],
756
+ "description": "Resource access control"
757
+ },
758
+ "autoStart": {
759
+ "type": "boolean",
760
+ "description": "Start with editor (default: true)"
761
+ },
762
+ "restartOnFailure": {
763
+ "type": "boolean",
764
+ "description": "Auto-restart on crash (default: true)"
765
+ },
766
+ "maxRestarts": {
767
+ "type": "integer",
768
+ "exclusiveMinimum": 0,
769
+ "description": "Max restart attempts (default: 3)"
770
+ },
771
+ "command": {
772
+ "type": "string",
773
+ "description": "Command to execute"
774
+ },
775
+ "args": {
776
+ "type": "array",
777
+ "items": {
778
+ "type": "string"
779
+ },
780
+ "description": "Command arguments"
781
+ },
782
+ "env": {
783
+ "type": "object",
784
+ "additionalProperties": {
785
+ "type": "string",
786
+ "description": "Environment variable value. Use ${VAR_NAME} for dynamic resolution."
787
+ },
788
+ "description": "Environment variables"
789
+ },
790
+ "cwd": {
791
+ "type": "string",
792
+ "description": "Working directory"
793
+ },
794
+ "shell": {
795
+ "type": "boolean",
796
+ "description": "Run in shell"
797
+ }
798
+ },
799
+ "required": ["command"],
800
+ "additionalProperties": false
801
+ },
802
+ {
803
+ "type": "object",
804
+ "properties": {
805
+ "enabled": {
806
+ "type": "boolean",
807
+ "description": "Whether server is active (default: true)"
808
+ },
809
+ "tools": {
810
+ "anyOf": [
811
+ {
812
+ "type": "array",
813
+ "items": {
814
+ "type": "string"
815
+ },
816
+ "description": "Allowed tool names"
817
+ },
818
+ {
819
+ "type": "object",
820
+ "properties": {
821
+ "include": {
822
+ "type": "array",
823
+ "items": {
824
+ "type": "string"
825
+ },
826
+ "description": "Tools to include"
827
+ },
828
+ "exclude": {
829
+ "type": "array",
830
+ "items": {
831
+ "type": "string"
832
+ },
833
+ "description": "Tools to exclude"
834
+ }
835
+ },
836
+ "additionalProperties": false
837
+ }
838
+ ],
839
+ "description": "Tool access control"
840
+ },
841
+ "disabledTools": {
842
+ "type": "array",
843
+ "items": {
844
+ "type": "string"
845
+ },
846
+ "description": "Tools to disable (Windsurf format)"
847
+ },
848
+ "resources": {
849
+ "anyOf": [
850
+ {
851
+ "type": "array",
852
+ "items": {
853
+ "type": "string"
854
+ },
855
+ "description": "Allowed resource patterns (glob)"
856
+ },
857
+ {
858
+ "type": "object",
859
+ "properties": {
860
+ "include": {
861
+ "type": "array",
862
+ "items": {
863
+ "type": "string"
864
+ },
865
+ "description": "Resource patterns to include"
866
+ },
867
+ "exclude": {
868
+ "type": "array",
869
+ "items": {
870
+ "type": "string"
871
+ },
872
+ "description": "Resource patterns to exclude"
873
+ }
874
+ },
875
+ "additionalProperties": false
876
+ }
877
+ ],
878
+ "description": "Resource access control"
879
+ },
880
+ "autoStart": {
881
+ "type": "boolean",
882
+ "description": "Start with editor (default: true)"
883
+ },
884
+ "restartOnFailure": {
885
+ "type": "boolean",
886
+ "description": "Auto-restart on crash (default: true)"
887
+ },
888
+ "maxRestarts": {
889
+ "type": "integer",
890
+ "exclusiveMinimum": 0,
891
+ "description": "Max restart attempts (default: 3)"
892
+ },
893
+ "url": {
894
+ "type": "string",
895
+ "format": "uri",
896
+ "description": "MCP endpoint URL (Streamable HTTP)"
897
+ },
898
+ "headers": {
899
+ "type": "object",
900
+ "additionalProperties": {
901
+ "type": "string",
902
+ "description": "Environment variable value. Use ${VAR_NAME} for dynamic resolution."
903
+ },
904
+ "description": "HTTP headers"
905
+ },
906
+ "timeout": {
907
+ "type": "number",
908
+ "exclusiveMinimum": 0,
909
+ "description": "Connection timeout (ms)"
910
+ },
911
+ "validateOrigin": {
912
+ "type": "boolean",
913
+ "description": "Validate Origin header (security)"
914
+ }
915
+ },
916
+ "required": ["url"],
917
+ "additionalProperties": false
918
+ }
919
+ ]
920
+ },
921
+ "description": "MCP servers available to this agent when the target editor supports per-agent MCP"
922
+ },
923
+ "content": {
924
+ "type": "string",
925
+ "description": "Inline agent system prompt"
926
+ },
927
+ "path": {
928
+ "type": "string",
929
+ "description": "Local file path to agent prompt content"
930
+ },
931
+ "git": {
932
+ "type": "object",
933
+ "properties": {
934
+ "url": {
935
+ "type": "string",
936
+ "description": "Git repository URL or shorthand (e.g., github:user/repo)"
937
+ },
938
+ "path": {
939
+ "type": "string",
940
+ "description": "Path to rule file within repo (default: root)"
941
+ },
942
+ "ref": {
943
+ "type": "string",
944
+ "description": "Branch, tag, or commit (default: main/master)"
945
+ }
946
+ },
947
+ "required": ["url"],
948
+ "additionalProperties": false,
949
+ "description": "Git repository source"
950
+ },
951
+ "npm": {
952
+ "type": "object",
953
+ "properties": {
954
+ "npm": {
955
+ "type": "string",
956
+ "description": "NPM package name (e.g., \"@company/rules\")"
957
+ },
958
+ "path": {
959
+ "type": "string",
960
+ "description": "Path to file within package (e.g., \"rules/style.md\")"
961
+ },
962
+ "version": {
963
+ "type": "string",
964
+ "description": "Version to auto-install (omit to use project node_modules)"
965
+ }
966
+ },
967
+ "required": ["npm", "path"],
968
+ "additionalProperties": false,
969
+ "description": "NPM package source"
970
+ },
971
+ "editor": {
972
+ "type": "object",
973
+ "additionalProperties": {
974
+ "type": "object",
975
+ "additionalProperties": {}
976
+ },
977
+ "propertyNames": {
978
+ "enum": [
979
+ "windsurf",
980
+ "cursor",
981
+ "claude-code",
982
+ "copilot",
983
+ "zed",
984
+ "neovim",
985
+ "gemini",
986
+ "opencode"
987
+ ]
988
+ },
989
+ "description": "Editor-specific agent fields that aix preserves for round-tripping"
990
+ }
991
+ },
992
+ "additionalProperties": false,
993
+ "description": "Agent or subagent definition"
994
+ }
995
+ ]
996
+ },
997
+ {
998
+ "type": "boolean",
999
+ "const": false
1000
+ }
1001
+ ]
1002
+ },
1003
+ "propertyNames": {
1004
+ "minLength": 1,
1005
+ "maxLength": 64,
1006
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
1007
+ },
1008
+ "description": "Map of agent names to their definitions (or false to disable)",
1009
+ "default": {}
1010
+ },
633
1011
  "editors": {
634
1012
  "anyOf": [
635
1013
  {
@@ -1455,32 +1833,150 @@
1455
1833
  "properties": {
1456
1834
  "matcher": {
1457
1835
  "type": "string",
1458
- "description": "Pattern to match (regex supported, editor-specific)"
1836
+ "description": "Pattern to match (regex or pipe-separated literal, editor-specific)."
1837
+ },
1838
+ "sequential": {
1839
+ "type": "boolean",
1840
+ "description": "Run hooks in this group sequentially instead of in parallel (Gemini)."
1841
+ },
1842
+ "description": {
1843
+ "type": "string",
1844
+ "description": "Free-form description for the group."
1459
1845
  },
1460
1846
  "hooks": {
1461
1847
  "type": "array",
1462
1848
  "items": {
1463
1849
  "type": "object",
1464
1850
  "properties": {
1851
+ "type": {
1852
+ "type": "string",
1853
+ "enum": ["command", "http", "mcp_tool", "prompt", "agent"],
1854
+ "description": "Action handler kind (default: \"command\")."
1855
+ },
1465
1856
  "command": {
1466
1857
  "type": "string",
1467
- "description": "Shell command to execute"
1858
+ "description": "Shell command to execute."
1859
+ },
1860
+ "bash": {
1861
+ "type": "string",
1862
+ "description": "Bash command (macOS / Linux)."
1863
+ },
1864
+ "powershell": {
1865
+ "type": "string",
1866
+ "description": "PowerShell command (Windows)."
1867
+ },
1868
+ "shell": {
1869
+ "type": "string",
1870
+ "enum": ["bash", "powershell"],
1871
+ "description": "Shell selector when only one of `command` / `bash` / `powershell` is set."
1468
1872
  },
1469
1873
  "timeout": {
1470
1874
  "type": "number",
1471
1875
  "exclusiveMinimum": 0,
1472
- "description": "Timeout in seconds"
1876
+ "description": "Timeout in seconds. Adapters convert to native units (e.g. milliseconds)."
1473
1877
  },
1474
1878
  "show_output": {
1475
1879
  "type": "boolean",
1476
- "description": "Whether to show command output in UI"
1880
+ "description": "Whether to surface command output in the editor UI (Windsurf-specific)."
1477
1881
  },
1478
1882
  "working_directory": {
1479
1883
  "type": "string",
1480
- "description": "Working directory for the command"
1884
+ "description": "Working directory for the command. Interchangeable with `cwd`; the strategy decides which native key to emit (Windsurf uses `working_directory`; Copilot, Gemini, and Claude Code use `cwd`)."
1885
+ },
1886
+ "cwd": {
1887
+ "type": "string",
1888
+ "description": "Working directory for the command. Interchangeable with `working_directory`."
1889
+ },
1890
+ "env": {
1891
+ "type": "object",
1892
+ "additionalProperties": {
1893
+ "type": "string"
1894
+ },
1895
+ "description": "Environment variables to set when running the command."
1896
+ },
1897
+ "async": {
1898
+ "type": "boolean",
1899
+ "description": "Run the command in the background without blocking the agent."
1900
+ },
1901
+ "async_rewake": {
1902
+ "type": "boolean",
1903
+ "description": "Run async; on exit code 2, wake the agent with stderr/stdout context."
1904
+ },
1905
+ "if": {
1906
+ "type": "string",
1907
+ "description": "Permission-rule expression (Claude Code) gating execution."
1908
+ },
1909
+ "status_message": {
1910
+ "type": "string",
1911
+ "description": "Custom spinner message while the hook runs (Claude Code)."
1912
+ },
1913
+ "once": {
1914
+ "type": "boolean",
1915
+ "description": "Run once per session, then unregister (Claude Code skill / agent frontmatter)."
1916
+ },
1917
+ "url": {
1918
+ "type": "string",
1919
+ "description": "URL to POST hook input to (Claude Code HTTP)."
1920
+ },
1921
+ "headers": {
1922
+ "type": "object",
1923
+ "additionalProperties": {
1924
+ "type": "string"
1925
+ },
1926
+ "description": "Additional HTTP headers, with env-var interpolation (Claude Code HTTP)."
1927
+ },
1928
+ "allowed_env_vars": {
1929
+ "type": "array",
1930
+ "items": {
1931
+ "type": "string"
1932
+ },
1933
+ "description": "Env-var allowlist for header interpolation (Claude Code HTTP)."
1934
+ },
1935
+ "mcp_server": {
1936
+ "type": "string",
1937
+ "description": "Configured MCP server name (Claude Code mcp_tool)."
1938
+ },
1939
+ "mcp_tool": {
1940
+ "type": "string",
1941
+ "description": "Tool name on the MCP server (Claude Code mcp_tool)."
1942
+ },
1943
+ "mcp_input": {
1944
+ "type": "object",
1945
+ "additionalProperties": {},
1946
+ "description": "Arguments for the MCP tool, with `${tool_input.x}` substitution (Claude Code)."
1947
+ },
1948
+ "prompt": {
1949
+ "type": "string",
1950
+ "description": "Prompt text (Claude Code, Cursor, Copilot)."
1951
+ },
1952
+ "model": {
1953
+ "type": "string",
1954
+ "description": "Model override for prompt / agent hooks."
1955
+ },
1956
+ "description": {
1957
+ "type": "string",
1958
+ "description": "Free-form description for logs / UI."
1959
+ },
1960
+ "name": {
1961
+ "type": "string",
1962
+ "description": "Friendly identifier for logs and CLI commands."
1963
+ },
1964
+ "fail_closed": {
1965
+ "type": "boolean",
1966
+ "description": "Block the action when the hook itself fails (Cursor)."
1967
+ },
1968
+ "loop_limit": {
1969
+ "anyOf": [
1970
+ {
1971
+ "type": "integer"
1972
+ },
1973
+ {
1974
+ "type": "null"
1975
+ }
1976
+ ],
1977
+ "description": "Max auto-triggered follow-ups for stop-style events (Cursor)."
1481
1978
  }
1482
1979
  },
1483
- "required": ["command"],
1484
1980
  "additionalProperties": false,
1485
1981
  "description": "Hook action configuration"
1486
1982
  },
@@ -1494,8 +1990,18 @@
1494
1990
  },
1495
1991
  "propertyNames": {
1496
1992
  "enum": [
1993
+ "session_start",
1994
+ "session_end",
1995
+ "setup",
1996
+ "pre_prompt",
1997
+ "user_prompt_expansion",
1497
1998
  "pre_tool_use",
1498
1999
  "post_tool_use",
2000
+ "post_tool_use_failure",
2001
+ "post_tool_batch",
2002
+ "pre_tool_selection",
2003
+ "permission_request",
2004
+ "permission_denied",
1499
2005
  "pre_file_read",
1500
2006
  "post_file_read",
1501
2007
  "pre_file_write",
@@ -1504,17 +2010,33 @@
1504
2010
  "post_command",
1505
2011
  "pre_mcp_tool",
1506
2012
  "post_mcp_tool",
1507
- "pre_prompt",
1508
- "pre_compact",
1509
- "post_compact",
2013
+ "pre_tab_file_read",
2014
+ "post_tab_file_edit",
2015
+ "pre_model_request",
2016
+ "post_model_response",
2017
+ "pre_response_chunk",
2018
+ "pre_agent",
2019
+ "post_agent",
2020
+ "post_response",
2021
+ "post_response_with_transcript",
2022
+ "agent_stop",
1510
2023
  "subagent_start",
1511
2024
  "subagent_stop",
2025
+ "subagent_idle",
2026
+ "pre_compact",
2027
+ "post_compact",
1512
2028
  "task_created",
1513
2029
  "task_completed",
1514
2030
  "worktree_setup",
1515
- "session_start",
1516
- "session_end",
1517
- "agent_stop"
2031
+ "worktree_remove",
2032
+ "instructions_loaded",
2033
+ "config_change",
2034
+ "cwd_changed",
2035
+ "file_changed",
2036
+ "notification",
2037
+ "elicitation",
2038
+ "elicitation_result",
2039
+ "error_occurred"
1518
2040
  ]
1519
2041
  },
1520
2042
  "description": "Lifecycle hooks for AI agent events"