@objectstack/service-ai 7.2.0 → 7.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/dist/index.d.cts CHANGED
@@ -861,10 +861,22 @@ declare const createObjectTool: {
861
861
  requiresConfirmation: boolean;
862
862
  active: boolean;
863
863
  builtIn: boolean;
864
- category?: "action" | "flow" | "vector_search" | "data" | "utility" | "analytics" | "integration" | undefined;
864
+ _lock?: "none" | "full" | "no-overlay" | "no-delete" | undefined;
865
+ _lockReason?: string | undefined;
866
+ _lockSource?: "artifact" | "package" | "env-forced" | undefined;
867
+ _provenance?: "package" | "env-forced" | "org" | undefined;
868
+ _packageId?: string | undefined;
869
+ _packageVersion?: string | undefined;
870
+ _lockDocsUrl?: string | undefined;
871
+ category?: "action" | "flow" | "vector_search" | "data" | "utility" | "integration" | "analytics" | undefined;
865
872
  outputSchema?: Record<string, unknown> | undefined;
866
873
  objectName?: string | undefined;
867
874
  permissions?: string[] | undefined;
875
+ protection?: {
876
+ lock: "none" | "full" | "no-overlay" | "no-delete";
877
+ reason: string;
878
+ docsUrl?: string | undefined;
879
+ } | undefined;
868
880
  };
869
881
 
