@segmentstream/ontology 0.96.0 → 0.98.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 (50) hide show
  1. package/README.md +15 -3
  2. package/dist/agent-review.d.ts +95 -0
  3. package/dist/agent-review.js +200 -0
  4. package/dist/analyze.d.ts +10 -2
  5. package/dist/analyze.js +240 -19
  6. package/dist/bin/check.js +2 -0
  7. package/dist/chat.d.ts +16 -0
  8. package/dist/diagnostics.d.ts +3 -3
  9. package/dist/diagnostics.js +2 -0
  10. package/dist/index.d.ts +5 -1
  11. package/dist/index.js +2 -0
  12. package/dist/manifest.d.ts +505 -2
  13. package/dist/manifest.js +55 -2
  14. package/dist/migrate/model.d.ts +272 -0
  15. package/dist/ontology.d.ts +3 -0
  16. package/dist/ontology.js +1 -0
  17. package/dist/permissions.d.ts +5 -3
  18. package/dist/permissions.js +9 -5
  19. package/dist/runtime/agents.js +53 -0
  20. package/dist/service/agent/protocol.d.ts +18 -0
  21. package/dist/service/agent/protocol.js +33 -0
  22. package/dist/service/agent/server.js +48 -1
  23. package/dist/service/catalog.js +10 -1
  24. package/dist/service/chat/archive.d.ts +2 -1
  25. package/dist/service/chat/delivery.js +11 -0
  26. package/dist/service/chat/envelope.d.ts +16 -16
  27. package/dist/service/chat/providers/provider.d.ts +2 -0
  28. package/dist/service/chat/providers/slack.js +1 -1
  29. package/dist/service/chat/providers/telegram.d.ts +6 -1
  30. package/dist/service/chat/providers/telegram.js +14 -3
  31. package/dist/service/chat/providers/whatsapp.js +1 -1
  32. package/dist/service/chat/review-delivery.d.ts +38 -0
  33. package/dist/service/chat/review-delivery.js +258 -0
  34. package/dist/service/connections.js +1 -0
  35. package/dist/service/discovery-search.d.ts +1 -1
  36. package/dist/service/mcp/runtime-policy.js +5 -1
  37. package/dist/service/mcp/server.js +13 -1
  38. package/dist/service/mcp/tools.d.ts +5 -0
  39. package/dist/service/mcp/tools.js +30 -0
  40. package/dist/service/operations.d.ts +3 -1
  41. package/dist/service/operations.js +16 -1
  42. package/dist/service/runtime-contract.d.ts +28 -0
  43. package/dist/service/schemas.d.ts +62 -0
  44. package/dist/service/toolsets.d.ts +49 -0
  45. package/dist/service/toolsets.js +284 -0
  46. package/dist/slack.js +3 -1
  47. package/dist/toolset.d.ts +141 -0
  48. package/dist/toolset.js +154 -0
  49. package/dist/whatsapp.js +3 -1
  50. package/package.json +1 -1
@@ -3,6 +3,7 @@ import { Effect, Schema } from "effect";
3
3
  import type { ResolvedConnection, ResolvedEntity } from "./analyze.js";
4
4
  import type { ResolvedFeedback } from "./feedback-config.js";
5
5
  import type { Role } from "./role.js";
6
+ import type { ResolvedToolset } from "./toolset.js";
6
7
  import { type ResolvedSignInOptions, type SignInPolicy } from "./sign-in.js";
