@ai-matrx/chat 0.5.18 → 0.6.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.
Files changed (89) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/agents/components/identity-refs/AiIdentityRef.d.ts +33 -0
  3. package/dist/agents/components/identity-refs/AiIdentityRef.js +138 -0
  4. package/dist/agents/components/inputs/smart-input/QuicksetPanel.js +5 -9
  5. package/dist/agents/components/inputs/smart-input/RunSkillPicker.js +1 -1
  6. package/dist/agents/components/inputs/smart-input/RunToolPicker.js +6 -11
  7. package/dist/agents/components/inputs/smart-input/ShapeChipsRow.js +1 -1
  8. package/dist/agents/components/inputs/smart-input/composer/ComposerEffortPill.js +1 -1
  9. package/dist/agents/components/inputs/smart-input/composer/ComposerOutput.js +1 -1
  10. package/dist/agents/components/inputs/smart-input/composer/ComposerPlusMenu.js +1 -1
  11. package/dist/agents/components/inputs/smart-input/composer/useComposerAgent.js +1 -1
  12. package/dist/agents/components/inputs/smart-input/composer/useRunControlCounts.d.ts +3 -0
  13. package/dist/agents/components/inputs/smart-input/composer/useRunControlCounts.js +54 -0
  14. package/dist/agents/components/model-tiers/ModelTierIdentityList.js +1 -1
  15. package/dist/agents/components/run-controls/RunConfigOverrides.js +1 -1
  16. package/dist/agents/components/run-controls/RunInputCapabilities.js +1 -1
  17. package/dist/agents/components/run-controls/panels/shared.d.ts +0 -2
  18. package/dist/agents/hooks/useDiffEnrichment.js +3 -6
  19. package/dist/agents/identity/agent-catalog-lists.js +2 -1
  20. package/dist/agents/identity/agent-identity.js +2 -1
  21. package/dist/agents/identity/model-catalog.d.ts +9 -0
  22. package/dist/agents/identity/model-catalog.js +25 -0
  23. package/dist/agents/identity/preferred-chat-model.d.ts +9 -0
  24. package/dist/agents/identity/preferred-chat-model.js +33 -0
  25. package/dist/agents/identity/settings-store.d.ts +10 -0
  26. package/dist/agents/identity/settings-store.js +49 -0
  27. package/dist/agents/identity/skill-catalog.d.ts +27 -0
  28. package/dist/agents/identity/skill-catalog.js +100 -0
  29. package/dist/agents/identity/tool-catalog.d.ts +15 -0
  30. package/dist/agents/identity/tool-catalog.js +67 -0
  31. package/dist/agents/redux/agent-definition/cache-bust-middleware.d.ts +0 -1
  32. package/dist/agents/redux/agent-definition/cache-bust-middleware.js +1 -13
  33. package/dist/agents/redux/agent-definition/selectors.d.ts +12 -546
  34. package/dist/agents/redux/agent-settings/internal-utils.d.ts +2 -123
  35. package/dist/agents/redux/agent-settings/internal-utils.js +1 -315
  36. package/dist/agents/redux/agent-settings/settings-catalogue.d.ts +2 -78
  37. package/dist/agents/redux/agent-settings/settings-catalogue.js +1 -176
  38. package/dist/agents/redux/agent-settings/types.d.ts +2 -148
  39. package/dist/agents/redux/agent-settings/types.js +1 -0
  40. package/dist/agents/redux/agent-settings/ui-gates.d.ts +2 -54
  41. package/dist/agents/redux/agent-settings/ui-gates.js +1 -38
  42. package/dist/agents/redux/agent-shortcut-categories/selectors.d.ts +0 -100
  43. package/dist/agents/redux/agent-shortcuts/selectors.d.ts +0 -294
  44. package/dist/agents/redux/conversation-history/selectors.d.ts +0 -32
  45. package/dist/agents/redux/conversation-list/conversation-list.selectors.d.ts +0 -4
  46. package/dist/agents/redux/execution-system/active-requests/active-requests.selectors.d.ts +0 -108
  47. package/dist/agents/redux/execution-system/context-state/context-state.selectors.d.ts +0 -28
  48. package/dist/agents/redux/execution-system/conversations/conversations.selectors.d.ts +0 -10
  49. package/dist/agents/redux/execution-system/instance-context/instance-context.selectors.d.ts +0 -6
  50. package/dist/agents/redux/execution-system/instance-model-overrides/launch-model-overrides.js +1 -1
  51. package/dist/agents/redux/execution-system/instance-resources/instance-resources.selectors.d.ts +0 -16
  52. package/dist/agents/redux/execution-system/instance-ui-state/instance-ui-state.selectors.d.ts +0 -10
  53. package/dist/agents/redux/execution-system/instance-variable-values/instance-variable-values.selectors.d.ts +0 -14
  54. package/dist/agents/redux/execution-system/messages/messages.selectors.d.ts +0 -2
  55. package/dist/agents/redux/execution-system/observability/observability.selectors.d.ts +0 -14
  56. package/dist/agents/redux/execution-system/observational-memory/observational-memory.selectors.d.ts +0 -2
  57. package/dist/agents/redux/execution-system/selectors/aggregate.selectors.d.ts +0 -28
  58. package/dist/agents/redux/execution-system/thunks/process-stream.js +2 -5
  59. package/dist/agents/redux/execution-system/utils/loaded-skill-sources.d.ts +1 -1
  60. package/dist/agents/redux/execution-system/utils/loaded-skill-sources.js +3 -3
  61. package/dist/agents/redux/proposed-directives/proposedDirectivesSlice.d.ts +0 -2
  62. package/dist/agents/ui-first-tools/redux/agent-lists.selectors.d.ts +0 -4
  63. package/dist/host/ui-slots.d.ts +0 -46
  64. package/dist/host/ui-slots.js +0 -33
  65. package/dist/store/create-chat-store.d.ts +0 -4
  66. package/dist/store/middlewares.d.ts +0 -10
  67. package/dist/store/slices.d.ts +0 -2
  68. package/dist/store/slices.js +0 -4
  69. package/dist/surfaces/redux/selectors.d.ts +0 -4
  70. package/dist/tool-call-visualization/redux/selectors.d.ts +0 -2
  71. package/dist/ui/chat-default-model-knob.d.ts +1 -1
  72. package/dist/ui/chat-default-model-knob.js +1 -1
  73. package/package.json +4 -4
  74. package/dist/agents/components/model/AgentModelPanel.d.ts +0 -4
  75. package/dist/agents/components/model/AgentModelPanel.js +0 -9
  76. package/dist/agents/redux/agent-settings/agentSettingsSlice.d.ts +0 -1015
  77. package/dist/agents/redux/agent-settings/agentSettingsSlice.js +0 -659
  78. package/dist/agents/redux/agent-settings/selectors.d.ts +0 -10057
  79. package/dist/agents/redux/agent-settings/selectors.js +0 -234
  80. package/dist/agents/redux/agent-settings/useNormalizedControls.d.ts +0 -8
  81. package/dist/agents/redux/agent-settings/useNormalizedControls.js +0 -24
  82. package/dist/agents/redux/tools/tools.selectors.d.ts +0 -529
  83. package/dist/agents/redux/tools/tools.selectors.js +0 -24
  84. package/dist/agents/redux/tools/tools.slice.d.ts +0 -12
  85. package/dist/agents/redux/tools/tools.slice.js +0 -37
  86. package/dist/agents/redux/tools/tools.thunks.d.ts +0 -125
  87. package/dist/agents/redux/tools/tools.thunks.js +0 -45
  88. package/dist/host/defaults/setting-control-input.d.ts +0 -11
  89. package/dist/host/defaults/setting-control-input.js +0 -91
