linkshell-cli 0.2.113 → 0.2.114

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.
@@ -723,6 +723,73 @@ interface ProviderRuntimeCapabilities {
723
723
  const ALL_REASONING_EFFORTS = ["none", "minimal", "low", "medium", "high", "xhigh"] as const;
724
724
  const ALL_PERMISSION_MODES = ["read_only", "workspace_write", "full_access"] as const;
725
725
  const CODEX_COMMAND_NAMES = ["plan", "exit-plan", "compact", "clear", "status", "review", "subagents"] as const;
726
+ const CLAUDE_REMOTE_HIDDEN_COMMANDS = new Set([
727
+ "add-dir",
728
+ "agents",
729
+ "allowed-tools",
730
+ "android",
731
+ "app",
732
+ "bashes",
733
+ "branch",
734
+ "bug",
735
+ "checkpoint",
736
+ "chrome",
737
+ "color",
738
+ "config",
739
+ "continue",
740
+ "copy",
741
+ "cost",
742
+ "desktop",
743
+ "diff",
744
+ "doctor",
745
+ "exit",
746
+ "export",
747
+ "extra-usage",
748
+ "feedback",
749
+ "focus",
750
+ "fork",
751
+ "hooks",
752
+ "ide",
753
+ "init",
754
+ "install-github-app",
755
+ "install-slack-app",
756
+ "ios",
757
+ "keybindings",
758
+ "login",
759
+ "logout",
760
+ "mcp",
761
+ "memory",
762
+ "migrate-installer",
763
+ "mobile",
764
+ "model",
765
+ "passes",
766
+ "permissions",
767
+ "plugin",
768
+ "powerup",
769
+ "pr-comments",
770
+ "privacy-settings",
771
+ "quit",
772
+ "rc",
773
+ "release-notes",
774
+ "remote-control",
775
+ "remote-env",
776
+ "resume",
777
+ "rewind",
778
+ "settings",
779
+ "statusline",
780
+ "stickers",
781
+ "tasks",
782
+ "teleport",
783
+ "terminal-setup",
784
+ "theme",
785
+ "tp",
786
+ "tui",
787
+ "undo",
788
+ "upgrade",
789
+ "vim",
790
+ "voice",
791
+ "web-setup",
792
+ ]);
726
793
  const CLAUDE_BUILT_IN_COMMANDS: Array<{ name: string; description: string; argsMode?: AgentCommandDescriptor["argsMode"]; destructive?: boolean }> = [
727
794
  { name: "add-dir", description: "Add a working directory for file access", argsMode: "required" },
728
795
  { name: "agents", description: "Manage agent configurations", argsMode: "none" },
@@ -827,6 +894,10 @@ const CLAUDE_BUILT_IN_COMMANDS: Array<{ name: string; description: string; argsM
827
894
  { name: "web-setup", description: "Connect your GitHub account to Claude Code on the web", argsMode: "none" },
828
895
  ];
829
896
 
897
+ function isClaudeRemoteFriendlyCommand(name: string): boolean {
898
+ return !CLAUDE_REMOTE_HIDDEN_COMMANDS.has(name.replace(/^\/+/, ""));
899
+ }
900
+
830
901
  function commandId(provider: AgentProvider, name: string, source: AgentCommandSource = "built_in"): string {
831
902
  return `${provider}:${source}:${name.replace(/^\/+/, "")}`;
832
903
  }
@@ -946,15 +1017,17 @@ function defaultProviderCommands(provider: AgentProvider, cwd: string, enabled:
946
1017
  }));
947
1018
  }
948
1019
  if (provider === "claude") {
949
- const builtIns = CLAUDE_BUILT_IN_COMMANDS.map((entry) => makeCommand({
950
- provider,
951
- name: entry.name,
952
- description: entry.description,
953
- argsMode: entry.argsMode,
954
- destructive: entry.destructive,
955
- disabledReason,
956
- executionKind: "prompt",
957
- }));
1020
+ const builtIns = CLAUDE_BUILT_IN_COMMANDS
1021
+ .filter((entry) => isClaudeRemoteFriendlyCommand(entry.name))
1022
+ .map((entry) => makeCommand({
1023
+ provider,
1024
+ name: entry.name,
1025
+ description: entry.description,
1026
+ argsMode: entry.argsMode,
1027
+ destructive: entry.destructive,
1028
+ disabledReason,
1029
+ executionKind: "prompt",
1030
+ }));
958
1031
  const custom = customClaudeCommands(cwd).map((command) => ({
959
1032
  ...command,
960
1033
  disabledReason: command.disabledReason ?? disabledReason,
@@ -980,7 +1053,12 @@ function mergeCommands(...groups: Array<AgentCommandDescriptor[] | undefined>):
980
1053
  for (const group of groups) {
981
1054
  for (const command of group ?? []) {
982
1055
  const key = `${command.provider ?? ""}:${command.name}`;
983
- map.set(key, { ...map.get(key), ...command });
1056
+ const existing = map.get(key);
1057
+ map.set(key, {
1058
+ ...existing,
1059
+ ...command,
1060
+ disabledReason: command.disabledReason ?? existing?.disabledReason,
1061
+ });
984
1062
  }
985
1063
  }
986
1064
  return [...map.values()].sort((a, b) => a.name.localeCompare(b.name));
@@ -998,6 +1076,7 @@ function runtimeCommands(provider: AgentProvider, value: unknown): AgentCommandD
998
1076
  return commandsValue
999
1077
  .map((entry) => {
1000
1078
  if (typeof entry === "string") {
1079
+ if (provider === "claude" && !isClaudeRemoteFriendlyCommand(entry)) return undefined;
1001
1080
  return makeCommand({
1002
1081
  provider,
1003
1082
  name: entry,
@@ -1010,6 +1089,7 @@ function runtimeCommands(provider: AgentProvider, value: unknown): AgentCommandD
1010
1089
  const record = asRecord(entry);
1011
1090
  const name = firstString(record, ["name", "command", "id"]);
1012
1091
  if (!name) return undefined;
1092
+ if (provider === "claude" && !isClaudeRemoteFriendlyCommand(name)) return undefined;
1013
1093
  return makeCommand({
1014
1094
  provider,
1015
1095
  name,