7
8
  /**
8
9
  * The manifest format this SDK writes. Readers accept any version and ignore unknown fields. Version
@@ -528,6 +529,62 @@ export declare const WorkflowManifest: Schema.Struct<{
528
529
  }>, Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
529
530
  }>;
530
531
  export type WorkflowManifest = typeof WorkflowManifest.Type;
532
+ /**
533
+ * A provider's MCP tools the ontology serves, `defineOntology({ toolsets })`: the connection's MCP
534
+ * API, each tool's declared access and fixed values, and the action the catalog serves it as, whose
535
+ * `connections` is the toolset's connection. A toolset has no records.
536
+ */
537
+ export declare const ToolsetManifest: Schema.Struct<{
538
+ readonly name: Schema.String;
539
+ readonly description: Schema.String;
540
+ readonly connection: Schema.String;
541
+ readonly api: Schema.String;
542
+ readonly tools: Schema.$Array<Schema.Struct<{
543
+ readonly name: Schema.String;
544
+ readonly access: Schema.Literals<readonly ["read", "write"]>;
545
+ readonly fixed: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>>;
546
+ }>>;
547
+ readonly actions: Schema.$Array<Schema.Struct<{
548
+ readonly name: Schema.String;
549
+ readonly description: Schema.String;
550
+ /**
551
+ * The permission a principal needs to run the action, for example `lead:changeStatus`. Always
552
+ * written; absent from version 1 manifests, where it reads as `<entity>:<action name>`.
553
+ */
554
+ readonly permission: Schema.optionalKey<Schema.String>;
555
+ /** JSON Schema (draft 2020-12) of the input object. */
556
+ readonly input: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
557
+ /** Opt-in SQL handler replay after a confirmed deadlock rollback; absent means disabled. */
558
+ readonly retryOnDeadlock: Schema.optionalKey<Schema.Boolean>;
559
+ /**
560
+ * The entities the handler writes, by name, as the action declares them; the runtime refuses any
561
+ * other write. Absent means it declares none and may write any entity; `[]` writes nothing.
562
+ */
563
+ readonly writes: Schema.optionalKey<Schema.$Array<Schema.String>>;
564
+ /**
565
+ * The keys of the workspace connections the action calls before its transaction. Written only
566
+ * when there are some; absent reads as none.
567
+ */
568
+ readonly connections: Schema.optionalKey<Schema.$Array<Schema.String>>;
569
+ /** File writes declared in code; absence grants preparation no staging targets. */
570
+ readonly files: Schema.optionalKey<Schema.$Array<Schema.Struct<{
571
+ readonly entity: Schema.String;
572
+ readonly property: Schema.String;
573
+ }>>>;
574
+ /**
575
+ * How the action behaves, as MCP tool annotations tell agents. Written only when the action
576
+ * declares hints; absent safety labels require agent confirmation for compatibility.
577
+ */
578
+ readonly hints: Schema.optionalKey<Schema.Struct<{
579
+ readonly readOnly: Schema.optionalKey<Schema.Boolean>;
580
+ readonly connectionsReadOnly: Schema.optionalKey<Schema.Boolean>;
581
+ readonly destructive: Schema.optionalKey<Schema.Boolean>;
582
+ readonly irreversible: Schema.optionalKey<Schema.Boolean>;
583
+ readonly idempotent: Schema.optionalKey<Schema.Boolean>;
584
+ }>>;
585
+ }>>;
586
+ }>;
587
+ export type ToolsetManifest = typeof ToolsetManifest.Type;
531
588
  /** A workspace connection the ontology's actions call, by its key in `connections/connections.py`. */
532
589
  export declare const ConnectionManifest: Schema.Struct<{
533
590
  readonly key: Schema.String;
@@ -959,6 +1016,60 @@ export declare const OntologyManifestWire: Schema.encodeKeys<Schema.Struct<{
959
1016
  readonly headers: Schema.optionalKey<Schema.$Array<Schema.String>>;
960
1017
  }>, Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
961
1018
  }>>>;
