claude-smart 0.2.30 → 0.2.32

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.
Files changed (64) hide show
  1. package/README.md +2 -2
  2. package/bin/claude-smart.js +172 -18
  3. package/package.json +1 -1
  4. package/plugin/.claude-plugin/plugin.json +1 -1
  5. package/plugin/.codex-plugin/plugin.json +1 -1
  6. package/plugin/dashboard/app/api/config/route.ts +11 -2
  7. package/plugin/dashboard/app/api/health/route.ts +45 -6
  8. package/plugin/dashboard/app/api/reflexio/[...path]/route.ts +15 -7
  9. package/plugin/dashboard/app/api/rules/applied/route.ts +27 -0
  10. package/plugin/dashboard/app/configure/env/page.tsx +36 -31
  11. package/plugin/dashboard/app/configure/layout.tsx +1 -1
  12. package/plugin/dashboard/app/configure/server/page.tsx +8 -14
  13. package/plugin/dashboard/app/dashboard/page.tsx +311 -115
  14. package/plugin/dashboard/app/globals.css +80 -66
  15. package/plugin/dashboard/app/layout.tsx +13 -10
  16. package/plugin/dashboard/app/preferences/[id]/page.tsx +21 -32
  17. package/plugin/dashboard/app/preferences/page.tsx +154 -54
  18. package/plugin/dashboard/app/preferences/project/[id]/page.tsx +1 -0
  19. package/plugin/dashboard/app/rules/[id]/page.tsx +51 -0
  20. package/plugin/dashboard/app/sessions/[sessionId]/page.tsx +4 -4
  21. package/plugin/dashboard/app/sessions/page.tsx +14 -10
  22. package/plugin/dashboard/app/skills/page.tsx +175 -56
  23. package/plugin/dashboard/app/skills/project/[id]/page.tsx +22 -38
  24. package/plugin/dashboard/app/skills/shared/[id]/page.tsx +20 -37
  25. package/plugin/dashboard/components/common/delete-learning-danger-zone.tsx +166 -0
  26. package/plugin/dashboard/components/common/empty-state.tsx +4 -2
  27. package/plugin/dashboard/components/common/learnings-badge.tsx +1 -1
  28. package/plugin/dashboard/components/common/page-header.tsx +5 -3
  29. package/plugin/dashboard/components/common/page-tabs.tsx +4 -4
  30. package/plugin/dashboard/components/common/stat-card.tsx +9 -5
  31. package/plugin/dashboard/components/layout/sidebar.tsx +24 -9
  32. package/plugin/dashboard/components/layout/top-bar.tsx +37 -25
  33. package/plugin/dashboard/components/ui/input.tsx +1 -0
  34. package/plugin/dashboard/hooks/use-settings.tsx +30 -61
  35. package/plugin/dashboard/hooks/use-stall-state.ts +5 -9
  36. package/plugin/dashboard/lib/config-file.ts +2 -0
  37. package/plugin/dashboard/lib/reflexio-client.ts +23 -48
  38. package/plugin/dashboard/lib/session-reader.ts +222 -6
  39. package/plugin/dashboard/lib/types.ts +20 -1
  40. package/plugin/dashboard/package-lock.json +70 -95
  41. package/plugin/dashboard/package.json +5 -2
  42. package/plugin/hooks/hooks.json +1 -1
  43. package/plugin/pyproject.toml +1 -1
  44. package/plugin/scripts/_lib.sh +126 -0
  45. package/plugin/scripts/backend-service.sh +32 -7
  46. package/plugin/scripts/cli.sh +4 -2
  47. package/plugin/scripts/codex-hook.js +100 -3
  48. package/plugin/scripts/dashboard-service.sh +98 -19
  49. package/plugin/scripts/hook_entry.sh +32 -11
  50. package/plugin/scripts/smart-install.sh +27 -44
  51. package/plugin/src/claude_smart/cli.py +204 -20
  52. package/plugin/src/claude_smart/context_format.py +244 -6
  53. package/plugin/src/claude_smart/context_inject.py +8 -1
  54. package/plugin/src/claude_smart/cs_cite.py +186 -34
  55. package/plugin/src/claude_smart/env_config.py +102 -0
  56. package/plugin/src/claude_smart/events/session_end.py +171 -6
  57. package/plugin/src/claude_smart/events/session_start.py +26 -2
  58. package/plugin/src/claude_smart/events/stop.py +48 -9
  59. package/plugin/src/claude_smart/hook.py +62 -4
  60. package/plugin/src/claude_smart/hook_log.py +301 -0
  61. package/plugin/src/claude_smart/internal_call.py +30 -0
  62. package/plugin/src/claude_smart/publish.py +5 -0
  63. package/plugin/src/claude_smart/reflexio_adapter.py +102 -26
  64. package/plugin/uv.lock +1 -1