870
882
  /**
@@ -882,10 +894,22 @@ declare const addFieldTool: {
882
894
  requiresConfirmation: boolean;
883
895
  active: boolean;
884
896
  builtIn: boolean;
885
- category?: "action" | "flow" | "vector_search" | "data" | "utility" | "analytics" | "integration" | undefined;
897
+ _lock?: "none" | "full" | "no-overlay" | "no-delete" | undefined;
898
+ _lockReason?: string | undefined;
899
+ _lockSource?: "artifact" | "package" | "env-forced" | undefined;
900
+ _provenance?: "package" | "env-forced" | "org" | undefined;
901
+ _packageId?: string | undefined;
902
+ _packageVersion?: string | undefined;
903
+ _lockDocsUrl?: string | undefined;
904
+ category?: "action" | "flow" | "vector_search" | "data" | "utility" | "integration" | "analytics" | undefined;
886
905
  outputSchema?: Record<string, unknown> | undefined;
887
906
  objectName?: string | undefined;
888
907
  permissions?: string[] | undefined;
908
+ protection?: {
909
+ lock: "none" | "full" | "no-overlay" | "no-delete";
910
+ reason: string;
911
+ docsUrl?: string | undefined;
912
+ } | undefined;
889
913
  };
890
914
 
891
915
  /**
@@ -902,10 +926,22 @@ declare const modifyFieldTool: {
902
926
  requiresConfirmation: boolean;
903
927
  active: boolean;
904
928
  builtIn: boolean;
905
- category?: "action" | "flow" | "vector_search" | "data" | "utility" | "analytics" | "integration" | undefined;
929
+ _lock?: "none" | "full" | "no-overlay" | "no-delete" | undefined;
930
+ _lockReason?: string | undefined;
931
+ _lockSource?: "artifact" | "package" | "env-forced" | undefined;
932
+ _provenance?: "package" | "env-forced" | "org" | undefined;
933
+ _packageId?: string | undefined;
934
+ _packageVersion?: string | undefined;
935
+ _lockDocsUrl?: string | undefined;
936
+ category?: "action" | "flow" | "vector_search" | "data" | "utility" | "integration" | "analytics" | undefined;
906
937
  outputSchema?: Record<string, unknown> | undefined;
907
938
  objectName?: string | undefined;
908
939
  permissions?: string[] | undefined;
940
+ protection?: {
941
+ lock: "none" | "full" | "no-overlay" | "no-delete";
942
+ reason: string;
943
+ docsUrl?: string | undefined;
944
+ } | undefined;
909
945
  };
910
946
 
911
947
  /**
@@ -922,10 +958,22 @@ declare const deleteFieldTool: {
922
958
  requiresConfirmation: boolean;
923
959
  active: boolean;
924
960
  builtIn: boolean;
925
- category?: "action" | "flow" | "vector_search" | "data" | "utility" | "analytics" | "integration" | undefined;
961
+ _lock?: "none" | "full" | "no-overlay" | "no-delete" | undefined;
962
+ _lockReason?: string | undefined;
963
+ _lockSource?: "artifact" | "package" | "env-forced" | undefined;
964
+ _provenance?: "package" | "env-forced" | "org" | undefined;
965
+ _packageId?: string | undefined;
966
+ _packageVersion?: string | undefined;
967
+ _lockDocsUrl?: string | undefined;
968
+ category?: "action" | "flow" | "vector_search" | "data" | "utility" | "integration" | "analytics" | undefined;
926
969
  outputSchema?: Record<string, unknown> | undefined;
927
970
  objectName?: string | undefined;
928
971
  permissions?: string[] | undefined;
972
+ protection?: {
973
+ lock: "none" | "full" | "no-overlay" | "no-delete";
974
+ reason: string;
975
+ docsUrl?: string | undefined;
976
+ } | undefined;
929
977
  };
930
978
 
931
979
  /**
@@ -943,10 +991,22 @@ declare const listObjectsTool: {
943
991
  requiresConfirmation: boolean;
944
992
  active: boolean;
945
993
  builtIn: boolean;
946
- category?: "action" | "flow" | "vector_search" | "data" | "utility" | "analytics" | "integration" | undefined;
994
+ _lock?: "none" | "full" | "no-overlay" | "no-delete" | undefined;
995
+ _lockReason?: string | undefined;
996
+ _lockSource?: "artifact" | "package" | "env-forced" | undefined;
997
+ _provenance?: "package" | "env-forced" | "org" | undefined;
998
+ _packageId?: string | undefined;
999
+ _packageVersion?: string | undefined;
1000
+ _lockDocsUrl?: string | undefined;
1001
+ category?: "action" | "flow" | "vector_search" | "data" | "utility" | "integration" | "analytics" | undefined;
947
1002
  outputSchema?: Record<string, unknown> | undefined;
948
1003
  objectName?: string | undefined;
949
1004
  permissions?: string[] | undefined;
1005
+ protection?: {
1006
+ lock: "none" | "full" | "no-overlay" | "no-delete";
1007
+ reason: string;
1008
+ docsUrl?: string | undefined;
1009
+ } | undefined;
950
1010
  };
951
1011
 
952
1012
  /**
@@ -964,10 +1024,22 @@ declare const describeObjectTool: {
964
1024
  requiresConfirmation: boolean;
965
1025
  active: boolean;
966
1026
  builtIn: boolean;
967
- category?: "action" | "flow" | "vector_search" | "data" | "utility" | "analytics" | "integration" | undefined;
1027
+ _lock?: "none" | "full" | "no-overlay" | "no-delete" | undefined;
1028
+ _lockReason?: string | undefined;
1029
+ _lockSource?: "artifact" | "package" | "env-forced" | undefined;
1030
+ _provenance?: "package" | "env-forced" | "org" | undefined;
1031
+ _packageId?: string | undefined;
1032
+ _packageVersion?: string | undefined;
1033
+ _lockDocsUrl?: string | undefined;
1034
+ category?: "action" | "flow" | "vector_search" | "data" | "utility" | "integration" | "analytics" | undefined;
968
1035
  outputSchema?: Record<string, unknown> | undefined;
969
1036
  objectName?: string | undefined;
970
1037
  permissions?: string[] | undefined;
1038
+ protection?: {
1039
+ lock: "none" | "full" | "no-overlay" | "no-delete";
1040
+ reason: string;
1041
+ docsUrl?: string | undefined;
1042
+ } | undefined;
971
1043
  };
972
1044
 
973
1045
  /** All built-in metadata management tool definitions (Tool metadata). */