1019
+ /**
1020
+ * Provider MCP tools the ontology serves, within version 15. Written only when there are some;
1021
+ * absent reads as none, and older readers ignore it.
1022
+ */
1023
+ readonly toolsets: Schema.optionalKey<Schema.$Array<Schema.Struct<{
1024
+ readonly name: Schema.String;
1025
+ readonly description: Schema.String;
1026
+ readonly connection: Schema.String;
1027
+ readonly api: Schema.String;
1028
+ readonly tools: Schema.$Array<Schema.Struct<{
1029
+ readonly name: Schema.String;
1030
+ readonly access: Schema.Literals<readonly ["read", "write"]>;
1031
+ readonly fixed: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>>;
1032
+ }>>;
1033
+ readonly actions: Schema.$Array<Schema.Struct<{
1034
+ readonly name: Schema.String;
1035
+ readonly description: Schema.String;
1036
+ /**
1037
+ * The permission a principal needs to run the action, for example `lead:changeStatus`. Always
1038
+ * written; absent from version 1 manifests, where it reads as `<entity>:<action name>`.
1039
+ */
1040
+ readonly permission: Schema.optionalKey<Schema.String>;
1041
+ /** JSON Schema (draft 2020-12) of the input object. */
1042
+ readonly input: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
1043
+ /** Opt-in SQL handler replay after a confirmed deadlock rollback; absent means disabled. */
1044
+ readonly retryOnDeadlock: Schema.optionalKey<Schema.Boolean>;
1045
+ /**
1046
+ * The entities the handler writes, by name, as the action declares them; the runtime refuses any
1047
+ * other write. Absent means it declares none and may write any entity; `[]` writes nothing.
1048
+ */
1049
+ readonly writes: Schema.optionalKey<Schema.$Array<Schema.String>>;
1050
+ /**
1051
+ * The keys of the workspace connections the action calls before its transaction. Written only
1052
+ * when there are some; absent reads as none.
1053
+ */
1054
+ readonly connections: Schema.optionalKey<Schema.$Array<Schema.String>>;
1055
+ /** File writes declared in code; absence grants preparation no staging targets. */
1056
+ readonly files: Schema.optionalKey<Schema.$Array<Schema.Struct<{
1057
+ readonly entity: Schema.String;
1058
+ readonly property: Schema.String;
1059
+ }>>>;
1060
+ /**
1061
+ * How the action behaves, as MCP tool annotations tell agents. Written only when the action
1062
+ * declares hints; absent safety labels require agent confirmation for compatibility.
1063
+ */
1064
+ readonly hints: Schema.optionalKey<Schema.Struct<{
1065
+ readonly readOnly: Schema.optionalKey<Schema.Boolean>;
1066
+ readonly connectionsReadOnly: Schema.optionalKey<Schema.Boolean>;
1067
+ readonly destructive: Schema.optionalKey<Schema.Boolean>;
1068
+ readonly irreversible: Schema.optionalKey<Schema.Boolean>;
1069
+ readonly idempotent: Schema.optionalKey<Schema.Boolean>;
1070
+ }>>;
1071
+ }>>;
1072
+ }>>>;
962
1073
  }>, {
963
1074
  readonly signIn: "sign_in";
964
1075
  }>;
@@ -1200,6 +1311,41 @@ export declare const OntologyManifest: Schema.declareConstructor<{
1200
1311
  readonly footer?: string | undefined;
1201
1312
  };
1202
1313
  } | undefined;
1314
+ readonly toolsets?: readonly {
1315
+ readonly name: string;
1316
+ readonly description: string;
1317
+ readonly connection: string;
1318
+ readonly api: string;
1319
+ readonly tools: readonly {
1320
+ readonly name: string;
1321
+ readonly access: "read" | "write";
1322
+ readonly fixed: {
1323
+ readonly [x: string]: string | number | boolean;
1324
+ };
1325
+ }[];
1326
+ readonly actions: readonly {
1327
+ readonly name: string;
1328
+ readonly description: string;
1329
+ readonly input: {
1330
+ readonly [x: string]: Schema.Json;
1331
+ };
1332
+ readonly permission?: string | undefined;
1333
+ readonly retryOnDeadlock?: boolean | undefined;
1334
+ readonly writes?: readonly string[] | undefined;
1335
+ readonly connections?: readonly string[] | undefined;
1336
+ readonly files?: readonly {
1337
+ readonly entity: string;
1338
+ readonly property: string;
1339
+ }[] | undefined;
1340
+ readonly hints?: {
1341
+ readonly readOnly?: boolean | undefined;
1342
+ readonly connectionsReadOnly?: boolean | undefined;
1343
+ readonly destructive?: boolean | undefined;
1344
+ readonly irreversible?: boolean | undefined;
1345
+ readonly idempotent?: boolean | undefined;
1346
+ } | undefined;
1347
+ }[];
1348
+ }[] | undefined;
1203
1349
  } | {
1204
1350
  readonly version: number;
1205
1351
  readonly hash: string;
@@ -1433,6 +1579,41 @@ export declare const OntologyManifest: Schema.declareConstructor<{
1433
1579
  readonly footer?: string | undefined;
1434
1580
  };
1435
1581
  } | undefined;