@@ -2,19 +2,18 @@
2
2
 
3
3
  import { useTheme } from "next-themes";
4
4
  import Image from "next/image";
5
- import { Moon, Sun, Menu } from "lucide-react";
6
- import { Input } from "@/components/ui/input";
5
+ import { Link2, Menu, Moon, Sun } from "lucide-react";
7
6
  import { Button } from "@/components/ui/button";
8
7
  import { useSettings } from "@/hooks/use-settings";
9
8
  import { Sheet, SheetContent, SheetTrigger } from "@/components/ui/sheet";
10
9
  import { Sidebar } from "./sidebar";
11
10
 
12
11
  export function TopBar() {
13
- const { reflexioUrl, setReflexioUrl } = useSettings();
12
+ const { reflexioUrl } = useSettings();
14
13
  const { theme, setTheme } = useTheme();
15
14
 
16
15
  return (
17
- <header className="h-14 border-b border-border bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60 flex items-center px-4 gap-3 shrink-0">
16
+ <header className="h-16 border-b border-border bg-card/92 backdrop-blur supports-[backdrop-filter]:bg-card/78 flex items-center px-4 gap-3 shrink-0 shadow-[0_1px_0_oklch(1_0_0/0.42)_inset] dark:shadow-none">
18
17
  <Sheet>
19
18
  <SheetTrigger
20
19
  render={<Button variant="ghost" size="icon" className="lg:hidden" />}
@@ -27,34 +26,47 @@ export function TopBar() {
27
26
  </Sheet>
28
27
 
29
28
  <div className="flex items-center gap-2 flex-1 min-w-0">
30
- <Image
31
- src="/claude-smart-icon.png"
32
- alt="claude-smart"
33
- width={24}
34
- height={24}
35
- className="h-6 w-6 shrink-0"
36
- priority
37
- />
38
- <span className="text-sm font-semibold whitespace-nowrap hidden sm:block">
39
- Claude-Smart
40
- </span>
41
- <div className="mx-2 h-5 w-px bg-border hidden sm:block" />
42
- <label className="text-xs text-muted-foreground whitespace-nowrap hidden sm:block">
29
+ <div className="flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-primary/20 bg-primary/10">
30
+ <Image
31
+ src="/claude-smart-icon.png"
32
+ alt="claude-smart"
33
+ width={24}
34
+ height={24}
35
+ className="h-6 w-6"
36
+ priority
37
+ />
38
+ </div>
39
+ <div className="hidden min-w-0 sm:block">
40
+ <div className="text-sm font-semibold leading-5">Claude-Smart</div>
41
+ </div>
42
+ <div className="mx-2 h-8 w-px bg-border hidden md:block" />
43
+ <div className="hidden items-center gap-1.5 rounded-md border border-border bg-background/70 px-2 py-1 text-xs text-muted-foreground md:flex">
44
+ <span className="h-1.5 w-1.5 rounded-full bg-emerald-500 shadow-[0_0_0_3px_oklch(0.72_0.14_148/0.16)]" />
43
45
  Reflexio
44
- </label>
45
- <Input
46
- value={reflexioUrl}
47
- onChange={(e) => setReflexioUrl(e.target.value)}
48
- placeholder="http://localhost:8071"
49
- className="h-8 text-xs max-w-xs font-mono"
50
- />
46
+ </div>
47
+ <div
48
+ className="relative max-w-md flex-1 sm:flex-none sm:w-[22rem]"
49
+ suppressHydrationWarning
50
+ >
51
+ <Link2 className="pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" />
52
+ <div
53
+ id="reflexio-url"
54
+ className="flex h-9 items-center rounded-md border border-input bg-background/80 pl-8 pr-3 text-xs font-mono text-muted-foreground"
55
+ aria-label="Reflexio endpoint URL"
56
+ title={reflexioUrl}
57
+ >
58
+ <span className="truncate">{reflexioUrl}</span>
59
+ </div>
60
+ </div>
51
61
  </div>
52
62
 
53
63
  <Button
54
64
  variant="ghost"
55
65
  size="icon"
56
- className="h-8 w-8"
66
+ className="h-9 w-9"
57
67
  onClick={() => setTheme(theme === "dark" ? "light" : "dark")}
68
+ title="Toggle theme"
69
+ aria-label="Toggle theme"
58
70
  >
59
71
  <Sun className="h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" />
60
72
  <Moon className="absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" />
@@ -8,6 +8,7 @@ function Input({ className, type, ...props }: React.ComponentProps<"input">) {
8
8
  <InputPrimitive
9
9
  type={type}
10
10
  data-slot="input"
11
+ suppressHydrationWarning
11
12
  className={cn(
12
13
  "h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
13
14
  className
@@ -2,10 +2,9 @@
2
2
 
3
3
  import {
4
4
  createContext,
5
- useCallback,
6
5
  useContext,
7
- useMemo,
8
- useSyncExternalStore,
6
+ useEffect,
7
+ useState,
9
8
  ReactNode,
10
9
  } from "react";
11
10
 
@@ -13,72 +12,42 @@ interface Settings {
13
12
  reflexioUrl: string;
14
13
  }
15
14
 
16
- interface SettingsContextValue extends Settings {
17
- setReflexioUrl: (url: string) => void;
18
- }
15
+ type SettingsContextValue = Settings;
19
16
 
20
17
  const SettingsContext = createContext<SettingsContextValue | null>(null);
21
18
 
22
- const STORAGE_KEY = "claude-smart-dashboard-settings";
23
19
  const DEFAULT_URL = "http://localhost:8071";
24
- const DEFAULTS: Settings = { reflexioUrl: DEFAULT_URL };
25
- const DEFAULT_JSON = JSON.stringify(DEFAULTS);
26
-
27
- type Listener = () => void;
28
- const listeners = new Set<Listener>();
29
-
30
- function readStorage(): string {
31
- if (typeof window === "undefined") return DEFAULT_JSON;
32
- try {
33
- return localStorage.getItem(STORAGE_KEY) ?? DEFAULT_JSON;
34
- } catch {
35
- return DEFAULT_JSON;
36
- }
37
- }
38
-
39
- function subscribe(listener: Listener): () => void {
40
- listeners.add(listener);
41
- const onStorage = (ev: StorageEvent) => {
42
- if (ev.key === STORAGE_KEY) listener();
43
- };
44
- window.addEventListener("storage", onStorage);
45
- return () => {
46
- listeners.delete(listener);
47
- window.removeEventListener("storage", onStorage);
48
- };
49
- }
50
-
51
- function writeStorage(settings: Settings): void {
52
- try {
53
- localStorage.setItem(STORAGE_KEY, JSON.stringify(settings));
54
- } catch {
55
- // ignore
56
- }
57
- for (const l of listeners) l();
58
- }
59
-
60
- function parse(json: string): Settings {
61
- try {
62
- const parsed = JSON.parse(json);
63
- return { ...DEFAULTS, ...parsed };
64
- } catch {
65
- return DEFAULTS;
66
- }
67
- }
20
+ export const SETTINGS_CHANGED_EVENT = "claude-smart-settings-changed";
68
21
 
69
22
  export function SettingsProvider({ children }: { children: ReactNode }) {
70
- const raw = useSyncExternalStore(subscribe, readStorage, () => DEFAULT_JSON);
71
- const settings = useMemo(() => parse(raw), [raw]);
72
-
73
- const setReflexioUrl = useCallback((url: string) => {
74
- writeStorage({ reflexioUrl: url });
23
+ const [settings, setSettings] = useState<Settings>({ reflexioUrl: DEFAULT_URL });
24
+
25
+ useEffect(() => {
26
+ let cancelled = false;
27
+ async function loadSettings() {
28
+ try {
29
+ const res = await fetch("/api/config", { cache: "no-store" });
30
+ if (!res.ok) return;
31
+ const config = (await res.json()) as { REFLEXIO_URL?: string };
32
+ if (!cancelled) {
33
+ setSettings({ reflexioUrl: config.REFLEXIO_URL || DEFAULT_URL });
34
+ }
35
+ } catch {
36
+ // Keep the dashboard on its local default when config cannot be read.
37
+ }
38
+ }
39
+ void loadSettings();
40
+ const onSettingsChanged = () => {
41
+ void loadSettings();
42
+ };
43
+ window.addEventListener(SETTINGS_CHANGED_EVENT, onSettingsChanged);
44
+ return () => {
45
+ cancelled = true;
46
+ window.removeEventListener(SETTINGS_CHANGED_EVENT, onSettingsChanged);
47
+ };
75
48
  }, []);
76
49
 
77
- return (
78
- <SettingsContext.Provider value={{ ...settings, setReflexioUrl }}>
79
- {children}
80
- </SettingsContext.Provider>
81
- );
50
+ return <SettingsContext.Provider value={settings}>{children}</SettingsContext.Provider>;
82
51
  }
83
52
 
84
53
  export function useSettings(): SettingsContextValue {
@@ -1,7 +1,6 @@
1
1
  "use client";
2
2
 
3
3
  import { useEffect, useState } from "react";
4
- import { useSettings } from "@/hooks/use-settings";
5
4
 
6
5
  const POLL_INTERVAL_MS = 60_000;
7
6
 
@@ -19,24 +18,21 @@ export interface StallState {
19
18
  /**
20
19
  * Polls reflexio's GET /stall_state every minute. Returns the latest
21
20
  * snapshot or `null` while still loading / when the server is unreachable.
22
- *
23
- * Reads the reflexio URL from the dashboard's settings context (the same
24
- * URL the user can override in the top bar) so the banner follows whatever
25
- * reflexio backend the rest of the dashboard is pointed at.
26
21
  */
27
22
  export function useStallState(): StallState | null {
28
- const { reflexioUrl } = useSettings();
29
23
  const [state, setState] = useState<StallState | null>(null);
30
24
 
31
25
  useEffect(() => {
32
26
  let cancelled = false;
33
- const base = reflexioUrl.replace(/\/$/, "");
34
27
 
35
28
  const tick = async () => {
36
29
  const controller = new AbortController();
37
30
  const timer = setTimeout(() => controller.abort(), 10_000);
38
31
  try {
39
- const resp = await fetch(`${base}/stall_state`, { signal: controller.signal });
32
+ const resp = await fetch("/api/reflexio/stall_state", {
33
+ cache: "no-store",
34
+ signal: controller.signal,
35
+ });
40
36
  if (!resp.ok) return;
41
37
  const body: StallState = await resp.json();
42
38
  if (!cancelled) setState(body);
@@ -53,7 +49,7 @@ export function useStallState(): StallState | null {
53
49
  cancelled = true;
54
50
  clearInterval(id);
55
51
  };
56
- }, [reflexioUrl]);
52
+ }, []);
57
53
 
58
54
  return state;
59
55
  }
@@ -10,6 +10,7 @@ import type { ClaudeSmartConfig } from "./types";
10
10
 
11
11
  const KNOWN_KEYS = [
12
12
  "REFLEXIO_URL",
13
+ "REFLEXIO_API_KEY",
13
14
  "CLAUDE_SMART_USE_LOCAL_CLI",
14
15
  "CLAUDE_SMART_USE_LOCAL_EMBEDDING",
15
16
  "CLAUDE_SMART_CLI_PATH",
@@ -47,6 +48,7 @@ function parseLine(line: string): { key: string; value: string } | null {
47
48
  export async function readConfig(): Promise<ClaudeSmartConfig> {
48
49
  const defaults: ClaudeSmartConfig = {
49
50
  REFLEXIO_URL: "http://localhost:8071/",
51
+ REFLEXIO_API_KEY: "",
50
52
  CLAUDE_SMART_USE_LOCAL_CLI: false,
51
53
  CLAUDE_SMART_USE_LOCAL_EMBEDDING: false,
52
54
  CLAUDE_SMART_CLI_PATH: "",
@@ -1,9 +1,8 @@
1
1
  /**
2
2
  * Client-side wrapper for talking to reflexio through the Next.js proxy at
3
- * /api/reflexio/*. The proxy forwards to the reflexio URL the user picked in
4
- * Settings (see hooks/use-settings.tsx). Endpoint paths and request bodies
5
- * mirror reflexio/reflexio/server/api.py — every call below corresponds to a
6
- * FastAPI route mounted under the /api prefix.
3
+ * /api/reflexio/*. The proxy forwards to the configured reflexio backend URL.
4
+ * Endpoint paths and request bodies mirror reflexio/reflexio/server/api.py —
5
+ * every call below corresponds to a FastAPI route mounted under the /api prefix.
7
6
  */
8
7
 
9
8
  import type {
@@ -16,18 +15,12 @@ import type {
16
15
 
17
16
  type Json = Record<string, unknown>;
18
17
 
19
- interface Opts {
20
- reflexioUrl?: string;
21
- }
22
-
23
18
  async function request<T>(
24
19
  path: string,
25
20
  init: RequestInit,
26
- reflexioUrl: string | undefined,
27
21
  ): Promise<T> {
28
22
  const headers = new Headers(init.headers);
29
23
  headers.set("content-type", "application/json");
30
- if (reflexioUrl) headers.set("x-reflexio-url", reflexioUrl);
31
24
 
32
25
  const res = await fetch(`/api/reflexio/api/${path.replace(/^\/+/, "")}`, {
33
26
  ...init,
@@ -41,18 +34,18 @@ async function request<T>(
41
34
  return res.json() as Promise<T>;
42
35
  }
43
36
 
44
- function post<T>(path: string, body: Json, reflexioUrl?: string): Promise<T> {
45
- return request<T>(path, { method: "POST", body: JSON.stringify(body) }, reflexioUrl);
37
+ function post<T>(path: string, body: Json): Promise<T> {
38
+ return request<T>(path, { method: "POST", body: JSON.stringify(body) });
46
39
  }
47
40
 
48
- function get<T>(path: string, reflexioUrl?: string): Promise<T> {
49
- return request<T>(path, { method: "GET" }, reflexioUrl);
41
+ function get<T>(path: string): Promise<T> {
42
+ return request<T>(path, { method: "GET" });
50
43
  }
51
44
 
52
45
  export const reflexio = {
53
46
  /** POST /api/get_user_playbooks — all filters are optional. */
54
47
  async getUserPlaybooks(
55
- opts: Opts & {
48
+ opts: {
56
49
  userId?: string;
57
50
  agentVersion?: string;
58
51
  playbookName?: string;
@@ -65,12 +58,12 @@ export const reflexio = {
65
58
  if (opts.agentVersion) body.agent_version = opts.agentVersion;
66
59
  if (opts.playbookName) body.playbook_name = opts.playbookName;
67
60
  if (opts.statusFilter) body.status_filter = opts.statusFilter;
68
- return post("get_user_playbooks", body, opts.reflexioUrl);
61
+ return post("get_user_playbooks", body);
69
62
  },
70
63
 
71
64
  /** POST /api/get_agent_playbooks — all filters are optional. */
72
65
  async getAgentPlaybooks(
73
- opts: Opts & {
66
+ opts: {
74
67
  agentVersion?: string;
75
68
  playbookName?: string;
76
69
  statusFilter?: (string | null)[];
@@ -84,7 +77,7 @@ export const reflexio = {
84
77
  if (opts.statusFilter) body.status_filter = opts.statusFilter;
85
78
  if (opts.playbookStatusFilter)
86
79
  body.playbook_status_filter = opts.playbookStatusFilter;
87
- return post("get_agent_playbooks", body, opts.reflexioUrl);
80
+ return post("get_agent_playbooks", body);
88
81
  },
89
82
 
90
83
  /**
@@ -92,21 +85,21 @@ export const reflexio = {
92
85
  * preferences across sessions, which is what the dashboard wants.
93
86
  */
94
87
  async getAllProfiles(
95
- opts: Opts & { limit?: number; statusFilter?: string } = {},
88
+ opts: { limit?: number; statusFilter?: string } = {},
96
89
  ): Promise<{ user_profiles: UserProfile[] }> {
97
90
  const qs = new URLSearchParams();
98
91
  qs.set("limit", String(opts.limit ?? 200));
99
92
  if (opts.statusFilter) qs.set("status_filter", opts.statusFilter);
100
- return get(`get_all_profiles?${qs.toString()}`, opts.reflexioUrl);
93
+ return get(`get_all_profiles?${qs.toString()}`);
101
94
  },
102
95
 
103
96
  /** GET /api/get_all_interactions — global, unfiltered. */
104
97
  async getAllInteractions(
105
- opts: Opts & { limit?: number } = {},
98
+ opts: { limit?: number } = {},
106
99
  ): Promise<{ interactions: Interaction[] }> {
107
100
  const qs = new URLSearchParams();
108
101
  qs.set("limit", String(opts.limit ?? 100));
109
- return get(`get_all_interactions?${qs.toString()}`, opts.reflexioUrl);
102
+ return get(`get_all_interactions?${qs.toString()}`);
110
103
  },
111
104
 
112
105
  /** PUT /api/update_user_playbook — partial update of one project-specific skill. */
@@ -118,12 +111,10 @@ export const reflexio = {
118
111
  trigger?: string | null;
119
112
  rationale?: string | null;
120
113
  },
121
- reflexioUrl?: string,
122
114
  ): Promise<Json> {
123
115
  return request(
124
116
  "update_user_playbook",
125
117
  { method: "PUT", body: JSON.stringify(update) },
126
- reflexioUrl,
127
118
  );
128
119
  },
129
120
 
@@ -137,42 +128,32 @@ export const reflexio = {
137
128
  rationale?: string | null;
138
129
  playbook_status?: AgentPlaybookStatus | null;
139
130
  },
140
- reflexioUrl?: string,
141
131
  ): Promise<Json> {
142
132
  return request(
143
133
  "update_agent_playbook",
144
134
  { method: "PUT", body: JSON.stringify(update) },
145
- reflexioUrl,
146
135
  );
147
136
  },
148
137
 
149
138
  /** DELETE /api/delete_user_playbook — body carries the id. */
150
- async deleteUserPlaybook(
151
- userPlaybookId: number,
152
- reflexioUrl?: string,
153
- ): Promise<Json> {
139
+ async deleteUserPlaybook(userPlaybookId: number): Promise<Json> {
154
140
  return request(
155
141
  "delete_user_playbook",
156
142
  {
157
143
  method: "DELETE",
158
144
  body: JSON.stringify({ user_playbook_id: userPlaybookId }),
159
145
  },
160
- reflexioUrl,
161
146
  );
162
147
  },
163
148
 
164
149
  /** DELETE /api/delete_agent_playbook — body carries the id. */
165
- async deleteAgentPlaybook(
166
- agentPlaybookId: number,
167
- reflexioUrl?: string,
168
- ): Promise<Json> {
150
+ async deleteAgentPlaybook(agentPlaybookId: number): Promise<Json> {
169
151
  return request(
170
152
  "delete_agent_playbook",
171
153
  {
172
154
  method: "DELETE",
173
155
  body: JSON.stringify({ agent_playbook_id: agentPlaybookId }),
174
156
  },
175
- reflexioUrl,
176
157
  );
177
158
  },
178
159
 
@@ -183,56 +164,50 @@ export const reflexio = {
183
164
  profile_id: string;
184
165
  content?: string | null;
185
166
  },
186
- reflexioUrl?: string,
187
167
  ): Promise<Json> {
188
168
  return request(
189
169
  "update_user_profile",
190
170
  { method: "PUT", body: JSON.stringify(update) },
191
- reflexioUrl,
192
171
  );
193
172
  },
194
173
 
195
174
  /** DELETE /api/delete_profile — needs both user_id and profile_id. */
196
175
  async deleteUserProfile(
197
176
  params: { user_id: string; profile_id: string },
198
- reflexioUrl?: string,
199
177
  ): Promise<Json> {
200
178
  return request(
201
179
  "delete_profile",
202
180
  { method: "DELETE", body: JSON.stringify(params) },
203
- reflexioUrl,
204
181
  );
205
182
  },
206
183
 
207
184
  /** DELETE /api/delete_all_interactions — org-wide purge. */
208
- async deleteAllInteractions(reflexioUrl?: string): Promise<Json> {
185
+ async deleteAllInteractions(): Promise<Json> {
209
186
  return request(
210
187
  "delete_all_interactions",
211
188
  { method: "DELETE" },
212
- reflexioUrl,
213
189
  );
214
190
  },
215
191
 
216
192
  /** DELETE /api/delete_all_profiles — org-wide purge. */
217
- async deleteAllProfiles(reflexioUrl?: string): Promise<Json> {
218
- return request("delete_all_profiles", { method: "DELETE" }, reflexioUrl);
193
+ async deleteAllProfiles(): Promise<Json> {
194
+ return request("delete_all_profiles", { method: "DELETE" });
219
195
  },
220
196
 
221
197
  /** DELETE /api/delete_all_user_playbooks — org-wide purge. */
222
- async deleteAllUserPlaybooks(reflexioUrl?: string): Promise<Json> {
198
+ async deleteAllUserPlaybooks(): Promise<Json> {
223
199
  return request(
224
200
  "delete_all_user_playbooks",
225
201
  { method: "DELETE" },
226
- reflexioUrl,
227
202
  );
228
203
  },
229
204
 
230
205
  /** DELETE /api/delete_all_agent_playbooks — org-wide shared skill purge. */
231
- async deleteAllAgentPlaybooks(reflexioUrl?: string): Promise<Json> {
206
+ async deleteAllAgentPlaybooks(): Promise<Json> {
232
207
  return request(
233
208
  "delete_all_agent_playbooks",
234
209
  { method: "DELETE" },
235
- reflexioUrl,
236
210
  );
237
211
  },
212
+
238
213
  };