@@ -1068,10 +1140,22 @@ declare const listPackagesTool: {
1068
1140
  requiresConfirmation: boolean;
1069
1141
  active: boolean;
1070
1142
  builtIn: boolean;
1071
- category?: "action" | "flow" | "vector_search" | "data" | "utility" | "analytics" | "integration" | undefined;
1143
+ _lock?: "none" | "full" | "no-overlay" | "no-delete" | undefined;
1144
+ _lockReason?: string | undefined;
1145
+ _lockSource?: "artifact" | "package" | "env-forced" | undefined;
1146
+ _provenance?: "package" | "env-forced" | "org" | undefined;
1147
+ _packageId?: string | undefined;
1148
+ _packageVersion?: string | undefined;
1149
+ _lockDocsUrl?: string | undefined;
1150
+ category?: "action" | "flow" | "vector_search" | "data" | "utility" | "integration" | "analytics" | undefined;
1072
1151
  outputSchema?: Record<string, unknown> | undefined;
1073
1152
  objectName?: string | undefined;
1074
1153
  permissions?: string[] | undefined;
1154
+ protection?: {
1155
+ lock: "none" | "full" | "no-overlay" | "no-delete";
1156
+ reason: string;
1157
+ docsUrl?: string | undefined;
1158
+ } | undefined;
1075
1159
  };
1076
1160
 