1582
+ readonly toolsets?: readonly {
1583
+ readonly name: string;
1584
+ readonly description: string;
1585
+ readonly connection: string;
1586
+ readonly api: string;
1587
+ readonly tools: readonly {
1588
+ readonly name: string;
1589
+ readonly access: "read" | "write";
1590
+ readonly fixed: {
1591
+ readonly [x: string]: string | number | boolean;
1592
+ };
1593
+ }[];
1594
+ readonly actions: readonly {
1595
+ readonly name: string;
1596
+ readonly description: string;
1597
+ readonly input: {
1598
+ readonly [x: string]: Schema.Json;
1599
+ };
1600
+ readonly permission?: string | undefined;
1601
+ readonly retryOnDeadlock?: boolean | undefined;
1602
+ readonly writes?: readonly string[] | undefined;
1603
+ readonly connections?: readonly string[] | undefined;
1604
+ readonly files?: readonly {
1605
+ readonly entity: string;
1606
+ readonly property: string;
1607
+ }[] | undefined;
1608
+ readonly hints?: {
1609
+ readonly readOnly?: boolean | undefined;
1610
+ readonly connectionsReadOnly?: boolean | undefined;
1611
+ readonly destructive?: boolean | undefined;
1612
+ readonly irreversible?: boolean | undefined;
1613
+ readonly idempotent?: boolean | undefined;
1614
+ } | undefined;
1615
+ }[];
1616
+ }[] | undefined;
1436
1617
  }, {
1437
1618
  readonly version: number;
1438
1619
  readonly hash: string;
@@ -1644,6 +1825,41 @@ export declare const OntologyManifest: Schema.declareConstructor<{
1644
1825
  readonly reply_to?: string | undefined;
1645
1826
  };
1646
1827
  } | undefined;
