aimeat 1.15.1 → 1.16.2

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 (52) hide show
  1. package/dist/locales/en.json +60 -1
  2. package/dist/locales/fi.json +60 -1
  3. package/dist/public/css/views/agents-detail.css +279 -0
  4. package/dist/public/js/services/agent-tasks.js +11 -0
  5. package/dist/public/js/services/agents.js +8 -0
  6. package/dist/public/views/profile/agents/agent-card.js +5 -1
  7. package/dist/public/views/profile/agents/rate-modal.js +87 -0
  8. package/dist/public/views/profile/agents/tab-quality.js +213 -0
  9. package/dist/public/views/profile/agents/tab-tasks.js +4 -2
  10. package/dist/public/views/profile/agents-tasks-subtab.js +134 -3
  11. package/dist/src/generated/api-types.d.ts +238 -3
  12. package/dist/src/generated/api-types.d.ts.map +1 -1
  13. package/dist/src/models/agent-task-schemas.d.ts +28 -0
  14. package/dist/src/models/agent-task-schemas.d.ts.map +1 -1
  15. package/dist/src/models/agent-task-schemas.js +21 -0
  16. package/dist/src/models/agent-task-schemas.js.map +1 -1
  17. package/dist/src/routes/agent-activity.d.ts +3 -0
  18. package/dist/src/routes/agent-activity.d.ts.map +1 -1
  19. package/dist/src/routes/agent-activity.js +44 -0
  20. package/dist/src/routes/agent-activity.js.map +1 -1
  21. package/dist/src/routes/agent-integration.d.ts.map +1 -1
  22. package/dist/src/routes/agent-integration.js +4 -0
  23. package/dist/src/routes/agent-integration.js.map +1 -1
  24. package/dist/src/routes/agent-tasks.d.ts +3 -0
  25. package/dist/src/routes/agent-tasks.d.ts.map +1 -1
  26. package/dist/src/routes/agent-tasks.js +91 -1
  27. package/dist/src/routes/agent-tasks.js.map +1 -1
  28. package/dist/src/routes/agents.d.ts.map +1 -1
  29. package/dist/src/routes/agents.js +35 -0
  30. package/dist/src/routes/agents.js.map +1 -1
  31. package/dist/src/services/agent-statistics.d.ts +80 -0
  32. package/dist/src/services/agent-statistics.d.ts.map +1 -0
  33. package/dist/src/services/agent-statistics.js +180 -0
  34. package/dist/src/services/agent-statistics.js.map +1 -0
  35. package/dist/src/storage/interface.d.ts +43 -1
  36. package/dist/src/storage/interface.d.ts.map +1 -1
  37. package/dist/src/storage/interface.js +2 -1
  38. package/dist/src/storage/interface.js.map +1 -1
  39. package/dist/src/storage/providers/mongodb/index.d.ts.map +1 -1
  40. package/dist/src/storage/providers/mongodb/index.js +5 -1
  41. package/dist/src/storage/providers/mongodb/index.js.map +1 -1
  42. package/dist/src/storage/providers/sqlite/index.d.ts.map +1 -1
  43. package/dist/src/storage/providers/sqlite/index.js +6 -4
  44. package/dist/src/storage/providers/sqlite/index.js.map +1 -1
  45. package/dist/src/storage/providers/sqlite/repos/agent-task.d.ts.map +1 -1
  46. package/dist/src/storage/providers/sqlite/repos/agent-task.js +6 -4
  47. package/dist/src/storage/providers/sqlite/repos/agent-task.js.map +1 -1
  48. package/dist/src/storage/providers/sqlite/schema.d.ts.map +1 -1
  49. package/dist/src/storage/providers/sqlite/schema.js +9 -1
  50. package/dist/src/storage/providers/sqlite/schema.js.map +1 -1
  51. package/package.json +1 -1
  52. package/prisma/schema.prisma +2 -0
@@ -624,6 +624,26 @@ export interface paths {
624
624
  patch?: never;
625
625
  trace?: never;
626
626
  };
