aimeat 1.34.0 → 1.35.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 (58) hide show
  1. package/dist/locales/en.json +52 -4
  2. package/dist/locales/fi.json +52 -4
  3. package/dist/public/css/views/secretary.css +52 -0
  4. package/dist/public/js/i18n.js +9 -0
  5. package/dist/public/js/services/secretary-helpers.js +8 -4
  6. package/dist/public/js/services/secretary-policy.js +28 -3
  7. package/dist/public/views/profile/agents/agent-card.js +6 -4
  8. package/dist/public/views/profile/agents/tab-integration.js +5 -2
  9. package/dist/public/views/secretary/cards.js +46 -15
  10. package/dist/public/views/secretary/dashboard.js +68 -2
  11. package/dist/public/views/secretary.js +208 -40
  12. package/dist/src/cli/connect/mcp/tools/organisms.d.ts +2 -0
  13. package/dist/src/cli/connect/mcp/tools/organisms.d.ts.map +1 -1
  14. package/dist/src/cli/connect/mcp/tools/organisms.js +9 -1
  15. package/dist/src/cli/connect/mcp/tools/organisms.js.map +1 -1
  16. package/dist/src/cli/connect/onboarding-prompt.d.ts +3 -0
  17. package/dist/src/cli/connect/onboarding-prompt.d.ts.map +1 -1
  18. package/dist/src/cli/connect/onboarding-prompt.js +10 -3
  19. package/dist/src/cli/connect/onboarding-prompt.js.map +1 -1
  20. package/dist/src/generated/api-types.d.ts +309 -2
  21. package/dist/src/generated/api-types.d.ts.map +1 -1
  22. package/dist/src/mcp/agent-onboarding.d.ts +4 -0
  23. package/dist/src/mcp/agent-onboarding.d.ts.map +1 -1
  24. package/dist/src/mcp/agent-onboarding.js +28 -2
  25. package/dist/src/mcp/agent-onboarding.js.map +1 -1
  26. package/dist/src/models/agent-onboarding-schemas.d.ts +47 -0
  27. package/dist/src/models/agent-onboarding-schemas.d.ts.map +1 -1
  28. package/dist/src/models/agent-onboarding-schemas.js +117 -0
  29. package/dist/src/models/agent-onboarding-schemas.js.map +1 -1
  30. package/dist/src/routes/agent-onboarding.d.ts +5 -0
  31. package/dist/src/routes/agent-onboarding.d.ts.map +1 -1
  32. package/dist/src/routes/agent-onboarding.js +21 -2
  33. package/dist/src/routes/agent-onboarding.js.map +1 -1
  34. package/dist/src/routes/secretary.d.ts +7 -2
  35. package/dist/src/routes/secretary.d.ts.map +1 -1
  36. package/dist/src/routes/secretary.js +119 -28
  37. package/dist/src/routes/secretary.js.map +1 -1
  38. package/dist/src/services/onboarding-guide.d.ts +53 -0
  39. package/dist/src/services/onboarding-guide.d.ts.map +1 -0
  40. package/dist/src/services/onboarding-guide.js +81 -0
  41. package/dist/src/services/onboarding-guide.js.map +1 -0
  42. package/dist/src/services/scheduler.d.ts +9 -0
  43. package/dist/src/services/scheduler.d.ts.map +1 -1
  44. package/dist/src/services/scheduler.js +48 -23
  45. package/dist/src/services/scheduler.js.map +1 -1
  46. package/dist/src/services/secretary-workbrief.d.ts +144 -0
  47. package/dist/src/services/secretary-workbrief.d.ts.map +1 -0
  48. package/dist/src/services/secretary-workbrief.js +315 -0
  49. package/dist/src/services/secretary-workbrief.js.map +1 -0
  50. package/dist/src/services/secretary-worktier.d.ts +118 -0
  51. package/dist/src/services/secretary-worktier.d.ts.map +1 -0
  52. package/dist/src/services/secretary-worktier.js +157 -0
  53. package/dist/src/services/secretary-worktier.js.map +1 -0
  54. package/dist/src/services/skill-bundle/generator.d.ts +3 -0
  55. package/dist/src/services/skill-bundle/generator.d.ts.map +1 -1
  56. package/dist/src/services/skill-bundle/generator.js +19 -0
  57. package/dist/src/services/skill-bundle/generator.js.map +1 -1
  58. package/package.json +1 -1