1828
+ readonly toolsets?: readonly {
1829
+ readonly name: string;
1830
+ readonly description: string;
1831
+ readonly connection: string;
1832
+ readonly api: string;
1833
+ readonly tools: readonly {
1834
+ readonly name: string;
1835
+ readonly access: "read" | "write";
1836
+ readonly fixed: {
1837
+ readonly [x: string]: string | number | boolean;
1838
+ };
1839
+ }[];
1840
+ readonly actions: readonly {
1841
+ readonly name: string;
1842
+ readonly description: string;
1843
+ readonly input: {
1844
+ readonly [x: string]: Schema.Json;
1845
+ };
1846
+ readonly permission?: string | undefined;
1847
+ readonly retryOnDeadlock?: boolean | undefined;
1848
+ readonly writes?: readonly string[] | undefined;
1849
+ readonly connections?: readonly string[] | undefined;
1850
+ readonly files?: readonly {
1851
+ readonly entity: string;
1852
+ readonly property: string;
1853
+ }[] | undefined;
1854
+ readonly hints?: {
1855
+ readonly readOnly?: boolean | undefined;
1856
+ readonly connectionsReadOnly?: boolean | undefined;
1857
+ readonly destructive?: boolean | undefined;
1858
+ readonly irreversible?: boolean | undefined;
1859
+ readonly idempotent?: boolean | undefined;
1860
+ } | undefined;
1861
+ }[];
1862
+ }[] | undefined;
1647
1863
  readonly sign_in?: {
1648
1864
  readonly policy: string;
1649
1865
  readonly browser?: {
@@ -1899,6 +2115,41 @@ export declare const OntologyManifest: Schema.declareConstructor<{
1899
2115
  readonly reply_to?: string | undefined;
1900
2116
  };
1901
2117
  } | undefined;
2118
+ readonly toolsets?: readonly {
2119
+ readonly name: string;
2120
+ readonly description: string;
2121
+ readonly connection: string;
2122
+ readonly api: string;
2123
+ readonly tools: readonly {
2124
+ readonly name: string;
2125
+ readonly access: "read" | "write";
2126
+ readonly fixed: {
2127
+ readonly [x: string]: string | number | boolean;
2128
+ };
2129
+ }[];
2130
+ readonly actions: readonly {
2131
+ readonly name: string;
2132
+ readonly description: string;
2133
+ readonly input: {
2134
+ readonly [x: string]: Schema.Json;
2135
+ };
2136
+ readonly permission?: string | undefined;
2137
+ readonly retryOnDeadlock?: boolean | undefined;
2138
+ readonly writes?: readonly string[] | undefined;
2139
+ readonly connections?: readonly string[] | undefined;
2140
+ readonly files?: readonly {
2141
+ readonly entity: string;
2142
+ readonly property: string;
2143
+ }[] | undefined;
2144
+ readonly hints?: {
2145
+ readonly readOnly?: boolean | undefined;
2146
+ readonly connectionsReadOnly?: boolean | undefined;
2147
+ readonly destructive?: boolean | undefined;
2148
+ readonly irreversible?: boolean | undefined;
2149
+ readonly idempotent?: boolean | undefined;
2150
+ } | undefined;
2151
+ }[];
2152
+ }[] | undefined;
1902
2153
  }, readonly [Schema.Union<readonly [Schema.encodeKeys<Schema.Struct<{
1903
2154
  readonly entities: Schema.$Array<Schema.encodeKeys<Schema.Struct<{
1904
2155
  readonly metrics: Schema.optionalKey<Schema.$Array<Schema.encodeKeys<Schema.Struct<{
@@ -2204,6 +2455,60 @@ export declare const OntologyManifest: Schema.declareConstructor<{
2204
2455
  readonly headers: Schema.optionalKey<Schema.$Array<Schema.String>>;
2205
2456
  }>, Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
2206
2457
  }>>>;
2458
+ /**
2459
+ * Provider MCP tools the ontology serves, within version 15. Written only when there are some;
2460
+ * absent reads as none, and older readers ignore it.
2461
+ */
2462
+ readonly toolsets: Schema.optionalKey<Schema.$Array<Schema.Struct<{
2463
+ readonly name: Schema.String;
2464
+ readonly description: Schema.String;
2465
+ readonly connection: Schema.String;
2466
+ readonly api: Schema.String;
2467
+ readonly tools: Schema.$Array<Schema.Struct<{
2468
+ readonly name: Schema.String;
2469
+ readonly access: Schema.Literals<readonly ["read", "write"]>;
2470
+ readonly fixed: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>>;
2471
+ }>>;
2472
+ readonly actions: Schema.$Array<Schema.Struct<{
2473
+ readonly name: Schema.String;
2474
+ readonly description: Schema.String;
2475
+ /**
2476
+ * The permission a principal needs to run the action, for example `lead:changeStatus`. Always
2477
+ * written; absent from version 1 manifests, where it reads as `<entity>:<action name>`.
2478
+ */
2479
+ readonly permission: Schema.optionalKey<Schema.String>;
2480
+ /** JSON Schema (draft 2020-12) of the input object. */
2481
+ readonly input: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
2482
+ /** Opt-in SQL handler replay after a confirmed deadlock rollback; absent means disabled. */
2483
+ readonly retryOnDeadlock: Schema.optionalKey<Schema.Boolean>;
2484
+ /**
2485
+ * The entities the handler writes, by name, as the action declares them; the runtime refuses any
2486
+ * other write. Absent means it declares none and may write any entity; `[]` writes nothing.
2487
+ */
2488
+ readonly writes: Schema.optionalKey<Schema.$Array<Schema.String>>;
2489
+ /**
2490
+ * The keys of the workspace connections the action calls before its transaction. Written only
2491
+ * when there are some; absent reads as none.
2492
+ */
2493
+ readonly connections: Schema.optionalKey<Schema.$Array<Schema.String>>;
2494
+ /** File writes declared in code; absence grants preparation no staging targets. */
2495
+ readonly files: Schema.optionalKey<Schema.$Array<Schema.Struct<{
2496
+ readonly entity: Schema.String;
2497
+ readonly property: Schema.String;
2498
+ }>>>;
2499
+ /**
2500
+ * How the action behaves, as MCP tool annotations tell agents. Written only when the action
2501
+ * declares hints; absent safety labels require agent confirmation for compatibility.
2502
+ */
2503
+ readonly hints: Schema.optionalKey<Schema.Struct<{
2504
+ readonly readOnly: Schema.optionalKey<Schema.Boolean>;
2505
+ readonly connectionsReadOnly: Schema.optionalKey<Schema.Boolean>;
2506
+ readonly destructive: Schema.optionalKey<Schema.Boolean>;
2507
+ readonly irreversible: Schema.optionalKey<Schema.Boolean>;
2508
+ readonly idempotent: Schema.optionalKey<Schema.Boolean>;
2509
+ }>>;
2510
+ }>>;
2511
+ }>>>;
2207
2512
  }>, {
2208
2513
  readonly signIn: "sign_in";
2209
2514
  }>, Schema.Struct<{
@@ -2504,6 +2809,60 @@ export declare const OntologyManifest: Schema.declareConstructor<{
2504
2809
  readonly headers: Schema.optionalKey<Schema.$Array<Schema.String>>;
2505
2810
  }>, Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
2506
2811
  }>>>;
2812
+ /**
2813
+ * Provider MCP tools the ontology serves, within version 15. Written only when there are some;
2814
+ * absent reads as none, and older readers ignore it.
2815
+ */
2816
+ readonly toolsets: Schema.optionalKey<Schema.$Array<Schema.Struct<{
2817
+ readonly name: Schema.String;
2818
+ readonly description: Schema.String;
2819
+ readonly connection: Schema.String;
2820
+ readonly api: Schema.String;
2821
+ readonly tools: Schema.$Array<Schema.Struct<{
2822
+ readonly name: Schema.String;
2823
+ readonly access: Schema.Literals<readonly ["read", "write"]>;
2824
+ readonly fixed: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>>;
2825
+ }>>;
2826
+ readonly actions: Schema.$Array<Schema.Struct<{
2827
+ readonly name: Schema.String;
2828
+ readonly description: Schema.String;
2829
+ /**
2830
+ * The permission a principal needs to run the action, for example `lead:changeStatus`. Always
2831
+ * written; absent from version 1 manifests, where it reads as `<entity>:<action name>`.
2832
+ */
2833
+ readonly permission: Schema.optionalKey<Schema.String>;
2834
+ /** JSON Schema (draft 2020-12) of the input object. */
2835
+ readonly input: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
2836
+ /** Opt-in SQL handler replay after a confirmed deadlock rollback; absent means disabled. */
2837
+ readonly retryOnDeadlock: Schema.optionalKey<Schema.Boolean>;
2838
+ /**
2839
+ * The entities the handler writes, by name, as the action declares them; the runtime refuses any
2840
+ * other write. Absent means it declares none and may write any entity; `[]` writes nothing.
2841
+ */
2842
+ readonly writes: Schema.optionalKey<Schema.$Array<Schema.String>>;
2843
+ /**
2844
+ * The keys of the workspace connections the action calls before its transaction. Written only
2845
+ * when there are some; absent reads as none.
2846
+ */
2847
+ readonly connections: Schema.optionalKey<Schema.$Array<Schema.String>>;
2848
+ /** File writes declared in code; absence grants preparation no staging targets. */
2849
+ readonly files: Schema.optionalKey<Schema.$Array<Schema.Struct<{
2850
+ readonly entity: Schema.String;
2851
+ readonly property: Schema.String;
2852
+ }>>>;
2853
+ /**
2854
+ * How the action behaves, as MCP tool annotations tell agents. Written only when the action
2855
+ * declares hints; absent safety labels require agent confirmation for compatibility.
2856
+ */
2857
+ readonly hints: Schema.optionalKey<Schema.Struct<{
2858
+ readonly readOnly: Schema.optionalKey<Schema.Boolean>;
2859
+ readonly connectionsReadOnly: Schema.optionalKey<Schema.Boolean>;
2860
+ readonly destructive: Schema.optionalKey<Schema.Boolean>;
2861
+ readonly irreversible: Schema.optionalKey<Schema.Boolean>;
2862
+ readonly idempotent: Schema.optionalKey<Schema.Boolean>;
2863
+ }>>;
2864
+ }>>;
2865
+ }>>>;
2507
2866
  }>]>], {
2508
2867
  readonly version: number;
2509
2868
  readonly hash: string;
@@ -2737,6 +3096,41 @@ export declare const OntologyManifest: Schema.declareConstructor<{
2737
3096
  readonly footer?: string | undefined;
2738
3097
  };
2739
3098
  } | undefined;
