@elevasis/core 0.47.0 → 0.48.1
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/dist/auth/index.d.ts +80 -150
- package/dist/knowledge/index.d.ts +2 -1
- package/dist/knowledge/index.js +17 -1
- package/dist/test-utils/index.d.ts +80 -150
- package/package.json +1 -1
- package/src/execution/engine/agent/actions/__tests__/processor.test.ts +709 -531
- package/src/execution/engine/agent/actions/processor.ts +165 -116
- package/src/execution/engine/agent/reasoning/__tests__/request-builder.test.ts +91 -8
- package/src/execution/engine/agent/reasoning/prompt-sections/base-actions.ts +16 -13
- package/src/execution/engine/agent/reasoning/prompt-sections/tools.ts +7 -6
- package/src/execution/engine/tools/messages.ts +6 -5
- package/src/knowledge/__tests__/queries.test.ts +8 -0
- package/src/knowledge/published.ts +1 -1
- package/src/operations/sessions/server/session.ts +112 -43
- package/src/operations/sessions/types.ts +9 -7
- package/src/platform/constants/versions.ts +1 -1
- package/src/supabase/database.types.ts +125 -157
package/dist/auth/index.d.ts
CHANGED
|
@@ -771,9 +771,6 @@ type Json = string | number | boolean | null | {
|
|
|
771
771
|
[key: string]: Json | undefined;
|
|
772
772
|
} | Json[];
|
|
773
773
|
type Database = {
|
|
774
|
-
__InternalSupabase: {
|
|
775
|
-
PostgrestVersion: "12.2.3 (519615d)";
|
|
776
|
-
};
|
|
777
774
|
public: {
|
|
778
775
|
Tables: {
|
|
779
776
|
acq_artifacts: {
|
|
@@ -1973,6 +1970,74 @@ type Database = {
|
|
|
1973
1970
|
}
|
|
1974
1971
|
];
|
|
1975
1972
|
};
|
|
1973
|
+
agent_access_grants: {
|
|
1974
|
+
Row: {
|
|
1975
|
+
allowed_origins: string[];
|
|
1976
|
+
branding: Json;
|
|
1977
|
+
capture_fields: Json;
|
|
1978
|
+
code_hash: string | null;
|
|
1979
|
+
code_salt: string | null;
|
|
1980
|
+
created_at: string;
|
|
1981
|
+
disabled_at: string | null;
|
|
1982
|
+
expires_at: string | null;
|
|
1983
|
+
id: string;
|
|
1984
|
+
max_sessions_per_visitor: number;
|
|
1985
|
+
max_turns_per_session: number;
|
|
1986
|
+
mode: string;
|
|
1987
|
+
organization_id: string;
|
|
1988
|
+
resource_id: string;
|
|
1989
|
+
slug: string;
|
|
1990
|
+
tool_policy: Json;
|
|
1991
|
+
updated_at: string;
|
|
1992
|
+
};
|
|
1993
|
+
Insert: {
|
|
1994
|
+
allowed_origins?: string[];
|
|
1995
|
+
branding?: Json;
|
|
1996
|
+
capture_fields?: Json;
|
|
1997
|
+
code_hash?: string | null;
|
|
1998
|
+
code_salt?: string | null;
|
|
1999
|
+
created_at?: string;
|
|
2000
|
+
disabled_at?: string | null;
|
|
2001
|
+
expires_at?: string | null;
|
|
2002
|
+
id?: string;
|
|
2003
|
+
max_sessions_per_visitor?: number;
|
|
2004
|
+
max_turns_per_session?: number;
|
|
2005
|
+
mode?: string;
|
|
2006
|
+
organization_id: string;
|
|
2007
|
+
resource_id: string;
|
|
2008
|
+
slug: string;
|
|
2009
|
+
tool_policy?: Json;
|
|
2010
|
+
updated_at?: string;
|
|
2011
|
+
};
|
|
2012
|
+
Update: {
|
|
2013
|
+
allowed_origins?: string[];
|
|
2014
|
+
branding?: Json;
|
|
2015
|
+
capture_fields?: Json;
|
|
2016
|
+
code_hash?: string | null;
|
|
2017
|
+
code_salt?: string | null;
|
|
2018
|
+
created_at?: string;
|
|
2019
|
+
disabled_at?: string | null;
|
|
2020
|
+
expires_at?: string | null;
|
|
2021
|
+
id?: string;
|
|
2022
|
+
max_sessions_per_visitor?: number;
|
|
2023
|
+
max_turns_per_session?: number;
|
|
2024
|
+
mode?: string;
|
|
2025
|
+
organization_id?: string;
|
|
2026
|
+
resource_id?: string;
|
|
2027
|
+
slug?: string;
|
|
2028
|
+
tool_policy?: Json;
|
|
2029
|
+
updated_at?: string;
|
|
2030
|
+
};
|
|
2031
|
+
Relationships: [
|
|
2032
|
+
{
|
|
2033
|
+
foreignKeyName: "agent_access_grants_organization_id_fkey";
|
|
2034
|
+
columns: ["organization_id"];
|
|
2035
|
+
isOneToOne: false;
|
|
2036
|
+
referencedRelation: "organizations";
|
|
2037
|
+
referencedColumns: ["id"];
|
|
2038
|
+
}
|
|
2039
|
+
];
|
|
2040
|
+
};
|
|
1976
2041
|
api_keys: {
|
|
1977
2042
|
Row: {
|
|
1978
2043
|
created_at: string | null;
|
|
@@ -2880,138 +2945,6 @@ type Database = {
|
|
|
2880
2945
|
};
|
|
2881
2946
|
Relationships: [];
|
|
2882
2947
|
};
|
|
2883
|
-
agent_access_grants: {
|
|
2884
|
-
Row: {
|
|
2885
|
-
allowed_origins: string[];
|
|
2886
|
-
branding: Json;
|
|
2887
|
-
capture_fields: Json;
|
|
2888
|
-
code_hash: string | null;
|
|
2889
|
-
code_salt: string | null;
|
|
2890
|
-
created_at: string;
|
|
2891
|
-
disabled_at: string | null;
|
|
2892
|
-
expires_at: string | null;
|
|
2893
|
-
id: string;
|
|
2894
|
-
max_sessions_per_visitor: number;
|
|
2895
|
-
max_turns_per_session: number;
|
|
2896
|
-
mode: string;
|
|
2897
|
-
organization_id: string;
|
|
2898
|
-
resource_id: string;
|
|
2899
|
-
slug: string;
|
|
2900
|
-
tool_policy: Json;
|
|
2901
|
-
updated_at: string;
|
|
2902
|
-
};
|
|
2903
|
-
Insert: {
|
|
2904
|
-
allowed_origins?: string[];
|
|
2905
|
-
branding?: Json;
|
|
2906
|
-
capture_fields?: Json;
|
|
2907
|
-
code_hash?: string | null;
|
|
2908
|
-
code_salt?: string | null;
|
|
2909
|
-
created_at?: string;
|
|
2910
|
-
disabled_at?: string | null;
|
|
2911
|
-
expires_at?: string | null;
|
|
2912
|
-
id?: string;
|
|
2913
|
-
max_sessions_per_visitor?: number;
|
|
2914
|
-
max_turns_per_session?: number;
|
|
2915
|
-
mode?: string;
|
|
2916
|
-
organization_id: string;
|
|
2917
|
-
resource_id: string;
|
|
2918
|
-
slug: string;
|
|
2919
|
-
tool_policy?: Json;
|
|
2920
|
-
updated_at?: string;
|
|
2921
|
-
};
|
|
2922
|
-
Update: {
|
|
2923
|
-
allowed_origins?: string[];
|
|
2924
|
-
branding?: Json;
|
|
2925
|
-
capture_fields?: Json;
|
|
2926
|
-
code_hash?: string | null;
|
|
2927
|
-
code_salt?: string | null;
|
|
2928
|
-
created_at?: string;
|
|
2929
|
-
disabled_at?: string | null;
|
|
2930
|
-
expires_at?: string | null;
|
|
2931
|
-
id?: string;
|
|
2932
|
-
max_sessions_per_visitor?: number;
|
|
2933
|
-
max_turns_per_session?: number;
|
|
2934
|
-
mode?: string;
|
|
2935
|
-
organization_id?: string;
|
|
2936
|
-
resource_id?: string;
|
|
2937
|
-
slug?: string;
|
|
2938
|
-
tool_policy?: Json;
|
|
2939
|
-
updated_at?: string;
|
|
2940
|
-
};
|
|
2941
|
-
Relationships: [
|
|
2942
|
-
{
|
|
2943
|
-
foreignKeyName: "agent_access_grants_organization_id_fkey";
|
|
2944
|
-
columns: ["organization_id"];
|
|
2945
|
-
isOneToOne: false;
|
|
2946
|
-
referencedRelation: "organizations";
|
|
2947
|
-
referencedColumns: ["id"];
|
|
2948
|
-
}
|
|
2949
|
-
];
|
|
2950
|
-
};
|
|
2951
|
-
agent_chat_capabilities: {
|
|
2952
|
-
Row: {
|
|
2953
|
-
created_at: string;
|
|
2954
|
-
expires_at: string;
|
|
2955
|
-
grant_id: string;
|
|
2956
|
-
id: string;
|
|
2957
|
-
organization_id: string;
|
|
2958
|
-
origin: string | null;
|
|
2959
|
-
resource_id: string;
|
|
2960
|
-
revoked_at: string | null;
|
|
2961
|
-
session_id: string | null;
|
|
2962
|
-
token_hash: string;
|
|
2963
|
-
visitor_id: string | null;
|
|
2964
|
-
};
|
|
2965
|
-
Insert: {
|
|
2966
|
-
created_at?: string;
|
|
2967
|
-
expires_at: string;
|
|
2968
|
-
grant_id: string;
|
|
2969
|
-
id?: string;
|
|
2970
|
-
organization_id: string;
|
|
2971
|
-
origin?: string | null;
|
|
2972
|
-
resource_id: string;
|
|
2973
|
-
revoked_at?: string | null;
|
|
2974
|
-
session_id?: string | null;
|
|
2975
|
-
token_hash: string;
|
|
2976
|
-
visitor_id?: string | null;
|
|
2977
|
-
};
|
|
2978
|
-
Update: {
|
|
2979
|
-
created_at?: string;
|
|
2980
|
-
expires_at?: string;
|
|
2981
|
-
grant_id?: string;
|
|
2982
|
-
id?: string;
|
|
2983
|
-
organization_id?: string;
|
|
2984
|
-
origin?: string | null;
|
|
2985
|
-
resource_id?: string;
|
|
2986
|
-
revoked_at?: string | null;
|
|
2987
|
-
session_id?: string | null;
|
|
2988
|
-
token_hash?: string;
|
|
2989
|
-
visitor_id?: string | null;
|
|
2990
|
-
};
|
|
2991
|
-
Relationships: [
|
|
2992
|
-
{
|
|
2993
|
-
foreignKeyName: "agent_chat_capabilities_grant_id_fkey";
|
|
2994
|
-
columns: ["grant_id"];
|
|
2995
|
-
isOneToOne: false;
|
|
2996
|
-
referencedRelation: "agent_access_grants";
|
|
2997
|
-
referencedColumns: ["id"];
|
|
2998
|
-
},
|
|
2999
|
-
{
|
|
3000
|
-
foreignKeyName: "agent_chat_capabilities_organization_id_fkey";
|
|
3001
|
-
columns: ["organization_id"];
|
|
3002
|
-
isOneToOne: false;
|
|
3003
|
-
referencedRelation: "organizations";
|
|
3004
|
-
referencedColumns: ["id"];
|
|
3005
|
-
},
|
|
3006
|
-
{
|
|
3007
|
-
foreignKeyName: "agent_chat_capabilities_session_id_fkey";
|
|
3008
|
-
columns: ["session_id"];
|
|
3009
|
-
isOneToOne: false;
|
|
3010
|
-
referencedRelation: "sessions";
|
|
3011
|
-
referencedColumns: ["session_id"];
|
|
3012
|
-
}
|
|
3013
|
-
];
|
|
3014
|
-
};
|
|
3015
2948
|
organizations: {
|
|
3016
2949
|
Row: {
|
|
3017
2950
|
config: Json;
|
|
@@ -3910,11 +3843,11 @@ type Database = {
|
|
|
3910
3843
|
Returns: undefined;
|
|
3911
3844
|
};
|
|
3912
3845
|
auth_jwt_claims: {
|
|
3913
|
-
Args: never
|
|
3846
|
+
Args: Record<PropertyKey, never>;
|
|
3914
3847
|
Returns: Json;
|
|
3915
3848
|
};
|
|
3916
3849
|
auth_uid_safe: {
|
|
3917
|
-
Args: never
|
|
3850
|
+
Args: Record<PropertyKey, never>;
|
|
3918
3851
|
Returns: string;
|
|
3919
3852
|
};
|
|
3920
3853
|
can_assign_role_in_org: {
|
|
@@ -3925,7 +3858,7 @@ type Database = {
|
|
|
3925
3858
|
Returns: boolean;
|
|
3926
3859
|
};
|
|
3927
3860
|
current_user_is_platform_admin: {
|
|
3928
|
-
Args: never
|
|
3861
|
+
Args: Record<PropertyKey, never>;
|
|
3929
3862
|
Returns: boolean;
|
|
3930
3863
|
};
|
|
3931
3864
|
current_user_shares_org_with: {
|
|
@@ -3935,11 +3868,11 @@ type Database = {
|
|
|
3935
3868
|
Returns: boolean;
|
|
3936
3869
|
};
|
|
3937
3870
|
current_user_supabase_id: {
|
|
3938
|
-
Args: never
|
|
3871
|
+
Args: Record<PropertyKey, never>;
|
|
3939
3872
|
Returns: string;
|
|
3940
3873
|
};
|
|
3941
3874
|
detect_stalled_executions: {
|
|
3942
|
-
Args: never
|
|
3875
|
+
Args: Record<PropertyKey, never>;
|
|
3943
3876
|
Returns: undefined;
|
|
3944
3877
|
};
|
|
3945
3878
|
execute_session_turn: {
|
|
@@ -3960,7 +3893,7 @@ type Database = {
|
|
|
3960
3893
|
}[];
|
|
3961
3894
|
};
|
|
3962
3895
|
get_platform_credential_kek: {
|
|
3963
|
-
Args: never
|
|
3896
|
+
Args: Record<PropertyKey, never>;
|
|
3964
3897
|
Returns: string;
|
|
3965
3898
|
};
|
|
3966
3899
|
get_storage_org_id: {
|
|
@@ -3970,7 +3903,7 @@ type Database = {
|
|
|
3970
3903
|
Returns: string;
|
|
3971
3904
|
};
|
|
3972
3905
|
get_workos_user_id: {
|
|
3973
|
-
Args: never
|
|
3906
|
+
Args: Record<PropertyKey, never>;
|
|
3974
3907
|
Returns: string;
|
|
3975
3908
|
};
|
|
3976
3909
|
has_org_access: {
|
|
@@ -3978,10 +3911,7 @@ type Database = {
|
|
|
3978
3911
|
action?: string;
|
|
3979
3912
|
org_id: string;
|
|
3980
3913
|
system_path: string;
|
|
3981
|
-
}
|
|
3982
|
-
Returns: boolean;
|
|
3983
|
-
} | {
|
|
3984
|
-
Args: {
|
|
3914
|
+
} | {
|
|
3985
3915
|
action?: string;
|
|
3986
3916
|
system_path: string;
|
|
3987
3917
|
};
|
|
@@ -4017,15 +3947,15 @@ type Database = {
|
|
|
4017
3947
|
Returns: Json;
|
|
4018
3948
|
};
|
|
4019
3949
|
process_due_schedules: {
|
|
4020
|
-
Args: never
|
|
3950
|
+
Args: Record<PropertyKey, never>;
|
|
4021
3951
|
Returns: Json;
|
|
4022
3952
|
};
|
|
4023
3953
|
recompute_all_memberships: {
|
|
4024
|
-
Args: never
|
|
3954
|
+
Args: Record<PropertyKey, never>;
|
|
4025
3955
|
Returns: undefined;
|
|
4026
3956
|
};
|
|
4027
3957
|
repair_membership_role_assignments: {
|
|
4028
|
-
Args: never
|
|
3958
|
+
Args: Record<PropertyKey, never>;
|
|
4029
3959
|
Returns: {
|
|
4030
3960
|
membership_id: string;
|
|
4031
3961
|
organization_id: string;
|
|
@@ -4055,7 +3985,7 @@ type Database = {
|
|
|
4055
3985
|
Returns: string;
|
|
4056
3986
|
};
|
|
4057
3987
|
upsert_user_profile: {
|
|
4058
|
-
Args: never
|
|
3988
|
+
Args: Record<PropertyKey, never>;
|
|
4059
3989
|
Returns: {
|
|
4060
3990
|
profile_display_name: string;
|
|
4061
3991
|
profile_email: string;
|
|
@@ -1538,6 +1538,7 @@ interface OrganizationGraph {
|
|
|
1538
1538
|
* @param systemId - The dotted system id (e.g. `sales.crm`).
|
|
1539
1539
|
*/
|
|
1540
1540
|
declare function bySystem(graph: OrganizationGraph, systemId: string, knowledgeNodes: OrgKnowledgeNode[]): OrgKnowledgeNode[];
|
|
1541
|
+
declare function byOntology(graph: OrganizationGraph, ontologyId: string, knowledgeNodes: OrgKnowledgeNode[]): OrgKnowledgeNode[];
|
|
1541
1542
|
/**
|
|
1542
1543
|
* Returns all knowledge nodes whose `kind` matches the given kind.
|
|
1543
1544
|
*
|
|
@@ -1745,5 +1746,5 @@ declare function formatKnowledgeInvocationLabel(invocation: OrganizationModelAct
|
|
|
1745
1746
|
declare function resolveKnowledgeInvocationNeighbors(model: OrganizationModel, id: string): KnowledgeInvocationNeighborsResult | undefined;
|
|
1746
1747
|
declare function formatKnowledgeInvocationNeighbors(result: KnowledgeInvocationNeighborsResult): string;
|
|
1747
1748
|
|
|
1748
|
-
export { OM_SEARCH_HIT_KINDS, byKind, byOwner, bySystem, formatIdsOnly, formatJson, formatKnowledgeInvocationLabel, formatKnowledgeInvocationNeighbors, formatKnowledgeResourcesList, formatKnowledgeRolesList, formatKnowledgeSystemsList, formatText, governedBy, governs, normalizeKnowledgeNodeId, parseKnowledgeSearchKinds, parseKnowledgeSearchLimit, parsePath, resolveKnowledgeInvocationNeighbors };
|
|
1749
|
+
export { OM_SEARCH_HIT_KINDS, byKind, byOntology, byOwner, bySystem, formatIdsOnly, formatJson, formatKnowledgeInvocationLabel, formatKnowledgeInvocationNeighbors, formatKnowledgeResourcesList, formatKnowledgeRolesList, formatKnowledgeSystemsList, formatText, governedBy, governs, normalizeKnowledgeNodeId, parseKnowledgeSearchKinds, parseKnowledgeSearchLimit, parsePath, resolveKnowledgeInvocationNeighbors };
|
|
1749
1750
|
export type { KnowledgeInvocationNeighborsResult, KnowledgeInvocationSource, KnowledgeJsonEnvelope, KnowledgeMount, OmSearchHitKind, ParsedKnowledgePath };
|
package/dist/knowledge/index.js
CHANGED
|
@@ -140,6 +140,22 @@ function bySystem(graph, systemId, knowledgeNodes) {
|
|
|
140
140
|
}
|
|
141
141
|
return knowledgeNodes.filter((n) => matchingOmIds.has(n.id));
|
|
142
142
|
}
|
|
143
|
+
function byOntology(graph, ontologyId, knowledgeNodes) {
|
|
144
|
+
const targetGraphNodeId = toTargetGraphNodeId(ontologyId);
|
|
145
|
+
const governingKnowledgeNodeIds = /* @__PURE__ */ new Set();
|
|
146
|
+
for (const edge of graph.edges) {
|
|
147
|
+
if (edge.kind === "governs" && edge.targetId === targetGraphNodeId && edge.sourceId.startsWith("knowledge:")) {
|
|
148
|
+
governingKnowledgeNodeIds.add(edge.sourceId);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
const sourceIdMap = buildKnowledgeSourceIdMap(graph);
|
|
152
|
+
const matchingOmIds = /* @__PURE__ */ new Set();
|
|
153
|
+
for (const graphNodeId of governingKnowledgeNodeIds) {
|
|
154
|
+
const omId = sourceIdMap.get(graphNodeId);
|
|
155
|
+
if (omId) matchingOmIds.add(omId);
|
|
156
|
+
}
|
|
157
|
+
return knowledgeNodes.filter((n) => matchingOmIds.has(n.id));
|
|
158
|
+
}
|
|
143
159
|
function byKind(_graph, kind, knowledgeNodes) {
|
|
144
160
|
return knowledgeNodes.filter((n) => n.kind === kind);
|
|
145
161
|
}
|
|
@@ -433,4 +449,4 @@ function formatKnowledgeInvocationNeighbors(result) {
|
|
|
433
449
|
return lines.join("\n");
|
|
434
450
|
}
|
|
435
451
|
|
|
436
|
-
export { OM_SEARCH_HIT_KINDS, byKind, byOwner, bySystem, formatIdsOnly, formatJson, formatKnowledgeInvocationLabel, formatKnowledgeInvocationNeighbors, formatKnowledgeResourcesList, formatKnowledgeRolesList, formatKnowledgeSystemsList, formatText, governedBy, governs, normalizeKnowledgeNodeId, parseKnowledgeSearchKinds, parseKnowledgeSearchLimit, parsePath, resolveKnowledgeInvocationNeighbors };
|
|
452
|
+
export { OM_SEARCH_HIT_KINDS, byKind, byOntology, byOwner, bySystem, formatIdsOnly, formatJson, formatKnowledgeInvocationLabel, formatKnowledgeInvocationNeighbors, formatKnowledgeResourcesList, formatKnowledgeRolesList, formatKnowledgeSystemsList, formatText, governedBy, governs, normalizeKnowledgeNodeId, parseKnowledgeSearchKinds, parseKnowledgeSearchLimit, parsePath, resolveKnowledgeInvocationNeighbors };
|
|
@@ -8,9 +8,6 @@ type Json = string | number | boolean | null | {
|
|
|
8
8
|
[key: string]: Json | undefined;
|
|
9
9
|
} | Json[];
|
|
10
10
|
type Database = {
|
|
11
|
-
__InternalSupabase: {
|
|
12
|
-
PostgrestVersion: "12.2.3 (519615d)";
|
|
13
|
-
};
|
|
14
11
|
public: {
|
|
15
12
|
Tables: {
|
|
16
13
|
acq_artifacts: {
|
|
@@ -1210,6 +1207,74 @@ type Database = {
|
|
|
1210
1207
|
}
|
|
1211
1208
|
];
|
|
1212
1209
|
};
|
|
1210
|
+
agent_access_grants: {
|
|
1211
|
+
Row: {
|
|
1212
|
+
allowed_origins: string[];
|
|
1213
|
+
branding: Json;
|
|
1214
|
+
capture_fields: Json;
|
|
1215
|
+
code_hash: string | null;
|
|
1216
|
+
code_salt: string | null;
|
|
1217
|
+
created_at: string;
|
|
1218
|
+
disabled_at: string | null;
|
|
1219
|
+
expires_at: string | null;
|
|
1220
|
+
id: string;
|
|
1221
|
+
max_sessions_per_visitor: number;
|
|
1222
|
+
max_turns_per_session: number;
|
|
1223
|
+
mode: string;
|
|
1224
|
+
organization_id: string;
|
|
1225
|
+
resource_id: string;
|
|
1226
|
+
slug: string;
|
|
1227
|
+
tool_policy: Json;
|
|
1228
|
+
updated_at: string;
|
|
1229
|
+
};
|
|
1230
|
+
Insert: {
|
|
1231
|
+
allowed_origins?: string[];
|
|
1232
|
+
branding?: Json;
|
|
1233
|
+
capture_fields?: Json;
|
|
1234
|
+
code_hash?: string | null;
|
|
1235
|
+
code_salt?: string | null;
|
|
1236
|
+
created_at?: string;
|
|
1237
|
+
disabled_at?: string | null;
|
|
1238
|
+
expires_at?: string | null;
|
|
1239
|
+
id?: string;
|
|
1240
|
+
max_sessions_per_visitor?: number;
|
|
1241
|
+
max_turns_per_session?: number;
|
|
1242
|
+
mode?: string;
|
|
1243
|
+
organization_id: string;
|
|
1244
|
+
resource_id: string;
|
|
1245
|
+
slug: string;
|
|
1246
|
+
tool_policy?: Json;
|
|
1247
|
+
updated_at?: string;
|
|
1248
|
+
};
|
|
1249
|
+
Update: {
|
|
1250
|
+
allowed_origins?: string[];
|
|
1251
|
+
branding?: Json;
|
|
1252
|
+
capture_fields?: Json;
|
|
1253
|
+
code_hash?: string | null;
|
|
1254
|
+
code_salt?: string | null;
|
|
1255
|
+
created_at?: string;
|
|
1256
|
+
disabled_at?: string | null;
|
|
1257
|
+
expires_at?: string | null;
|
|
1258
|
+
id?: string;
|
|
1259
|
+
max_sessions_per_visitor?: number;
|
|
1260
|
+
max_turns_per_session?: number;
|
|
1261
|
+
mode?: string;
|
|
1262
|
+
organization_id?: string;
|
|
1263
|
+
resource_id?: string;
|
|
1264
|
+
slug?: string;
|
|
1265
|
+
tool_policy?: Json;
|
|
1266
|
+
updated_at?: string;
|
|
1267
|
+
};
|
|
1268
|
+
Relationships: [
|
|
1269
|
+
{
|
|
1270
|
+
foreignKeyName: "agent_access_grants_organization_id_fkey";
|
|
1271
|
+
columns: ["organization_id"];
|
|
1272
|
+
isOneToOne: false;
|
|
1273
|
+
referencedRelation: "organizations";
|
|
1274
|
+
referencedColumns: ["id"];
|
|
1275
|
+
}
|
|
1276
|
+
];
|
|
1277
|
+
};
|
|
1213
1278
|
api_keys: {
|
|
1214
1279
|
Row: {
|
|
1215
1280
|
created_at: string | null;
|
|
@@ -2117,138 +2182,6 @@ type Database = {
|
|
|
2117
2182
|
};
|
|
2118
2183
|
Relationships: [];
|
|
2119
2184
|
};
|
|
2120
|
-
agent_access_grants: {
|
|
2121
|
-
Row: {
|
|
2122
|
-
allowed_origins: string[];
|
|
2123
|
-
branding: Json;
|
|
2124
|
-
capture_fields: Json;
|
|
2125
|
-
code_hash: string | null;
|
|
2126
|
-
code_salt: string | null;
|
|
2127
|
-
created_at: string;
|
|
2128
|
-
disabled_at: string | null;
|
|
2129
|
-
expires_at: string | null;
|
|
2130
|
-
id: string;
|
|
2131
|
-
max_sessions_per_visitor: number;
|
|
2132
|
-
max_turns_per_session: number;
|
|
2133
|
-
mode: string;
|
|
2134
|
-
organization_id: string;
|
|
2135
|
-
resource_id: string;
|
|
2136
|
-
slug: string;
|
|
2137
|
-
tool_policy: Json;
|
|
2138
|
-
updated_at: string;
|
|
2139
|
-
};
|
|
2140
|
-
Insert: {
|
|
2141
|
-
allowed_origins?: string[];
|
|
2142
|
-
branding?: Json;
|
|
2143
|
-
capture_fields?: Json;
|
|
2144
|
-
code_hash?: string | null;
|
|
2145
|
-
code_salt?: string | null;
|
|
2146
|
-
created_at?: string;
|
|
2147
|
-
disabled_at?: string | null;
|
|
2148
|
-
expires_at?: string | null;
|
|
2149
|
-
id?: string;
|
|
2150
|
-
max_sessions_per_visitor?: number;
|
|
2151
|
-
max_turns_per_session?: number;
|
|
2152
|
-
mode?: string;
|
|
2153
|
-
organization_id: string;
|
|
2154
|
-
resource_id: string;
|
|
2155
|
-
slug: string;
|
|
2156
|
-
tool_policy?: Json;
|
|
2157
|
-
updated_at?: string;
|
|
2158
|
-
};
|
|
2159
|
-
Update: {
|
|
2160
|
-
allowed_origins?: string[];
|
|
2161
|
-
branding?: Json;
|
|
2162
|
-
capture_fields?: Json;
|
|
2163
|
-
code_hash?: string | null;
|
|
2164
|
-
code_salt?: string | null;
|
|
2165
|
-
created_at?: string;
|
|
2166
|
-
disabled_at?: string | null;
|
|
2167
|
-
expires_at?: string | null;
|
|
2168
|
-
id?: string;
|
|
2169
|
-
max_sessions_per_visitor?: number;
|
|
2170
|
-
max_turns_per_session?: number;
|
|
2171
|
-
mode?: string;
|
|
2172
|
-
organization_id?: string;
|
|
2173
|
-
resource_id?: string;
|
|
2174
|
-
slug?: string;
|
|
2175
|
-
tool_policy?: Json;
|
|
2176
|
-
updated_at?: string;
|
|
2177
|
-
};
|
|
2178
|
-
Relationships: [
|
|
2179
|
-
{
|
|
2180
|
-
foreignKeyName: "agent_access_grants_organization_id_fkey";
|
|
2181
|
-
columns: ["organization_id"];
|
|
2182
|
-
isOneToOne: false;
|
|
2183
|
-
referencedRelation: "organizations";
|
|
2184
|
-
referencedColumns: ["id"];
|
|
2185
|
-
}
|
|
2186
|
-
];
|
|
2187
|
-
};
|
|
2188
|
-
agent_chat_capabilities: {
|
|
2189
|
-
Row: {
|
|
2190
|
-
created_at: string;
|
|
2191
|
-
expires_at: string;
|
|
2192
|
-
grant_id: string;
|
|
2193
|
-
id: string;
|
|
2194
|
-
organization_id: string;
|
|
2195
|
-
origin: string | null;
|
|
2196
|
-
resource_id: string;
|
|
2197
|
-
revoked_at: string | null;
|
|
2198
|
-
session_id: string | null;
|
|
2199
|
-
token_hash: string;
|
|
2200
|
-
visitor_id: string | null;
|
|
2201
|
-
};
|
|
2202
|
-
Insert: {
|
|
2203
|
-
created_at?: string;
|
|
2204
|
-
expires_at: string;
|
|
2205
|
-
grant_id: string;
|
|
2206
|
-
id?: string;
|
|
2207
|
-
organization_id: string;
|
|
2208
|
-
origin?: string | null;
|
|
2209
|
-
resource_id: string;
|
|
2210
|
-
revoked_at?: string | null;
|
|
2211
|
-
session_id?: string | null;
|
|
2212
|
-
token_hash: string;
|
|
2213
|
-
visitor_id?: string | null;
|
|
2214
|
-
};
|
|
2215
|
-
Update: {
|
|
2216
|
-
created_at?: string;
|
|
2217
|
-
expires_at?: string;
|
|
2218
|
-
grant_id?: string;
|
|
2219
|
-
id?: string;
|
|
2220
|
-
organization_id?: string;
|
|
2221
|
-
origin?: string | null;
|
|
2222
|
-
resource_id?: string;
|
|
2223
|
-
revoked_at?: string | null;
|
|
2224
|
-
session_id?: string | null;
|
|
2225
|
-
token_hash?: string;
|
|
2226
|
-
visitor_id?: string | null;
|
|
2227
|
-
};
|
|
2228
|
-
Relationships: [
|
|
2229
|
-
{
|
|
2230
|
-
foreignKeyName: "agent_chat_capabilities_grant_id_fkey";
|
|
2231
|
-
columns: ["grant_id"];
|
|
2232
|
-
isOneToOne: false;
|
|
2233
|
-
referencedRelation: "agent_access_grants";
|
|
2234
|
-
referencedColumns: ["id"];
|
|
2235
|
-
},
|
|
2236
|
-
{
|
|
2237
|
-
foreignKeyName: "agent_chat_capabilities_organization_id_fkey";
|
|
2238
|
-
columns: ["organization_id"];
|
|
2239
|
-
isOneToOne: false;
|
|
2240
|
-
referencedRelation: "organizations";
|
|
2241
|
-
referencedColumns: ["id"];
|
|
2242
|
-
},
|
|
2243
|
-
{
|
|
2244
|
-
foreignKeyName: "agent_chat_capabilities_session_id_fkey";
|
|
2245
|
-
columns: ["session_id"];
|
|
2246
|
-
isOneToOne: false;
|
|
2247
|
-
referencedRelation: "sessions";
|
|
2248
|
-
referencedColumns: ["session_id"];
|
|
2249
|
-
}
|
|
2250
|
-
];
|
|
2251
|
-
};
|
|
2252
2185
|
organizations: {
|
|
2253
2186
|
Row: {
|
|
2254
2187
|
config: Json;
|
|
@@ -3147,11 +3080,11 @@ type Database = {
|
|
|
3147
3080
|
Returns: undefined;
|
|
3148
3081
|
};
|
|
3149
3082
|
auth_jwt_claims: {
|
|
3150
|
-
Args: never
|
|
3083
|
+
Args: Record<PropertyKey, never>;
|
|
3151
3084
|
Returns: Json;
|
|
3152
3085
|
};
|
|
3153
3086
|
auth_uid_safe: {
|
|
3154
|
-
Args: never
|
|
3087
|
+
Args: Record<PropertyKey, never>;
|
|
3155
3088
|
Returns: string;
|
|
3156
3089
|
};
|
|
3157
3090
|
can_assign_role_in_org: {
|
|
@@ -3162,7 +3095,7 @@ type Database = {
|
|
|
3162
3095
|
Returns: boolean;
|
|
3163
3096
|
};
|
|
3164
3097
|
current_user_is_platform_admin: {
|
|
3165
|
-
Args: never
|
|
3098
|
+
Args: Record<PropertyKey, never>;
|
|
3166
3099
|
Returns: boolean;
|
|
3167
3100
|
};
|
|
3168
3101
|
current_user_shares_org_with: {
|
|
@@ -3172,11 +3105,11 @@ type Database = {
|
|
|
3172
3105
|
Returns: boolean;
|
|
3173
3106
|
};
|
|
3174
3107
|
current_user_supabase_id: {
|
|
3175
|
-
Args: never
|
|
3108
|
+
Args: Record<PropertyKey, never>;
|
|
3176
3109
|
Returns: string;
|
|
3177
3110
|
};
|
|
3178
3111
|
detect_stalled_executions: {
|
|
3179
|
-
Args: never
|
|
3112
|
+
Args: Record<PropertyKey, never>;
|
|
3180
3113
|
Returns: undefined;
|
|
3181
3114
|
};
|
|
3182
3115
|
execute_session_turn: {
|
|
@@ -3197,7 +3130,7 @@ type Database = {
|
|
|
3197
3130
|
}[];
|
|
3198
3131
|
};
|
|
3199
3132
|
get_platform_credential_kek: {
|
|
3200
|
-
Args: never
|
|
3133
|
+
Args: Record<PropertyKey, never>;
|
|
3201
3134
|
Returns: string;
|
|
3202
3135
|
};
|
|
3203
3136
|
get_storage_org_id: {
|
|
@@ -3207,7 +3140,7 @@ type Database = {
|
|
|
3207
3140
|
Returns: string;
|
|
3208
3141
|
};
|
|
3209
3142
|
get_workos_user_id: {
|
|
3210
|
-
Args: never
|
|
3143
|
+
Args: Record<PropertyKey, never>;
|
|
3211
3144
|
Returns: string;
|
|
3212
3145
|
};
|
|
3213
3146
|
has_org_access: {
|
|
@@ -3215,10 +3148,7 @@ type Database = {
|
|
|
3215
3148
|
action?: string;
|
|
3216
3149
|
org_id: string;
|
|
3217
3150
|
system_path: string;
|
|
3218
|
-
}
|
|
3219
|
-
Returns: boolean;
|
|
3220
|
-
} | {
|
|
3221
|
-
Args: {
|
|
3151
|
+
} | {
|
|
3222
3152
|
action?: string;
|
|
3223
3153
|
system_path: string;
|
|
3224
3154
|
};
|
|
@@ -3254,15 +3184,15 @@ type Database = {
|
|
|
3254
3184
|
Returns: Json;
|
|
3255
3185
|
};
|
|
3256
3186
|
process_due_schedules: {
|
|
3257
|
-
Args: never
|
|
3187
|
+
Args: Record<PropertyKey, never>;
|
|
3258
3188
|
Returns: Json;
|
|
3259
3189
|
};
|
|
3260
3190
|
recompute_all_memberships: {
|
|
3261
|
-
Args: never
|
|
3191
|
+
Args: Record<PropertyKey, never>;
|
|
3262
3192
|
Returns: undefined;
|
|
3263
3193
|
};
|
|
3264
3194
|
repair_membership_role_assignments: {
|
|
3265
|
-
Args: never
|
|
3195
|
+
Args: Record<PropertyKey, never>;
|
|
3266
3196
|
Returns: {
|
|
3267
3197
|
membership_id: string;
|
|
3268
3198
|
organization_id: string;
|
|
@@ -3292,7 +3222,7 @@ type Database = {
|
|
|
3292
3222
|
Returns: string;
|
|
3293
3223
|
};
|
|
3294
3224
|
upsert_user_profile: {
|
|
3295
|
-
Args: never
|
|
3225
|
+
Args: Record<PropertyKey, never>;
|
|
3296
3226
|
Returns: {
|
|
3297
3227
|
profile_display_name: string;
|
|
3298
3228
|
profile_email: string;
|