1077
1161
  /**
@@ -1087,10 +1171,22 @@ declare const getPackageTool: {
1087
1171
  requiresConfirmation: boolean;
1088
1172
  active: boolean;
1089
1173
  builtIn: boolean;
1090
- category?: "action" | "flow" | "vector_search" | "data" | "utility" | "analytics" | "integration" | undefined;
1174
+ _lock?: "none" | "full" | "no-overlay" | "no-delete" | undefined;
1175
+ _lockReason?: string | undefined;
1176
+ _lockSource?: "artifact" | "package" | "env-forced" | undefined;
1177
+ _provenance?: "package" | "env-forced" | "org" | undefined;
1178
+ _packageId?: string | undefined;
1179
+ _packageVersion?: string | undefined;
1180
+ _lockDocsUrl?: string | undefined;
1181
+ category?: "action" | "flow" | "vector_search" | "data" | "utility" | "integration" | "analytics" | undefined;
1091
1182
  outputSchema?: Record<string, unknown> | undefined;
1092
1183
  objectName?: string | undefined;
1093
1184
  permissions?: string[] | undefined;
1185
+ protection?: {
1186
+ lock: "none" | "full" | "no-overlay" | "no-delete";
1187
+ reason: string;
1188
+ docsUrl?: string | undefined;
1189
+ } | undefined;
1094
1190
  };
1095
1191
 
1096
1192
  /**
@@ -1107,10 +1203,22 @@ declare const createPackageTool: {
1107
1203
  requiresConfirmation: boolean;
1108
1204
  active: boolean;
1109
1205
  builtIn: boolean;
1110
- category?: "action" | "flow" | "vector_search" | "data" | "utility" | "analytics" | "integration" | undefined;
1206
+ _lock?: "none" | "full" | "no-overlay" | "no-delete" | undefined;
1207
+ _lockReason?: string | undefined;
1208
+ _lockSource?: "artifact" | "package" | "env-forced" | undefined;
1209
+ _provenance?: "package" | "env-forced" | "org" | undefined;
1210
+ _packageId?: string | undefined;
1211
+ _packageVersion?: string | undefined;
1212
+ _lockDocsUrl?: string | undefined;
1213
+ category?: "action" | "flow" | "vector_search" | "data" | "utility" | "integration" | "analytics" | undefined;
1111
1214
  outputSchema?: Record<string, unknown> | undefined;
1112
1215
  objectName?: string | undefined;
1113
1216
  permissions?: string[] | undefined;
1217
+ protection?: {
1218
+ lock: "none" | "full" | "no-overlay" | "no-delete";
1219
+ reason: string;
1220
+ docsUrl?: string | undefined;
1221
+ } | undefined;
1114
1222
  };
1115
1223
 
1116
1224
  /**
@@ -1126,10 +1234,22 @@ declare const getActivePackageTool: {
1126
1234
  requiresConfirmation: boolean;
1127
1235
  active: boolean;
1128
1236
  builtIn: boolean;
1129
- category?: "action" | "flow" | "vector_search" | "data" | "utility" | "analytics" | "integration" | undefined;
1237
+ _lock?: "none" | "full" | "no-overlay" | "no-delete" | undefined;
1238
+ _lockReason?: string | undefined;
1239
+ _lockSource?: "artifact" | "package" | "env-forced" | undefined;
1240
+ _provenance?: "package" | "env-forced" | "org" | undefined;
1241
+ _packageId?: string | undefined;
1242
+ _packageVersion?: string | undefined;
1243
+ _lockDocsUrl?: string | undefined;
1244
+ category?: "action" | "flow" | "vector_search" | "data" | "utility" | "integration" | "analytics" | undefined;
1130
1245
  outputSchema?: Record<string, unknown> | undefined;
1131
1246
  objectName?: string | undefined;
1132
1247
  permissions?: string[] | undefined;
1248
+ protection?: {
1249
+ lock: "none" | "full" | "no-overlay" | "no-delete";
1250
+ reason: string;
1251
+ docsUrl?: string | undefined;
1252
+ } | undefined;
1133
1253
  };
1134
1254
 
1135
1255
  /**
@@ -1146,10 +1266,22 @@ declare const setActivePackageTool: {
1146
1266
  requiresConfirmation: boolean;
1147
1267
  active: boolean;
1148
1268
  builtIn: boolean;
1149
- category?: "action" | "flow" | "vector_search" | "data" | "utility" | "analytics" | "integration" | undefined;
1269
+ _lock?: "none" | "full" | "no-overlay" | "no-delete" | undefined;
1270
+ _lockReason?: string | undefined;
1271
+ _lockSource?: "artifact" | "package" | "env-forced" | undefined;
1272
+ _provenance?: "package" | "env-forced" | "org" | undefined;
1273
+ _packageId?: string | undefined;
1274
+ _packageVersion?: string | undefined;
1275
+ _lockDocsUrl?: string | undefined;
1276
+ category?: "action" | "flow" | "vector_search" | "data" | "utility" | "integration" | "analytics" | undefined;
1150
1277
  outputSchema?: Record<string, unknown> | undefined;
1151
1278
  objectName?: string | undefined;
1152
1279
  permissions?: string[] | undefined;
1280
+ protection?: {
1281
+ lock: "none" | "full" | "no-overlay" | "no-delete";
1282
+ reason: string;
1283
+ docsUrl?: string | undefined;
1284
+ } | undefined;
1153
1285
  };
1154
1286
 
1155
1287
  /** All built-in package management tool definitions (Tool metadata). */
@@ -1605,38 +1737,18 @@ declare class AgentRuntime {
1605
1737
  * chat endpoint when the client doesn't specify an `agentName`.
1606
1738
  *
1607
1739
  * Resolution order:
1608
- * 1. The `defaultAgent` of the app named by `context.appName`.
1609
- * 2. The first active agent in the registry (deterministic fallback).
1610
- * 3. `undefined` if no agents are registered.
1740
+ * 1. The `defaultAgent` of the app named by `context.appName`
1741
+ * (e.g. Studio `metadata_assistant`).
1742
+ * 2. The platform data-query agent (`data_chat`) the implicit
1743
+ * copilot bound to every app that doesn't pin its own. This is
1744
+ * what end users get by default, so they never have to choose.
1745
+ * 3. The first active agent in the registry (last-resort fallback,
1746
+ * e.g. in stripped-down deployments without the data agent).
1747
+ * 4. `undefined` if no agents are registered.
1611
1748
  */
1612
1749
  resolveDefaultAgent(context?: AgentChatContext): Promise<Agent | undefined>;
1613
1750
  }
1614
1751
 