3099
+ readonly toolsets?: readonly {
3100
+ readonly name: string;
3101
+ readonly description: string;
3102
+ readonly connection: string;
3103
+ readonly api: string;
3104
+ readonly tools: readonly {
3105
+ readonly name: string;
3106
+ readonly access: "read" | "write";
3107
+ readonly fixed: {
3108
+ readonly [x: string]: string | number | boolean;
3109
+ };
3110
+ }[];
3111
+ readonly actions: readonly {
3112
+ readonly name: string;
3113
+ readonly description: string;
3114
+ readonly input: {
3115
+ readonly [x: string]: Schema.Json;
3116
+ };
3117
+ readonly permission?: string | undefined;
3118
+ readonly retryOnDeadlock?: boolean | undefined;
3119
+ readonly writes?: readonly string[] | undefined;
3120
+ readonly connections?: readonly string[] | undefined;
3121
+ readonly files?: readonly {
3122
+ readonly entity: string;
3123
+ readonly property: string;
3124
+ }[] | undefined;
3125
+ readonly hints?: {
3126
+ readonly readOnly?: boolean | undefined;
3127
+ readonly connectionsReadOnly?: boolean | undefined;
3128
+ readonly destructive?: boolean | undefined;
3129
+ readonly irreversible?: boolean | undefined;
3130
+ readonly idempotent?: boolean | undefined;
3131
+ } | undefined;
3132
+ }[];
3133
+ }[] | undefined;
2740
3134
  } | {
2741
3135
  readonly version: number;
2742
3136
  readonly hash: string;
@@ -2970,6 +3364,41 @@ export declare const OntologyManifest: Schema.declareConstructor<{
2970
3364
  readonly footer?: string | undefined;
2971
3365
  };
2972
3366
  } | undefined;