627
+ "/v1/agents/{name}/max-concurrent-tasks": {
628
+ parameters: {
629
+ query?: never;
630
+ header?: never;
631
+ path?: never;
632
+ cookie?: never;
633
+ };
634
+ get?: never;
635
+ put?: never;
636
+ post?: never;
637
+ delete?: never;
638
+ options?: never;
639
+ head?: never;
640
+ /**
641
+ * Set how many tasks the agent's runner may process concurrently
642
+ * @description Owner sets `max_concurrent_tasks` (1–20, default 1) for an agent. 1 = serial (safe for any engine); higher values require a runner that can process tasks in parallel (e.g. a CrewAI daemon with a per-task liaison/worker pool). AIMEAT only stores and exposes the number — it does not enforce concurrency server-side. The runner reads it from the integration kit's `watchdog_spec.max_concurrent_tasks`.
643
+ */
644
+ patch: operations["updateAgentMaxConcurrentTasks"];
645
+ trace?: never;
646
+ };
627
647
  "/v1/agents/{name}/scopes": {
628
648
  parameters: {
629
649
  query?: never;
@@ -788,7 +808,10 @@ export interface paths {
788
808
  /** Update memory (optimistic locking) */
789
809
  put: operations["updateMemory"];
790
810
  post?: never;
791
- /** Delete memory */
811
+ /**
812
+ * Delete memory
813
+ * @description Delete a memory entry by key. Owner sessions may delete entries stored under any of their own agents — if the key is not found under the owner's GHII, the server looks it up across the owner's agents and deletes the match. Operators may delete any owner's entry by passing the `owner` query parameter.
814
+ */
792
815
  delete: operations["deleteMemory"];
793
816
  options?: never;
794
817
  head?: never;
@@ -7077,7 +7100,7 @@ export interface paths {
7077
7100
  put?: never;
7078
7101
  /**
7079
7102
  * Complete a task
7080
- * @description Mark an active task as done with an optional completion message.
7103
+ * @description Mark an active task as done with an optional completion message. The agent may also pass `deliverable_key` — the memory key (under its own namespace) where it published the task's output — which is stored on the task so the owner UI can link straight to the deliverable.
7081
7104
  */
7082
7105
  post: operations["completeAgentTask"];
7083
7106
  delete?: never;
@@ -7106,6 +7129,28 @@ export interface paths {
7106
7129
  patch?: never;
7107
7130
  trace?: never;
7108
7131
  };
7132
+ "/v1/agents/{name}/tasks/{id}/rate": {
7133
+ parameters: {
7134
+ query?: never;
7135
+ header?: never;
7136
+ path?: never;
7137
+ cookie?: never;
7138
+ };
7139
+ get?: never;
7140
+ put?: never;
7141
+ /**
7142
+ * Review a completed task's deliverable (Quality tab)
7143
+ * @description Attach a per-context star rating (1–5) to a **done** task. The `context` is the quality dimension (factual/creative/code/…). Authorization: the task's owner (human) or a same-owner agent (e.g. the parent orchestrator that delegated the work); an agent may not rate its own deliverable.
7144
+ *
7145
+ * **Source-grounding hard gate:** for the factual family (`factual`/`research`/`code`/`summarization`) an *agent* rater must set `source_grounded: true` (the rating was checked against the inputs/ sources), otherwise the request is rejected with `422 GROUNDING_REQUIRED`. Human owners are exempt; `creative` accepts an output-alone craft rating. The rating refreshes the agent's public statistics cache.
7146
+ */
7147
+ post: operations["rateAgentTask"];
7148
+ delete?: never;
7149
+ options?: never;
7150
+ head?: never;
7151
+ patch?: never;
7152
+ trace?: never;
7153
+ };
7109
7154
  "/v1/agents/{name}/tasks/{id}/todos/{todoId}": {
7110
7155
  parameters: {
7111
7156
  query?: never;
@@ -7379,6 +7424,26 @@ export interface paths {
7379
7424
  patch?: never;
7380
7425
  trace?: never;
7381
7426
  };
7427
+ "/v1/agents/{name}/statistics": {
7428
+ parameters: {
7429
+ query?: never;
7430
+ header?: never;
7431
+ path?: never;
7432
+ cookie?: never;
7433
+ };
7434
+ /**
7435
+ * Get agent quality statistics (Quality tab)
7436
+ * @description Recompute the agent's performance rollup (task counts, success rate, completion durations by context) and per-context peer-review rollup (stars, distribution, variance, low-confidence flag, rater mix, per-model slice) **from the agent's tasks** — the source of truth, so the result is not forgeable. The recomputed rollups are also written to the owner's public statistics cache keys (`agents.<name>.statistics.performance` / `.reviews`). Also returns any custom metrics the agent published under `agents.<name>.statistics.custom.*`. Owners can view any of their agents; an agent can view itself.
7437
+ */
7438
+ get: operations["getAgentStatistics"];
7439
+ put?: never;
7440
+ post?: never;
7441
+ delete?: never;
7442
+ options?: never;
7443
+ head?: never;
7444
+ patch?: never;
7445
+ trace?: never;
7446
+ };
7382
7447
  "/v1/agents/{name}/webhook": {
7383
7448
  parameters: {
7384
7449
  query?: never;
@@ -8032,6 +8097,11 @@ export interface components {
8032
8097
  tags?: string[];
8033
8098
  /** @description Time-to-live in hours (null = permanent) */
8034
8099
  ttl_hours?: number | null;
8100
+ /**
8101
+ * @description Owner-session only — target GAII to store this entry under one of the owner's own agents instead of the owner's GHII. Ignored for agent sessions. The agent must belong to the calling owner.
8102
+ * @example claude#alice@aimeat-fi-001-genesis
8103
+ */
8104
+ agent?: string;
8035
8105
  };
8036
8106
  MemoryEntry: {
8037
8107
  key?: string;
@@ -9412,6 +9482,32 @@ export interface components {
9412
9482
  createdAt: string;
9413
9483
  /** Format: date-time */
9414
9484
  updatedAt: string;
9485
+ /** @description Memory key (agent namespace) where the task's deliverable was published, if any. */
9486
+ deliverableKey?: string;
9487
+ rating?: components["schemas"]["AgentTaskRating"];
9488
+ };
9489
+ /** @description Peer/owner review of a completed task's deliverable (Quality tab). Feeds the per-context quality rollup from GET /v1/agents/{name}/statistics. */
9490
+ AgentTaskRating: {
9491
+ stars: number;
9492
+ /** @enum {string} */
9493
+ context: "factual" | "creative" | "code" | "planning" | "summarization" | "research" | "communication" | "other";
9494
+ comment?: string;
9495
+ /** @description GHII (owner) or GAII (agent) of the rater. */
9496
+ ratedBy: string;
9497
+ /** @enum {string} */
9498
+ raterType: "human-owner" | "agent" | "source-grounded-agent";
9499
+ /** @description Whether the rating was checked against the deliverable's inputs/sources. */
9500
+ sourceGrounded: boolean;
9501
+ /** @description Optional count of unsupported/fabricated claims. */
9502
+ unsupported?: number;
9503
+ /** @description Model that produced the deliverable (baseline stamp). */
9504
+ evaluatedModel?: string;
9505
+ /** @description Free-form evaluation context (temperature, tokens, cost, ...) stored for later slicing. */
9506
+ metadata?: {
9507
+ [key: string]: unknown;
9508
+ };
9509
+ /** Format: date-time */
9510
+ ratedAt: string;
9415
9511
  };
9416
9512
  TaskEvent: {
9417
9513
  /** @enum {string} */
@@ -10836,6 +10932,52 @@ export interface operations {
10836
10932
  404: components["responses"]["NotFound"];
10837
10933
  };
10838
10934
  };
10935
+ updateAgentMaxConcurrentTasks: {
10936
+ parameters: {
10937
+ query?: never;
10938
+ header?: never;
10939
+ path: {
10940
+ /** @description Agent name (not full GAII) */
10941
+ name: string;
10942
+ };
10943
+ cookie?: never;
10944
+ };
10945
+ requestBody: {
10946
+ content: {
10947
+ "application/json": {
10948
+ /** @default 1 */
10949
+ max_concurrent_tasks: number;
10950
+ };
10951
+ };
10952
+ };
10953
+ responses: {
10954
+ /** @description Concurrency updated */
10955
+ 200: {
10956
+ headers: {
10957
+ [name: string]: unknown;
10958
+ };
10959
+ content: {
10960
+ "application/json": components["schemas"]["AimeatEnvelope"] & {
10961
+ data?: {
10962
+ gaii?: string;
10963
+ name?: string;
10964
+ max_concurrent_tasks?: number;
10965
+ };
10966
+ };
10967
+ };
10968
+ };
10969
+ /** @description Invalid value (must be an integer 1–20). */
10970
+ 400: {
10971
+ headers: {
10972
+ [name: string]: unknown;
10973
+ };
10974
+ content?: never;
10975
+ };
10976
+ 401: components["responses"]["Unauthorized"];
10977
+ 403: components["responses"]["Forbidden"];
10978
+ 404: components["responses"]["NotFound"];
10979
+ };
10980
+ };
10839
10981
  updateAgentScopes: {
10840
10982
  parameters: {
10841
10983
  query?: never;
@@ -11210,7 +11352,10 @@ export interface operations {
11210
11352
  };
11211
11353
  deleteMemory: {
11212
11354
  parameters: {
11213
- query?: never;
11355
+ query?: {
11356
+ /** @description Operator-only override — target identity (GHII/GAII) whose memory entry should be deleted. Ignored for non-operator sessions. */
11357
+ owner?: string;
11358
+ };
11214
11359
  header?: never;
11215
11360
  path: {
11216
11361
  key: string;
@@ -11220,6 +11365,7 @@ export interface operations {
11220
11365
  requestBody?: never;
11221
11366
  responses: {
11222
11367
  200: components["responses"]["AimeatSuccess"];
11368
+ 404: components["responses"]["NotFound"];
11223
11369
  };
11224
11370
  };
11225
11371
  searchMemory: {
@@ -20912,6 +21058,8 @@ export interface operations {
20912
21058
  "application/json": {
20913
21059
  /** @description Completion summary */
20914
21060
  message?: string;
21061
+ /** @description Memory key (in the agent's namespace) holding the task's published deliverable. Stored on the task; the owner UI links to it and shows if the entry was later deleted. */
21062
+ deliverable_key?: string;
20915
21063
  };
20916
21064
  };
20917
21065
  };
@@ -20967,6 +21115,70 @@ export interface operations {
20967
21115
  409: components["responses"]["Conflict"];
20968
21116
  };
20969
21117
  };
21118
+ rateAgentTask: {
21119
+ parameters: {
21120
+ query?: never;
21121
+ header?: never;
21122
+ path: {
21123
+ name: string;
21124
+ id: string;
21125
+ };
21126
+ cookie?: never;
21127
+ };
21128
+ requestBody: {
21129
+ content: {
21130
+ "application/json": {
21131
+ /** @description Star rating, 1 (poor) to 5 (excellent). */
21132
+ stars: number;
21133
+ /**
21134
+ * @description Quality dimension this rating scores.
21135
+ * @enum {string}
21136
+ */
21137
+ context: "factual" | "creative" | "code" | "planning" | "summarization" | "research" | "communication" | "other";
21138
+ comment?: string;
21139
+ /**
21140
+ * @description Whether the rating was checked against the deliverable's inputs/sources. Required true for the factual family when the rater is an agent.
21141
+ * @default false
21142
+ */
21143
+ source_grounded?: boolean;
21144
+ /** @description Optional count of unsupported/fabricated claims (e.g. from a factcheck pass). */
21145
+ unsupported?: number;
21146
+ /** @description Model that produced the deliverable (baseline stamp; ratings are not compared blindly across model changes). */
21147
+ evaluated_model?: string;
21148
+ /** @description Free-form evaluation context (e.g. temperature, top_p, max_tokens, tokens_in/out, cost) stored on the rating for later slicing. Max 4096 bytes serialized. */
21149
+ metadata?: {
21150
+ [key: string]: unknown;
21151
+ };
21152
+ };
21153
+ };
21154
+ };
21155
+ responses: {
21156
+ /** @description Task rated */
21157
+ 200: {
21158
+ headers: {
21159
+ [name: string]: unknown;
21160
+ };
21161
+ content: {
21162
+ "application/json": components["schemas"]["AimeatEnvelope"] & {
21163
+ data?: components["schemas"]["AgentTask"];
21164
+ };
21165
+ };
21166
+ };
21167
+ 401: components["responses"]["Unauthorized"];
21168
+ 403: components["responses"]["Forbidden"];
21169
+ 404: components["responses"]["NotFound"];
21170
+ 409: components["responses"]["Conflict"];
21171
+ /** @description Source-grounding required for this context (GROUNDING_REQUIRED). */
21172
+ 422: {
21173
+ headers: {
21174
+ [name: string]: unknown;
21175
+ };
21176
+ content: {
21177
+ "application/json": components["schemas"]["AimeatEnvelope"];
21178
+ };
21179
+ };
21180
+ };
21181
+ };
20970
21182
  updateTaskTodo: {
20971
21183
  parameters: {
20972
21184
  query?: never;
@@ -21492,6 +21704,29 @@ export interface operations {
21492
21704
  404: components["responses"]["NotFound"];
21493
21705
  };
21494
21706
  };
21707
+ getAgentStatistics: {
21708
+ parameters: {
21709
+ query?: never;
21710
+ header?: never;
21711
+ path: {
21712
+ name: string;
21713
+ };
21714
+ cookie?: never;
21715
+ };
21716
+ requestBody?: never;
21717
+ responses: {
21718
+ /** @description Recomputed performance + review rollups and custom metrics */
21719
+ 200: {
21720
+ headers: {
21721
+ [name: string]: unknown;
21722
+ };
21723
+ content?: never;
21724
+ };
21725
+ 401: components["responses"]["Unauthorized"];
21726
+ 403: components["responses"]["Forbidden"];
21727
+ 404: components["responses"]["NotFound"];
21728
+ };
21729
+ };
21495
21730
  getAgentWebhook: {
21496
21731
  parameters: {
21497
21732
  query?: never;