1615
- /**
1616
- * Built-in `data_chat` agent — a thin **persona** record.
1617
- *
1618
- * Following the platform's metadata-driven philosophy, this agent no
1619
- * longer hardcodes the tools it can call. The capability bundle lives
1620
- * on the `data_explorer` *skill* (see `../skills/data-explorer-skill.ts`).
1621
- * The agent record is now just:
1622
- * - identity (name / label / role)
1623
- * - persona (system prompt)
1624
- * - model + safety config
1625
- * - skills attached → `skills: ['data_explorer']`
1626
- *
1627
- * To grant data-exploration powers to a different agent, just add
1628
- * `data_explorer` to its `skills[]`. To revoke globally, set the
1629
- * skill's `active: false` in metadata.
1630
- *
1631
- * @example
1632
- * ```
1633
- * POST /api/v1/ai/agents/data_chat/chat
1634
- * {
1635
- * "messages": [{ "role": "user", "content": "Show me all active accounts" }],
1636
- * "context": { "objectName": "account" }
1637
- * }
1638
- * ```
1639
- */
1640
1752
  declare const DATA_CHAT_AGENT: Agent;
1641
1753
 
1642
1754
  /**
@@ -1964,6 +2076,7 @@ declare const AiConversationObject: Omit<{
1964
2076
  _provenance?: "package" | "env-forced" | "org" | undefined;
1965
2077
  _packageId?: string | undefined;
1966
2078
  _packageVersion?: string | undefined;
2079
+ _lockDocsUrl?: string | undefined;
1967
2080
  label?: string | undefined;
1968
2081
  pluralLabel?: string | undefined;
1969
2082
  description?: string | undefined;
@@ -2353,7 +2466,7 @@ declare const AiConversationObject: Omit<{
2353
2466
  apiMethods?: ("restore" | "export" | "import" | "delete" | "purge" | "upsert" | "search" | "create" | "list" | "get" | "update" | "history" | "bulk" | "aggregate")[] | undefined;
2354
2467
  } | undefined;
2355
2468
  recordTypes?: string[] | undefined;
2356
- sharingModel?: "private" | "full" | "read" | "read_write" | undefined;
2469
+ sharingModel?: "full" | "private" | "read" | "read_write" | undefined;
2357
2470
  publicSharing?: {
2358
2471
  enabled: boolean;
2359
2472
  allowedAudiences?: ("email" | "public" | "link_only" | "signed_in")[] | undefined;
@@ -2456,6 +2569,11 @@ declare const AiConversationObject: Omit<{
2456
2569
  role?: string | undefined;
2457
2570
  } | undefined;
2458
2571
  }[] | undefined;
2572
+ protection?: {
2573
+ lock: "none" | "full" | "no-overlay" | "no-delete";
2574
+ reason: string;
2575
+ docsUrl?: string | undefined;
2576
+ } | undefined;
2459
2577
  }, "fields"> & Pick<{
2460
2578
  readonly name: "ai_conversations";
2461
2579
  readonly label: "AI Conversation";
@@ -3925,6 +4043,7 @@ declare const AiMessageObject: Omit<{
3925
4043
  _provenance?: "package" | "env-forced" | "org" | undefined;
3926
4044
  _packageId?: string | undefined;
3927
4045
  _packageVersion?: string | undefined;
4046
+ _lockDocsUrl?: string | undefined;
3928
4047
  label?: string | undefined;
3929
4048
  pluralLabel?: string | undefined;
3930
4049
  description?: string | undefined;
@@ -4314,7 +4433,7 @@ declare const AiMessageObject: Omit<{
4314
4433
  apiMethods?: ("restore" | "export" | "import" | "delete" | "purge" | "upsert" | "search" | "create" | "list" | "get" | "update" | "history" | "bulk" | "aggregate")[] | undefined;
4315
4434
  } | undefined;
4316
4435
  recordTypes?: string[] | undefined;
4317
- sharingModel?: "private" | "full" | "read" | "read_write" | undefined;
4436
+ sharingModel?: "full" | "private" | "read" | "read_write" | undefined;
4318
4437
  publicSharing?: {
4319
4438
  enabled: boolean;
4320
4439
  allowedAudiences?: ("email" | "public" | "link_only" | "signed_in")[] | undefined;
@@ -4417,6 +4536,11 @@ declare const AiMessageObject: Omit<{
4417
4536
  role?: string | undefined;
4418
4537
  } | undefined;
4419
4538
  }[] | undefined;
4539
+ protection?: {
4540
+ lock: "none" | "full" | "no-overlay" | "no-delete";
4541
+ reason: string;
4542
+ docsUrl?: string | undefined;
4543
+ } | undefined;
4420
4544
  }, "fields"> & Pick<{
4421
4545
  readonly name: "ai_messages";
4422
4546
  readonly label: "AI Message";
@@ -6758,6 +6882,7 @@ declare const AiTraceObject: Omit<{
6758
6882
  _provenance?: "package" | "env-forced" | "org" | undefined;
6759
6883
  _packageId?: string | undefined;
6760
6884
  _packageVersion?: string | undefined;
6885
+ _lockDocsUrl?: string | undefined;
6761
6886
  label?: string | undefined;
6762
6887
  pluralLabel?: string | undefined;
6763
6888
  description?: string | undefined;
@@ -7147,7 +7272,7 @@ declare const AiTraceObject: Omit<{
7147
7272
  apiMethods?: ("restore" | "export" | "import" | "delete" | "purge" | "upsert" | "search" | "create" | "list" | "get" | "update" | "history" | "bulk" | "aggregate")[] | undefined;
7148
7273
  } | undefined;
7149
7274
  recordTypes?: string[] | undefined;
7150
- sharingModel?: "private" | "full" | "read" | "read_write" | undefined;
7275
+ sharingModel?: "full" | "private" | "read" | "read_write" | undefined;
7151
7276
  publicSharing?: {
7152
7277
  enabled: boolean;
7153
7278
  allowedAudiences?: ("email" | "public" | "link_only" | "signed_in")[] | undefined;
@@ -7250,6 +7375,11 @@ declare const AiTraceObject: Omit<{
7250
7375
  role?: string | undefined;
7251
7376
  } | undefined;
7252
7377
  }[] | undefined;
7378
+ protection?: {
7379
+ lock: "none" | "full" | "no-overlay" | "no-delete";
7380
+ reason: string;
7381
+ docsUrl?: string | undefined;
7382
+ } | undefined;
7253
7383
  }, "fields"> & Pick<{
7254
7384
  readonly name: "ai_traces";
7255
7385
  readonly label: "AI Trace";
@@ -10447,6 +10577,13 @@ declare const AiTraceObject: Omit<{
10447
10577
  * automatically in Studio when AIService is loaded.
10448
10578
  */
10449
10579
  declare const AiTraceView: {
10580
+ _lock?: "none" | "full" | "no-overlay" | "no-delete" | undefined;
10581
+ _lockReason?: string | undefined;
10582
+ _lockSource?: "artifact" | "package" | "env-forced" | undefined;
10583
+ _provenance?: "package" | "env-forced" | "org" | undefined;
10584
+ _packageId?: string | undefined;
10585
+ _packageVersion?: string | undefined;
10586
+ _lockDocsUrl?: string | undefined;
10450
10587
  list?: {
10451
10588
  type: "map" | "kanban" | "calendar" | "gantt" | "gallery" | "timeline" | "chart" | "grid";
10452
10589
  columns: string[] | {
@@ -11147,6 +11284,11 @@ declare const AiTraceView: {
11147
11284
  role?: string | undefined;
11148
11285
  } | undefined;
11149
11286
  }> | undefined;
11287
+ protection?: {
11288
+ lock: "none" | "full" | "no-overlay" | "no-delete";
11289
+ reason: string;
11290
+ docsUrl?: string | undefined;
11291
+ } | undefined;
11150
11292
  };
11151
11293
 
11152
11294
  /**