3367
+ readonly toolsets?: readonly {
3368
+ readonly name: string;
3369
+ readonly description: string;
3370
+ readonly connection: string;
3371
+ readonly api: string;
3372
+ readonly tools: readonly {
3373
+ readonly name: string;
3374
+ readonly access: "read" | "write";
3375
+ readonly fixed: {
3376
+ readonly [x: string]: string | number | boolean;
3377
+ };
3378
+ }[];
3379
+ readonly actions: readonly {
3380
+ readonly name: string;
3381
+ readonly description: string;
3382
+ readonly input: {
3383
+ readonly [x: string]: Schema.Json;
3384
+ };
3385
+ readonly permission?: string | undefined;
3386
+ readonly retryOnDeadlock?: boolean | undefined;
3387
+ readonly writes?: readonly string[] | undefined;
3388
+ readonly connections?: readonly string[] | undefined;
3389
+ readonly files?: readonly {
3390
+ readonly entity: string;
3391
+ readonly property: string;
3392
+ }[] | undefined;
3393
+ readonly hints?: {
3394
+ readonly readOnly?: boolean | undefined;
3395
+ readonly connectionsReadOnly?: boolean | undefined;
3396
+ readonly destructive?: boolean | undefined;
3397
+ readonly irreversible?: boolean | undefined;
3398
+ readonly idempotent?: boolean | undefined;
3399
+ } | undefined;
3400
+ }[];
3401
+ }[] | undefined;
2973
3402
  }>;
2974
3403
  export type OntologyManifest = typeof OntologyManifest.Type;