@@ -7,6 +7,9 @@
7
7
  * them here -- not in the consumers.
8
8
  * @version-history
9
9
  * v1.0.0 -- 2026-05-28 -- Initial extraction from auth.ts/skill-bundle.ts duplication.
10
+ * v1.1.0 -- 2026-06-30 -- Add anti-fabrication rule (only five aimeat_onboarding_* tools exist;
11
+ * drive other steps via each step's howTo.tool from aimeat_onboarding_status;
12
+ * stop at summary.completable).
10
13
  */
11
14
  /** Canonical Hello Integration MCP tool sequence, in execution order. */
12
15
  export const HELLO_INTEGRATION_TOOL_SEQUENCE = [
@@ -34,9 +37,13 @@ export const HELLO_INTEGRATION_TOOL_SEQUENCE = [
34
37
  export function buildAgentOnboardingInstruction() {
35
38
  return `You are connected to AIMEAT through MCP in this runtime.
36
39
 
37
- Use the available AIMEAT tools now. Hello Integration is AIMEAT's required first-run onboarding handshake for every newly connected agent. The names below are MCP tools shown by your AI runtime; do not type them as terminal commands. Complete Hello Integration in this order:
40
+ Use the available AIMEAT tools now. Hello Integration is AIMEAT's required first-run onboarding handshake for every newly connected agent. The names below are MCP tools shown by your AI runtime; do not type them as terminal commands.
41
+
42
+ There are ONLY five aimeat_onboarding_* tools: aimeat_onboarding_status, aimeat_onboarding_identify_platform, aimeat_onboarding_confirm_skill_installed, aimeat_onboarding_confirm_directives_read, aimeat_onboarding_declare_services. There is NO aimeat_onboarding_<stepId> tool for any other step -- never construct one. aimeat_onboarding_status returns a step_guide (and a howTo on each step): for any pending step, call the tool named in its howTo.tool with howTo.args. Skip steps whose howTo.tool is null -- the server passes those automatically once you are active. Stop as soon as summary.completable is true (all required steps passed); the optional offers-ladder steps never block completion.
43
+
44
+ Complete Hello Integration in this order:
38
45
  1. Call aimeat_handbook_get and read the operating handbook.
39
- 2. Call aimeat_onboarding_status and follow its next-step hints.
46
+ 2. Call aimeat_onboarding_status and follow its step_guide / per-step howTo and next-step hints.
40
47
  3. Call aimeat_onboarding_identify_platform with your runtime/platform name.
41
48
  4. Call aimeat_onboarding_confirm_skill_installed after confirming the local skill bundle is available.
42
49
  5. Call aimeat_agent_capabilities_report with your useful capabilities.
@@ -46,7 +53,7 @@ Use the available AIMEAT tools now. Hello Integration is AIMEAT's required first
46
53
  9. Call aimeat_task_list and find the task named "Onboarding verification".
47
54
  10. Call aimeat_task_propose_todos with a short TODO plan for that task.
48
55
  11. Call aimeat_onboarding_status again. If the test task is active, use aimeat_task_event, aimeat_task_todo, and aimeat_task_complete to finish it.
49
- 12. Call aimeat_onboarding_status one final time and report any remaining pending step.
56
+ 12. Call aimeat_onboarding_status one final time. When summary.completable is true you are done; otherwise complete summary.next_required_step via its howTo.tool and re-check.
50
57
  13. After Hello Integration is complete, publish post-onboarding setup from SKILL.md:
51
58
  - Register your actual owner-facing slash commands at the memory key agents.{your-agent-name}.commands. Use a flat array of { name, description, category }. Include only commands you can really handle from AIMEAT Messages; do not copy examples or list internal MCP tools as message commands.
52
59
  - Publish actual runtime/config artifacts under agents.config.*. If this runtime only uses aimeat connect serve, describe that connector accurately; do not invent a watchdog file.
@@ -1 +1 @@
1
- {"version":3,"file":"onboarding-prompt.js","sourceRoot":"","sources":["../../../../src/cli/connect/onboarding-prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,yEAAyE;AACzE,MAAM,CAAC,MAAM,+BAA+B,GAA0B;IACpE,qBAAqB;IACrB,0BAA0B;IAC1B,qCAAqC;IACrC,2CAA2C;IAC3C,kCAAkC;IAClC,2CAA2C;IAC3C,qBAAqB;IACrB,+BAA+B;IAC/B,kBAAkB;IAClB,2BAA2B;IAC3B,0BAA0B;IAC1B,mBAAmB;IACnB,kBAAkB;IAClB,sBAAsB;IACtB,0BAA0B;CAC3B,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,+BAA+B;IAC7C,OAAO;;;;;;;;;;;;;;;;;;;;;+FAqBsF,CAAC;AAChG,CAAC"}
1
+ {"version":3,"file":"onboarding-prompt.js","sourceRoot":"","sources":["../../../../src/cli/connect/onboarding-prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,yEAAyE;AACzE,MAAM,CAAC,MAAM,+BAA+B,GAA0B;IACpE,qBAAqB;IACrB,0BAA0B;IAC1B,qCAAqC;IACrC,2CAA2C;IAC3C,kCAAkC;IAClC,2CAA2C;IAC3C,qBAAqB;IACrB,+BAA+B;IAC/B,kBAAkB;IAClB,2BAA2B;IAC3B,0BAA0B;IAC1B,mBAAmB;IACnB,kBAAkB;IAClB,sBAAsB;IACtB,0BAA0B;CAC3B,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,+BAA+B;IAC7C,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;+FAyBsF,CAAC;AAChG,CAAC"}
@@ -994,6 +994,86 @@ export interface paths {
994
994
  patch?: never;
995
995
  trace?: never;
996
996
  };
997
+ "/v1/secretary/brief": {
998
+ parameters: {
999
+ query?: never;
1000
+ header?: never;
1001
+ path?: never;
1002
+ cookie?: never;
1003
+ };
1004
+ get?: never;
1005
+ put?: never;
1006
+ /**
1007
+ * Propose grounded Work Briefs for the active context's structural gaps
1008
+ * @description The light-vs-heavy seam. The cheap node-local Secretary no longer authors content one-shot (that hallucinated). It detects STRUCTURAL gaps (empty/thin workspaces, stale content, off-target KPIs) and assembles a grounded Work Brief — Current picture + real Discovery sources + exact record schemas + the appdev MCP playbook — that a Builder (a connected big AI via the MCP tools) executes. Deterministic (no paid AI call), idempotent (deduped against open briefs by gap), additive (never touches content). Optional `ws` scopes to one workspace. Owner-only.
1009
+ */
1010
+ post: operations["secretaryBrief"];
1011
+ delete?: never;
1012
+ options?: never;
1013
+ head?: never;
1014
+ patch?: never;
1015
+ trace?: never;
1016
+ };
1017
+ "/v1/secretary/briefs": {
1018
+ parameters: {
1019
+ query?: never;
1020
+ header?: never;
1021
+ path?: never;
1022
+ cookie?: never;
1023
+ };
1024
+ /**
1025
+ * List the open Work Briefs (proposed/dispatched) for the brief tray
1026
+ * @description Owner-scoped private memory; includes the full brief markdown + MCP hints so the view renders without a second fetch. Owner-only.
1027
+ */
1028
+ get: operations["secretaryBriefsList"];
1029
+ put?: never;
1030
+ post?: never;
1031
+ delete?: never;
1032
+ options?: never;
1033
+ head?: never;
1034
+ patch?: never;
1035
+ trace?: never;
1036
+ };
1037
+ "/v1/secretary/brief/{id}/dispatch": {
1038
+ parameters: {
1039
+ query?: never;
1040
+ header?: never;
1041
+ path?: never;
1042
+ cookie?: never;
1043
+ };
1044
+ get?: never;
1045
+ put?: never;
1046
+ /**
1047
+ * Dispatch a Work Brief to a connected Builder (queue a task it runs via MCP)
1048
+ * @description Queues the brief as an agent task a connected Builder picks up and runs via the appdev MCP tools (lane b). The target must be one of THIS owner's connected agents and not the Secretary or a node-local specialist. Marks the brief 'dispatched'. Owner-only.
1049
+ */
1050
+ post: operations["secretaryBriefDispatch"];
1051
+ delete?: never;
1052
+ options?: never;
1053
+ head?: never;
1054
+ patch?: never;
1055
+ trace?: never;
1056
+ };
1057
+ "/v1/secretary/brief/{id}/done": {
1058
+ parameters: {
1059
+ query?: never;
1060
+ header?: never;
1061
+ path?: never;
1062
+ cookie?: never;
1063
+ };
1064
+ get?: never;
1065
+ put?: never;
1066
+ /**
1067
+ * Resolve a Work Brief (handled or no longer relevant)
1068
+ * @description Marks the brief 'done' so it leaves the tray and the tick won't re-propose the same gap. Owner-only.
1069
+ */
1070
+ post: operations["secretaryBriefDone"];
1071
+ delete?: never;
1072
+ options?: never;
1073
+ head?: never;
1074
+ patch?: never;
1075
+ trace?: never;
1076
+ };
997
1077
  "/v1/agents/device-authorize": {
998
1078
  parameters: {
999
1079
  query?: never;
@@ -13936,7 +14016,15 @@ export interface components {
13936
14016
  id?: string;
13937
14017
  order?: number;
13938
14018
  title?: string;
14019
+ /** @description Raw i18n key (agentOnboarding.stepDescriptions.{id}); see descriptionText for the resolved string. */
13939
14020
  description?: string;
14021
+ /**
14022
+ * @description Localised, human-readable resolution of `description`. Present on the GET /onboarding
14023
+ * and aimeat_onboarding_status payloads (REST resolves via Accept-Language; MCP uses the
14024
+ * node default locale). Added so connector/agent consumers without the i18n bundle never
14025
+ * see a raw key.
14026
+ */
14027
+ descriptionText?: string;
13940
14028
  /** @enum {string} */
13941
14029
  status?: "pending" | "passed" | "failed" | "skipped";
13942
14030
  required?: boolean;
@@ -13945,6 +14033,58 @@ export interface components {
13945
14033
  /** @enum {string} */
13946
14034
  validationMethod?: "automatic" | "api_call" | "owner_confirm";
13947
14035
  failureReason?: string;
14036
+ /** @description Machine-readable how-to-complete descriptor (null when the step id has no mapping). */
14037
+ howTo?: components["schemas"]["OnboardingStepHowTo"] | null;
14038
+ };
14039
+ /**
14040
+ * @description Authoritative machine-readable "how to complete this step" descriptor. A connector drives
14041
+ * each pending step from this (call `tool` with `args`) instead of fabricating a non-existent
14042
+ * `aimeat_onboarding_<stepId>` tool. The only onboarding-prefixed tools that exist are the five
14043
+ * aimeat_onboarding_* tools; every other step is completed by calling its mapped real tool.
14044
+ */
14045
+ OnboardingStepHowTo: {
14046
+ /**
14047
+ * @description Who performs the action -- the agent calls a tool, or the server validates passively.
14048
+ * @enum {string}
14049
+ */
14050
+ actor?: "agent" | "server";
14051
+ /** @description true when the server auto-ticks the step by reading real state (no dedicated confirm call). */
14052
+ automatic?: boolean;
14053
+ /** @description Mirrors `required` -- true when this step gates onboarding completion. */
14054
+ gatesCompletion?: boolean;
14055
+ /** @enum {string} */
14056
+ validationMethod?: "automatic" | "api_call" | "owner_confirm";
14057
+ /** @description Exact MCP tool to call, or null for passive/server steps. */
14058
+ tool?: string | null;
14059
+ /** @description Optional local-connector convenience tool with the same effect (e.g. aimeat_offers_publish). */
14060
+ toolAlias?: string;
14061
+ /** @description Underlying REST route for non-MCP clients; null for passive steps. */
14062
+ restEndpoint?: {
14063
+ /** @enum {string} */
14064
+ method?: "GET" | "POST" | "PUT" | "PATCH";
14065
+ path?: string;
14066
+ } | null;
14067
+ /** @description Copyable argument template. `{name}` is substituted server-side; `{test_task_id}` is filled from hints.test_task_id. */
14068
+ args?: {
14069
+ [key: string]: unknown;
14070
+ };
14071
+ /** @description For tool === null steps, the condition under which the server auto-passes the step. */
14072
+ passiveNote?: string;
14073
+ };
14074
+ /** @description Reachability summary. Completion gates only on required steps; optional steps never block. */
14075
+ OnboardingSummary: {
14076
+ required_total?: number;
14077
+ required_passed?: number;
14078
+ required_remaining?: number;
14079
+ optional_total?: number;
14080
+ optional_passed?: number;
14081
+ optional_remaining?: number;
14082
+ /** @description true once every required step has passed -- the agent can stop here. */
14083
+ completable?: boolean;
14084
+ /** @description First not-yet-passed required step id, or null when none remain. */
14085
+ next_required_step?: string | null;
14086
+ /** @description Ids of pending optional steps (never block completion). */
14087
+ optional_pending?: string[];
13948
14088
  };
13949
14089
  /** @description An opt-in budget/run guard on a schedule. type 'max_runs' or 'daily_limit' in v1. */
13950
14090
  ScheduleConstraint: {
@@ -16060,6 +16200,164 @@ export interface operations {
16060
16200
  };
16061
16201
  };
16062
16202
  };
16203
+ secretaryBrief: {
16204
+ parameters: {
16205
+ query?: never;
16206
+ header?: never;
16207
+ path?: never;
16208
+ cookie?: never;
16209
+ };
16210
+ requestBody?: {
16211
+ content: {
16212
+ "application/json": {
16213
+ /** @description Optional workspace id to scope the brief to. */
16214
+ ws?: string;
16215
+ };
16216
+ };
16217
+ };
16218
+ responses: {
16219
+ /** @description Work briefs proposed (0 when no new gaps) */
16220
+ 200: {
16221
+ headers: {
16222
+ [name: string]: unknown;
16223
+ };
16224
+ content: {
16225
+ "application/json": components["schemas"]["AimeatEnvelope"] & {
16226
+ data?: {
16227
+ proposed?: number;
16228
+ workspaces?: number;
16229
+ briefs?: {
16230
+ id?: string;
16231
+ objective?: string;
16232
+ ws?: string;
16233
+ wsName?: string;
16234
+ gaps?: number;
16235
+ /** @example proposed */
16236
+ status?: string;
16237
+ }[];
16238
+ };
16239
+ };
16240
+ };
16241
+ };
16242
+ /** @description No active Secretary context with an organism to brief (NO_CONTEXT) */
16243
+ 400: {
16244
+ headers: {
16245
+ [name: string]: unknown;
16246
+ };
16247
+ content?: never;
16248
+ };
16249
+ 401: components["responses"]["Unauthorized"];
16250
+ };
16251
+ };
16252
+ secretaryBriefsList: {
16253
+ parameters: {
16254
+ query?: never;
16255
+ header?: never;
16256
+ path?: never;
16257
+ cookie?: never;
16258
+ };
16259
+ requestBody?: never;
16260
+ responses: {
16261
+ /** @description Open Work Briefs, newest first */
16262
+ 200: {
16263
+ headers: {
16264
+ [name: string]: unknown;
16265
+ };
16266
+ content: {
16267
+ "application/json": components["schemas"]["AimeatEnvelope"] & {
16268
+ data?: {
16269
+ briefs?: Record<string, never>[];
16270
+ };
16271
+ };
16272
+ };
16273
+ };
16274
+ 401: components["responses"]["Unauthorized"];
16275
+ };
16276
+ };
16277
+ secretaryBriefDispatch: {
16278
+ parameters: {
16279
+ query?: never;
16280
+ header?: never;
16281
+ path: {
16282
+ id: string;
16283
+ };
16284
+ cookie?: never;
16285
+ };
16286
+ requestBody: {
16287
+ content: {
16288
+ "application/json": {
16289
+ /** @description The Builder agent GAII (or name) to dispatch to. */
16290
+ targetAgent: string;
16291
+ };
16292
+ };
16293
+ };
16294
+ responses: {
16295
+ /** @description Brief dispatched; task queued */
16296
+ 200: {
16297
+ headers: {
16298
+ [name: string]: unknown;
16299
+ };
16300
+ content: {
16301
+ "application/json": components["schemas"]["AimeatEnvelope"] & {
16302
+ data?: {
16303
+ dispatched?: boolean;
16304
+ taskId?: string;
16305
+ to?: string;
16306
+ };
16307
+ };
16308
+ };
16309
+ };
16310
+ /** @description Missing targetAgent, or the target is not a valid Builder (INVALID_TARGET) */
16311
+ 400: {
16312
+ headers: {
16313
+ [name: string]: unknown;
16314
+ };
16315
+ content?: never;
16316
+ };
16317
+ 401: components["responses"]["Unauthorized"];
16318
+ /** @description Work brief not found */
16319
+ 404: {
16320
+ headers: {
16321
+ [name: string]: unknown;
16322
+ };
16323
+ content?: never;
16324
+ };
16325
+ };
16326
+ };
16327
+ secretaryBriefDone: {
16328
+ parameters: {
16329
+ query?: never;
16330
+ header?: never;
16331
+ path: {
16332
+ id: string;
16333
+ };
16334
+ cookie?: never;
16335
+ };
16336
+ requestBody?: never;
16337
+ responses: {
16338
+ /** @description Brief resolved */
16339
+ 200: {
16340
+ headers: {
16341
+ [name: string]: unknown;
16342
+ };
16343
+ content: {
16344
+ "application/json": components["schemas"]["AimeatEnvelope"] & {
16345
+ data?: {
16346
+ done?: boolean;
16347
+ };
16348
+ };
16349
+ };
16350
+ };
16351
+ 401: components["responses"]["Unauthorized"];
16352
+ /** @description Work brief not found */
16353
+ 404: {
16354
+ headers: {
16355
+ [name: string]: unknown;
16356
+ };
16357
+ content?: never;
16358
+ };
16359
+ };
16360
+ };
16063
16361
  deviceAuthorize: {
16064
16362
  parameters: {
16065
16363
  query?: never;
@@ -33532,10 +33830,19 @@ export interface operations {
33532
33830
  "application/json": components["schemas"]["AimeatEnvelope"] & {
33533
33831
  data?: {
33534
33832
  onboarding: components["schemas"]["AgentOnboardingRecord"];
33833
+ /**
33834
+ * @description Flow-scoped map of stepId -> OnboardingStepHowTo for the steps in this
33835
+ * agent's onboarding flow. The authoritative how-to-complete contract a
33836
+ * connector drives from (call howTo.tool with howTo.args per pending step).
33837
+ */
33838
+ step_guide?: {
33839
+ [key: string]: components["schemas"]["OnboardingStepHowTo"];
33840
+ };
33841
+ summary?: components["schemas"]["OnboardingSummary"];
33535
33842
  /**
33536
33843
  * @description Next-step guidance for the agent. May include
33537
- * `next_step` (step id), `message` (human-readable),
33538
- * `test_task_id`, `test_task_active`.
33844
+ * `next_step` (step id; now prefers the next required step),
33845
+ * `message` (human-readable), `test_task_id`, `test_task_active`.
33539
33846
  */
33540
33847
  hints?: {
33541
33848
  [key: string]: unknown;