@@ -1,125 +0,0 @@
1
- import type { DatabaseTool } from "../../../ui/database-tool.js";
2
- type WithTools = {
3
- tools: {
4
- tools: DatabaseTool[];
5
- status: string;
6
- };
7
- appContext?: {
8
- organization_id?: string | null;
9
- } | null;
10
- userAuth?: {
11
- id?: string | null;
12
- } | null;
13
- };
14
- type ToolLookupStatus = "idle" | "loading" | "succeeded" | "failed";
15
- type WithToolLookups = WithTools & {
16
- tools: WithTools["tools"] & {
17
- identityById: Record<string, DatabaseTool>;
18
- lookupStatusById: Record<string, ToolLookupStatus>;
19
- };
20
- };
21
- export declare const fetchAvailableTools: import("@reduxjs/toolkit").AsyncThunk<{
22
- admin_only: boolean;
23
- annotations: import("@ai-matrx/data/types").Json | null;
24
- category: string | null;
25
- created_at: string;
26
- created_by: string | null;
27
- deactivated_at: string | null;
28
- dedupe_exempt: boolean;
29
- deleted_at: string | null;
30
- description: string;
31
- gating: import("@ai-matrx/data/types").Json;
32
- icon: string | null;
33
- id: string;
34
- is_active: boolean;
35
- managed_by_server_id: string | null;
36
- max_client_wait_seconds: number | null;
37
- metadata: import("@ai-matrx/data/types").Json;
38
- name: string;
39
- organization_id: string;
40
- output_schema: import("@ai-matrx/data/types").Json | null;
41
- parameters: import("@ai-matrx/data/types").Json;
42
- published_to_web: boolean;
43
- published_to_web_at: string | null;
44
- published_to_web_by: string | null;
45
- semver: string | null;
46
- shown_to: import("@ai-matrx/data/types").Database["platform"]["Enums"]["shown_to"] | null;
47
- side_effect_class: string | null;
48
- source_kind: string;
49
- tags: string[] | null;
50
- tier: string | null;
51
- tool_group: string;
52
- updated_at: string;
53
- updated_by: string | null;
54
- updated_by_system: string | null;
55
- updated_by_tier: string | null;
56
- validation_exempt: boolean;
57
- version: number;
58
- visibility: import("@ai-matrx/data/types").Database["platform"]["Enums"]["visibility"];
59
- }[], void, {
60
- dispatch?: import("redux-thunk").ThunkDispatch<unknown, unknown, import("redux").UnknownAction>;
61
- extra?: unknown;
62
- rejectValue?: unknown;
63
- serializedErrorType?: unknown;
64
- pendingMeta?: unknown;
65
- fulfilledMeta?: unknown;
66
- rejectedMeta?: unknown;
67
- state: WithTools;
68
- }>;
69
- /**
70
- * Resolve one historical tool reference, including inactive tools.
71
- *
72
- * The active catalogue intentionally excludes deactivated tools because it
73
- * feeds pickers. Audit/version surfaces have the opposite requirement: an old
74
- * FK must remain understandable after the tool is retired. Keep that lookup in
75
- * the existing tools slice so every reference shares one cache and one DB path.
76
- */
77
- export declare const fetchToolById: import("@reduxjs/toolkit").AsyncThunk<{
78
- admin_only: boolean;
79
- annotations: import("@ai-matrx/data/types").Json | null;
80
- category: string | null;
81
- created_at: string;
82
- created_by: string | null;
83
- deactivated_at: string | null;
84
- dedupe_exempt: boolean;
85
- deleted_at: string | null;
86
- description: string;
87
- gating: import("@ai-matrx/data/types").Json;
88
- icon: string | null;
89
- id: string;
90
- is_active: boolean;
91
- managed_by_server_id: string | null;
92
- max_client_wait_seconds: number | null;
93
- metadata: import("@ai-matrx/data/types").Json;
94
- name: string;
95
- organization_id: string;
96
- output_schema: import("@ai-matrx/data/types").Json | null;
97
- parameters: import("@ai-matrx/data/types").Json;
98
- published_to_web: boolean;
99
- published_to_web_at: string | null;
100
- published_to_web_by: string | null;
101
- semver: string | null;
102
- shown_to: import("@ai-matrx/data/types").Database["platform"]["Enums"]["shown_to"] | null;
103
- side_effect_class: string | null;
104
- source_kind: string;
105
- tags: string[] | null;
106
- tier: string | null;
107
- tool_group: string;
108
- updated_at: string;
109
- updated_by: string | null;
110
- updated_by_system: string | null;
111
- updated_by_tier: string | null;
112
- validation_exempt: boolean;
113
- version: number;
114
- visibility: import("@ai-matrx/data/types").Database["platform"]["Enums"]["visibility"];
115
- }, string, {
116
- dispatch?: import("redux-thunk").ThunkDispatch<unknown, unknown, import("redux").UnknownAction>;
117
- extra?: unknown;
118
- rejectValue?: unknown;
119
- serializedErrorType?: unknown;
120
- pendingMeta?: unknown;
121
- fulfilledMeta?: unknown;
122
- rejectedMeta?: unknown;
123
- state: WithToolLookups;
124
- }>;
125
- export {};
@@ -1,45 +0,0 @@
1
- import { createAsyncThunk } from "@reduxjs/toolkit";
2
- import { supabase } from "../../../host/db.js";
3
- import { pgErrorToError } from "@ai-matrx/data";
4
- import { recordUnavailable } from "../../../host/diagnostics.js";
5
- import { chatHostHasDatabase } from "../../../host/configure.js";
6
- const fetchAvailableTools = createAsyncThunk("tools/fetchAvailable", async (_, { getState }) => {
7
- if (!chatHostHasDatabase()) return [];
8
- if (getState().tools.status === "succeeded") {
9
- return getState().tools.tools;
10
- }
11
- const { data, error } = await supabase.schema("tool").from("definition").select("*").is("deleted_at", null).eq("is_active", true).order("category", { ascending: true }).order("name", { ascending: true });
12
- if (error) throw pgErrorToError(error);
13
- return data ?? [];
14
- });
15
- const fetchToolById = createAsyncThunk(
16
- "tools/fetchById",
17
- async (toolId) => {
18
- const { data, error } = await supabase.schema("tool").from("definition").select("*").eq("id", toolId).maybeSingle();
19
- if (error) throw pgErrorToError(error);
20
- if (!data) {
21
- throw recordUnavailable({
22
- entity: "tool",
23
- reason: "unknown",
24
- recordId: toolId,
25
- token: "tool",
26
- relation: "tool.definition"
27
- });
28
- }
29
- return data;
30
- },
31
- {
32
- condition: (toolId, { getState }) => {
33
- if (!chatHostHasDatabase()) return false;
34
- const state = getState().tools;
35
- if (state.tools.some((tool) => tool.id === toolId)) return false;
36
- if (state.identityById[toolId]) return false;
37
- const status = state.lookupStatusById[toolId];
38
- return status !== "loading" && status !== "succeeded" && status !== "failed";
39
- }
40
- }
41
- );
42
- export {
43
- fetchAvailableTools,
44
- fetchToolById
45
- };
@@ -1,11 +0,0 @@
1
- import type { ControlDefinition } from "../../agents/redux/agent-settings/types.js";
2
- export interface DefaultSettingControlInputProps {
3
- settingKey: string;
4
- control: ControlDefinition;
5
- value: unknown;
6
- onChange: (value: unknown) => void;
7
- disabled?: boolean;
8
- id?: string;
9
- [extra: string]: unknown;
10
- }
11
- export declare function DefaultSettingControlInput({ settingKey, control, value, onChange, disabled, id }: DefaultSettingControlInputProps): import("react").JSX.Element;
@@ -1,91 +0,0 @@
1
- "use client";
2
- import { jsx, jsxs } from "react/jsx-runtime";
3
- import { useEffect, useState } from "react";
4
- import { Input, Switch, Textarea } from "@ai-matrx/design-system";
5
- const FIELD = "h-8 w-full text-sm";
6
- function JsonField({ id, value, disabled, onChange }) {
7
- const text = value === void 0 || value === null ? "" : JSON.stringify(value, null, 2);
8
- const [draft, setDraft] = useState(text);
9
- const [invalid, setInvalid] = useState(false);
10
- useEffect(() => setDraft(text), [text]);
11
- return /* @__PURE__ */ jsx(
12
- Textarea,
13
- {
14
- id,
15
- value: draft,
16
- disabled,
17
- rows: 3,
18
- "aria-invalid": invalid || void 0,
19
- className: "w-full font-mono text-xs",
20
- onChange: (event) => setDraft(event.target.value),
21
- onBlur: () => {
22
- if (draft.trim() === "") return onChange(void 0);
23
- try {
24
- onChange(JSON.parse(draft));
25
- setInvalid(false);
26
- } catch {
27
- setInvalid(true);
28
- }
29
- }
30
- }
31
- );
32
- }
33
- function DefaultSettingControlInput({ settingKey, control, value, onChange, disabled, id }) {
34
- const fieldId = id ?? `setting-${settingKey}`;
35
- switch (control.type) {
36
- case "boolean":
37
- return /* @__PURE__ */ jsx(Switch, { id: fieldId, checked: value === true, disabled, onCheckedChange: (checked) => onChange(checked) });
38
- case "enum":
39
- return /* @__PURE__ */ jsxs(
40
- "select",
41
- {
42
- id: fieldId,
43
- className: `${FIELD} rounded-md border border-input bg-background px-2`,
44
- value: typeof value === "string" ? value : "",
45
- disabled,
46
- onChange: (event) => onChange(event.target.value === "" ? void 0 : event.target.value),
47
- children: [
48
- /* @__PURE__ */ jsx("option", { value: "", children: "Default" }),
49
- (control.enum ?? []).map((option) => /* @__PURE__ */ jsx("option", { value: option, children: option }, option))
50
- ]
51
- }
52
- );
53
- case "number":
54
- case "integer":
55
- return /* @__PURE__ */ jsx(
56
- Input,
57
- {
58
- id: fieldId,
59
- type: "number",
60
- className: FIELD,
61
- value: typeof value === "number" ? String(value) : "",
62
- min: control.min,
63
- max: control.max,
64
- step: control.type === "integer" ? 1 : "any",
65
- disabled,
66
- onChange: (event) => {
67
- const raw = event.target.value;
68
- if (raw === "") return onChange(void 0);
69
- const parsed = control.type === "integer" ? Number.parseInt(raw, 10) : Number(raw);
70
- if (Number.isFinite(parsed)) onChange(parsed);
71
- }
72
- }
73
- );
74
- case "string":
75
- return /* @__PURE__ */ jsx(
76
- Input,
77
- {
78
- id: fieldId,
79
- className: FIELD,
80
- value: typeof value === "string" ? value : value === void 0 || value === null ? "" : String(value),
81
- disabled,
82
- onChange: (event) => onChange(event.target.value === "" ? void 0 : event.target.value)
83
- }
84
- );
85
- default:
86
- return /* @__PURE__ */ jsx(JsonField, { id: fieldId, value, disabled, onChange });
87
- }
88
- }
89
- export {
90
- DefaultSettingControlInput
91
- };