2975
3404
  /**
@@ -3209,6 +3638,41 @@ export declare const decodeManifestDocument: (value: unknown) => Effect.Effect<{
3209
3638
  readonly footer?: string | undefined;
3210
3639
  };
3211
3640
  } | undefined;
3641
+ readonly toolsets?: readonly {
3642
+ readonly name: string;
3643
+ readonly description: string;
3644
+ readonly connection: string;
3645
+ readonly api: string;
3646
+ readonly tools: readonly {
3647
+ readonly name: string;
3648
+ readonly access: "read" | "write";
3649
+ readonly fixed: {
3650
+ readonly [x: string]: string | number | boolean;
3651
+ };
3652
+ }[];
3653
+ readonly actions: readonly {
3654
+ readonly name: string;
3655
+ readonly description: string;
3656
+ readonly input: {
3657
+ readonly [x: string]: Schema.Json;
3658
+ };
3659
+ readonly permission?: string | undefined;
3660
+ readonly retryOnDeadlock?: boolean | undefined;
3661
+ readonly writes?: readonly string[] | undefined;
3662
+ readonly connections?: readonly string[] | undefined;
3663
+ readonly files?: readonly {
3664
+ readonly entity: string;
3665
+ readonly property: string;
3666
+ }[] | undefined;
3667
+ readonly hints?: {
3668
+ readonly readOnly?: boolean | undefined;
3669
+ readonly connectionsReadOnly?: boolean | undefined;
3670
+ readonly destructive?: boolean | undefined;
3671
+ readonly irreversible?: boolean | undefined;
3672
+ readonly idempotent?: boolean | undefined;
3673
+ } | undefined;
3674
+ }[];
3675
+ }[] | undefined;
3212
3676
  } | {
3213
3677
  readonly version: number;
3214
3678
  readonly hash: string;
@@ -3442,6 +3906,41 @@ export declare const decodeManifestDocument: (value: unknown) => Effect.Effect<{
3442
3906
  readonly footer?: string | undefined;
3443
3907
  };
3444
3908
  } | undefined;
3909
+ readonly toolsets?: readonly {
3910
+ readonly name: string;
3911
+ readonly description: string;
3912
+ readonly connection: string;
3913
+ readonly api: string;
3914
+ readonly tools: readonly {
3915
+ readonly name: string;
3916
+ readonly access: "read" | "write";
3917
+ readonly fixed: {
3918
+ readonly [x: string]: string | number | boolean;
3919
+ };
3920
+ }[];
3921
+ readonly actions: readonly {
3922
+ readonly name: string;
3923
+ readonly description: string;
3924
+ readonly input: {
3925
+ readonly [x: string]: Schema.Json;
3926
+ };
3927
+ readonly permission?: string | undefined;
3928
+ readonly retryOnDeadlock?: boolean | undefined;
3929
+ readonly writes?: readonly string[] | undefined;
3930
+ readonly connections?: readonly string[] | undefined;
3931
+ readonly files?: readonly {
3932
+ readonly entity: string;
3933
+ readonly property: string;
3934
+ }[] | undefined;
3935
+ readonly hints?: {
3936
+ readonly readOnly?: boolean | undefined;
3937
+ readonly connectionsReadOnly?: boolean | undefined;
3938
+ readonly destructive?: boolean | undefined;
3939
+ readonly irreversible?: boolean | undefined;
3940
+ readonly idempotent?: boolean | undefined;
3941
+ } | undefined;
3942
+ }[];
3943
+ }[] | undefined;
3445
3944
  }, Schema.SchemaError, never>;
3446
3945
  /** Encode only ontology-owned metadata. JSON values and JSON Schema keywords remain opaque. */
3447
3946
  export declare function encodeManifest(manifest: OntologyManifest): Readonly<Record<string, unknown>>;
@@ -3495,6 +3994,10 @@ export declare function buildManifest(input: {
3495
3994
  readonly metrics?: ReadonlyArray<ModelMetricManifest>;
3496
3995
  /** The workflows, resolved to their manifest form. */
3497
3996
  readonly workflows?: ReadonlyArray<WorkflowManifest>;
3997
+ /** The toolsets that passed `check`. */
3998
+ readonly toolsets?: ReadonlyArray<ResolvedToolset>;
3498
3999
  }): OntologyManifest;
3499
- /** The keys of every connection the manifest's actions call, without duplicates. */
3500
- export declare function actionConnectionKeys(manifest: Pick<OntologyManifest, "entities">): Array<string>;
4000
+ /** A checked toolset as the manifest lists it: its tools, and the action each is served as. */
4001
+ export declare function toolsetManifest(resolved: ResolvedToolset): ToolsetManifest;
4002
+ /** The keys of every connection the manifest's actions and toolsets call, without duplicates. */
4003
+ export declare function actionConnectionKeys(manifest: Pick<OntologyManifest, "entities" | "toolsets">): Array<string>;