@mastra/factory 0.10.0-alpha.2 → 0.10.0-alpha.7

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 (65) hide show
  1. package/CHANGELOG.md +80 -0
  2. package/dist/factory.js +2 -2
  3. package/dist/integrations/github/rules.d.ts.map +1 -1
  4. package/dist/integrations/github/rules.js +193 -127
  5. package/dist/integrations/github/rules.js.map +1 -1
  6. package/dist/routes/attention.d.ts +17 -0
  7. package/dist/routes/attention.d.ts.map +1 -0
  8. package/dist/routes/attention.js +305 -0
  9. package/dist/routes/attention.js.map +1 -0
  10. package/dist/routes/surface.d.ts +2 -3
  11. package/dist/routes/surface.d.ts.map +1 -1
  12. package/dist/routes/surface.js +60 -43
  13. package/dist/routes/surface.js.map +1 -1
  14. package/dist/routes/work-items.d.ts.map +1 -1
  15. package/dist/routes/work-items.js +34 -13
  16. package/dist/routes/work-items.js.map +1 -1
  17. package/dist/rules/dispatch-errors.d.ts +13 -0
  18. package/dist/rules/dispatch-errors.d.ts.map +1 -0
  19. package/dist/rules/dispatch-errors.js +77 -0
  20. package/dist/rules/dispatch-errors.js.map +1 -0
  21. package/dist/rules/dispatcher.d.ts.map +1 -1
  22. package/dist/rules/dispatcher.js +60 -35
  23. package/dist/rules/dispatcher.js.map +1 -1
  24. package/dist/rules/processor.d.ts.map +1 -1
  25. package/dist/rules/processor.js +30 -14
  26. package/dist/rules/processor.js.map +1 -1
  27. package/dist/rules/terminal-cleanup.d.ts +1 -1
  28. package/dist/rules/terminal-cleanup.d.ts.map +1 -1
  29. package/dist/rules/terminal-cleanup.js +2 -2
  30. package/dist/rules/terminal-cleanup.js.map +1 -1
  31. package/dist/rules/transition-service.d.ts +2 -1
  32. package/dist/rules/transition-service.d.ts.map +1 -1
  33. package/dist/rules/transition-service.js +1 -1
  34. package/dist/rules/transition-service.js.map +1 -1
  35. package/dist/rules/types.d.ts +2 -0
  36. package/dist/rules/types.d.ts.map +1 -1
  37. package/dist/rules/types.js +9 -1
  38. package/dist/rules/types.js.map +1 -1
  39. package/dist/session/factory-session.d.ts +4 -0
  40. package/dist/session/factory-session.d.ts.map +1 -1
  41. package/dist/session/factory-session.js +10 -2
  42. package/dist/session/factory-session.js.map +1 -1
  43. package/dist/session/first-exec-capture.d.ts +16 -10
  44. package/dist/session/first-exec-capture.d.ts.map +1 -1
  45. package/dist/session/first-exec-capture.js +74 -14
  46. package/dist/session/first-exec-capture.js.map +1 -1
  47. package/dist/session/first-message-capture.d.ts +14 -10
  48. package/dist/session/first-message-capture.d.ts.map +1 -1
  49. package/dist/session/first-message-capture.js +17 -11
  50. package/dist/session/first-message-capture.js.map +1 -1
  51. package/dist/storage/domains/source-control/base.d.ts +3 -0
  52. package/dist/storage/domains/source-control/base.d.ts.map +1 -1
  53. package/dist/storage/domains/source-control/base.js +8 -2
  54. package/dist/storage/domains/source-control/base.js.map +1 -1
  55. package/dist/storage/domains/work-items/base.d.ts +101 -10
  56. package/dist/storage/domains/work-items/base.d.ts.map +1 -1
  57. package/dist/storage/domains/work-items/base.js +458 -35
  58. package/dist/storage/domains/work-items/base.js.map +1 -1
  59. package/dist/work-item-branch.d.ts +23 -0
  60. package/dist/work-item-branch.d.ts.map +1 -0
  61. package/dist/work-item-branch.js +39 -0
  62. package/dist/work-item-branch.js.map +1 -0
  63. package/factory-skills/factory-rereview/SKILL.md +2 -0
  64. package/factory-skills/factory-review/SKILL.md +2 -0
  65. package/package.json +7 -7
@@ -12,18 +12,24 @@ export interface FirstExecCaptureDependencies {
12
12
  };
13
13
  }
14
14
  /**
15
- * Record when a session's agent completed its first successful sandbox exec
16
- * (the TTFME anchor — "time to first meaningful exec").
15
+ * Record when a session's agent completed its first successful meaningful
16
+ * tool call (the TTFME anchor — "time to first meaningful exec").
17
17
  *
18
- * `command_exit` is emitted only for the agent's own foreground
19
- * `execute_command` tool calls: direct `sandbox.executeCommand()` calls from
20
- * the skill loader / preflight / materializer never flow through the tool, so
21
- * the first successful exit event is definitionally the agent's first
22
- * meaningful exec no command classifier needed. Background spawns emit no
23
- * exit event at spawn time and are intentionally excluded.
18
+ * Meaningful = a workspace tool the agent invoked itself (filesystem,
19
+ * search, code intelligence, sandbox exec, process control). We accept any
20
+ * tool whose name starts with the workspace prefix `mastra_workspace_` or
21
+ * matches the post-remap mastracode tool names. Non-workspace tools (memory,
22
+ * notification inbox, subagent, etc.) and skill-loader / preflight /
23
+ * materializer `sandbox.executeCommand()` calls that never flow through the
24
+ * tool layer are intentionally excluded.
24
25
  *
25
- * Failed commands (nonzero exit) don't count; the listener stays subscribed
26
- * until a successful exit, then unsubscribes. The storage write is guarded
26
+ * Failed tool calls (`isError === true`) don't count. Approval-denied and
27
+ * abort-while-parked tool completions (`denied === true`) also don't count:
28
+ * the run-engine emits `tool_end` with `isError: false` for those paths
29
+ * because the tool didn't fail, but it also never ran, so treating them as
30
+ * "meaningful exec" would re-introduce the same contamination this fix is
31
+ * removing on the message side. The listener stays subscribed until a
32
+ * successful qualifying end, then unsubscribes. The storage write is guarded
27
33
  * (`first_meaningful_exec_at IS NULL`), so restarts, re-materialized
28
34
  * sessions, and sessions without a source-control row are no-ops.
29
35
  */
@@ -1 +1 @@
1
- {"version":3,"file":"first-exec-capture.d.ts","sourceRoot":"","sources":["../../src/session/first-exec-capture.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAE1E,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AAE5F,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,QAAQ,EAAE;QAAE,aAAa,IAAI,MAAM,CAAA;KAAE,CAAC;IAC/C,SAAS,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,GAAG,MAAM,IAAI,CAAC;CACxE;AAED,MAAM,WAAW,4BAA4B;IAC3C,aAAa,EAAE;QACb,QAAQ,EAAE,IAAI,CAAC,0BAA0B,CAAC,UAAU,CAAC,EAAE,yBAAyB,CAAC,CAAC;KACnF,CAAC;CACH;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,uBAAuB,EAChC,EAAE,aAAa,EAAE,EAAE,4BAA4B,GAC9C,MAAM,IAAI,CAWZ"}
1
+ {"version":3,"file":"first-exec-capture.d.ts","sourceRoot":"","sources":["../../src/session/first-exec-capture.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAG1E,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AAE5F,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,QAAQ,EAAE;QAAE,aAAa,IAAI,MAAM,CAAA;KAAE,CAAC;IAC/C,SAAS,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,GAAG,MAAM,IAAI,CAAC;CACxE;AAED,MAAM,WAAW,4BAA4B;IAC3C,aAAa,EAAE;QACb,QAAQ,EAAE,IAAI,CAAC,0BAA0B,CAAC,UAAU,CAAC,EAAE,yBAAyB,CAAC,CAAC;KACnF,CAAC;CACH;AAmCD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,uBAAuB,EAChC,EAAE,aAAa,EAAE,EAAE,4BAA4B,GAC9C,MAAM,IAAI,CAoDZ"}
@@ -1,27 +1,87 @@
1
+ import { WORKSPACE_TOOLS_PREFIX } from "@mastra/core/workspace";
1
2
  //#region src/session/first-exec-capture.ts
2
3
  /**
3
- * Record when a session's agent completed its first successful sandbox exec
4
- * (the TTFME anchor "time to first meaningful exec").
4
+ * Tool names that count as "meaningful exec" independent of the workspace
5
+ * prefix. The workspace tools get remapped from `mastra_workspace_*` to
6
+ * mastracode-friendly names (see `mastracode/sdk/src/tool-names.ts`), and
7
+ * this listener runs on the emitted tool name after remap, so both spellings
8
+ * need to match.
9
+ */
10
+ const MEANINGFUL_TOOL_NAMES = /* @__PURE__ */ new Set([
11
+ "view",
12
+ "write_file",
13
+ "string_replace_lsp",
14
+ "find_files",
15
+ "delete_file",
16
+ "file_stat",
17
+ "mkdir",
18
+ "search_content",
19
+ "ast_smart_edit",
20
+ "lsp_inspect",
21
+ "execute_command",
22
+ "get_process_output",
23
+ "kill_process"
24
+ ]);
25
+ function isMeaningfulToolName(name) {
26
+ if (!name) return false;
27
+ if (name.startsWith(`${WORKSPACE_TOOLS_PREFIX}_`)) return true;
28
+ return MEANINGFUL_TOOL_NAMES.has(name);
29
+ }
30
+ /**
31
+ * Record when a session's agent completed its first successful meaningful
32
+ * tool call (the TTFME anchor — "time to first meaningful exec").
5
33
  *
6
- * `command_exit` is emitted only for the agent's own foreground
7
- * `execute_command` tool calls: direct `sandbox.executeCommand()` calls from
8
- * the skill loader / preflight / materializer never flow through the tool, so
9
- * the first successful exit event is definitionally the agent's first
10
- * meaningful exec no command classifier needed. Background spawns emit no
11
- * exit event at spawn time and are intentionally excluded.
34
+ * Meaningful = a workspace tool the agent invoked itself (filesystem,
35
+ * search, code intelligence, sandbox exec, process control). We accept any
36
+ * tool whose name starts with the workspace prefix `mastra_workspace_` or
37
+ * matches the post-remap mastracode tool names. Non-workspace tools (memory,
38
+ * notification inbox, subagent, etc.) and skill-loader / preflight /
39
+ * materializer `sandbox.executeCommand()` calls that never flow through the
40
+ * tool layer are intentionally excluded.
12
41
  *
13
- * Failed commands (nonzero exit) don't count; the listener stays subscribed
14
- * until a successful exit, then unsubscribes. The storage write is guarded
42
+ * Failed tool calls (`isError === true`) don't count. Approval-denied and
43
+ * abort-while-parked tool completions (`denied === true`) also don't count:
44
+ * the run-engine emits `tool_end` with `isError: false` for those paths
45
+ * because the tool didn't fail, but it also never ran, so treating them as
46
+ * "meaningful exec" would re-introduce the same contamination this fix is
47
+ * removing on the message side. The listener stays subscribed until a
48
+ * successful qualifying end, then unsubscribes. The storage write is guarded
15
49
  * (`first_meaningful_exec_at IS NULL`), so restarts, re-materialized
16
50
  * sessions, and sessions without a source-control row are no-ops.
17
51
  */
18
52
  function observeSessionFirstExec(session, { sourceControl }) {
19
53
  let seen = false;
54
+ const toolNames = /* @__PURE__ */ new Map();
55
+ const suspended = /* @__PURE__ */ new Set();
20
56
  const unsubscribe = session.subscribe((event) => {
21
- if (seen || event.type !== "command_exit" || !event.success) return;
22
- seen = true;
23
- unsubscribe();
24
- sourceControl.sessions.markFirstMeaningfulExec({ sessionId: session.identity.getResourceId() }).catch((error) => console.warn("[Factory first-exec capture] Unable to persist first exec time.", error));
57
+ if (seen) return;
58
+ switch (event.type) {
59
+ case "tool_start":
60
+ toolNames.set(event.toolCallId, event.toolName);
61
+ return;
62
+ case "tool_suspended":
63
+ suspended.add(event.toolCallId);
64
+ return;
65
+ case "tool_suspension_cancelled":
66
+ toolNames.delete(event.toolCallId);
67
+ suspended.delete(event.toolCallId);
68
+ return;
69
+ case "agent_end":
70
+ for (const id of toolNames.keys()) if (!suspended.has(id)) toolNames.delete(id);
71
+ return;
72
+ case "tool_end": {
73
+ const toolName = toolNames.get(event.toolCallId);
74
+ toolNames.delete(event.toolCallId);
75
+ suspended.delete(event.toolCallId);
76
+ if (event.isError) return;
77
+ if (event.denied) return;
78
+ if (!isMeaningfulToolName(toolName)) return;
79
+ seen = true;
80
+ unsubscribe();
81
+ sourceControl.sessions.markFirstMeaningfulExec({ sessionId: session.identity.getResourceId() }).catch((error) => console.warn("[Factory first-exec capture] Unable to persist first exec time.", error));
82
+ return;
83
+ }
84
+ }
25
85
  });
26
86
  return unsubscribe;
27
87
  }
@@ -1 +1 @@
1
- {"version":3,"file":"first-exec-capture.js","names":[],"sources":["../../src/session/first-exec-capture.ts"],"sourcesContent":["import type { AgentControllerEvent } from '@mastra/core/agent-controller';\n\nimport type { SourceControlStorageHandle } from '../storage/domains/source-control/base.js';\n\nexport interface FirstExecCaptureSession {\n readonly identity: { getResourceId(): string };\n subscribe(listener: (event: AgentControllerEvent) => void): () => void;\n}\n\nexport interface FirstExecCaptureDependencies {\n sourceControl: {\n sessions: Pick<SourceControlStorageHandle['sessions'], 'markFirstMeaningfulExec'>;\n };\n}\n\n/**\n * Record when a session's agent completed its first successful sandbox exec\n * (the TTFME anchor — \"time to first meaningful exec\").\n *\n * `command_exit` is emitted only for the agent's own foreground\n * `execute_command` tool calls: direct `sandbox.executeCommand()` calls from\n * the skill loader / preflight / materializer never flow through the tool, so\n * the first successful exit event is definitionally the agent's first\n * meaningful exec no command classifier needed. Background spawns emit no\n * exit event at spawn time and are intentionally excluded.\n *\n * Failed commands (nonzero exit) don't count; the listener stays subscribed\n * until a successful exit, then unsubscribes. The storage write is guarded\n * (`first_meaningful_exec_at IS NULL`), so restarts, re-materialized\n * sessions, and sessions without a source-control row are no-ops.\n */\nexport function observeSessionFirstExec(\n session: FirstExecCaptureSession,\n { sourceControl }: FirstExecCaptureDependencies,\n): () => void {\n let seen = false;\n const unsubscribe = session.subscribe(event => {\n if (seen || event.type !== 'command_exit' || !event.success) return;\n seen = true;\n unsubscribe();\n void sourceControl.sessions\n .markFirstMeaningfulExec({ sessionId: session.identity.getResourceId() })\n .catch(error => console.warn('[Factory first-exec capture] Unable to persist first exec time.', error));\n });\n return unsubscribe;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AA+BA,SAAgB,wBACd,SACA,EAAE,iBACU;CACZ,IAAI,OAAO;CACX,MAAM,cAAc,QAAQ,WAAU,UAAS;EAC7C,IAAI,QAAQ,MAAM,SAAS,kBAAkB,CAAC,MAAM,SAAS;EAC7D,OAAO;EACP,YAAY;EACZ,cAAmB,SAChB,wBAAwB,EAAE,WAAW,QAAQ,SAAS,cAAc,EAAE,CAAC,CAAC,CACxE,OAAM,UAAS,QAAQ,KAAK,mEAAmE,KAAK,CAAC;CAC1G,CAAC;CACD,OAAO;AACT"}
1
+ {"version":3,"file":"first-exec-capture.js","names":[],"sources":["../../src/session/first-exec-capture.ts"],"sourcesContent":["import type { AgentControllerEvent } from '@mastra/core/agent-controller';\nimport { WORKSPACE_TOOLS_PREFIX } from '@mastra/core/workspace';\n\nimport type { SourceControlStorageHandle } from '../storage/domains/source-control/base.js';\n\nexport interface FirstExecCaptureSession {\n readonly identity: { getResourceId(): string };\n subscribe(listener: (event: AgentControllerEvent) => void): () => void;\n}\n\nexport interface FirstExecCaptureDependencies {\n sourceControl: {\n sessions: Pick<SourceControlStorageHandle['sessions'], 'markFirstMeaningfulExec'>;\n };\n}\n\n/**\n * Tool names that count as \"meaningful exec\" independent of the workspace\n * prefix. The workspace tools get remapped from `mastra_workspace_*` to\n * mastracode-friendly names (see `mastracode/sdk/src/tool-names.ts`), and\n * this listener runs on the emitted tool name after remap, so both spellings\n * need to match.\n */\nconst MEANINGFUL_TOOL_NAMES: ReadonlySet<string> = new Set([\n // Filesystem (post-remap)\n 'view',\n 'write_file',\n 'string_replace_lsp',\n 'find_files',\n 'delete_file',\n 'file_stat',\n 'mkdir',\n // Search\n 'search_content',\n // Code intelligence\n 'ast_smart_edit',\n 'lsp_inspect',\n // Sandbox\n 'execute_command',\n 'get_process_output',\n 'kill_process',\n]);\n\nfunction isMeaningfulToolName(name: string | undefined): boolean {\n if (!name) return false;\n if (name.startsWith(`${WORKSPACE_TOOLS_PREFIX}_`)) return true;\n return MEANINGFUL_TOOL_NAMES.has(name);\n}\n\n/**\n * Record when a session's agent completed its first successful meaningful\n * tool call (the TTFME anchor — \"time to first meaningful exec\").\n *\n * Meaningful = a workspace tool the agent invoked itself (filesystem,\n * search, code intelligence, sandbox exec, process control). We accept any\n * tool whose name starts with the workspace prefix `mastra_workspace_` or\n * matches the post-remap mastracode tool names. Non-workspace tools (memory,\n * notification inbox, subagent, etc.) and skill-loader / preflight /\n * materializer `sandbox.executeCommand()` calls that never flow through the\n * tool layer are intentionally excluded.\n *\n * Failed tool calls (`isError === true`) don't count. Approval-denied and\n * abort-while-parked tool completions (`denied === true`) also don't count:\n * the run-engine emits `tool_end` with `isError: false` for those paths\n * because the tool didn't fail, but it also never ran, so treating them as\n * \"meaningful exec\" would re-introduce the same contamination this fix is\n * removing on the message side. The listener stays subscribed until a\n * successful qualifying end, then unsubscribes. The storage write is guarded\n * (`first_meaningful_exec_at IS NULL`), so restarts, re-materialized\n * sessions, and sessions without a source-control row are no-ops.\n */\nexport function observeSessionFirstExec(\n session: FirstExecCaptureSession,\n { sourceControl }: FirstExecCaptureDependencies,\n): () => void {\n let seen = false;\n // toolCallId -> toolName. Populated on `tool_start`, consumed on `tool_end`.\n // Suspended entries survive `agent_end` so the resumed run can still resolve\n // its tool name when the eventual `tool_end` arrives.\n const toolNames = new Map<string, string>();\n const suspended = new Set<string>();\n const unsubscribe = session.subscribe(event => {\n if (seen) return;\n switch (event.type) {\n case 'tool_start': {\n toolNames.set(event.toolCallId, event.toolName);\n return;\n }\n case 'tool_suspended': {\n suspended.add(event.toolCallId);\n return;\n }\n case 'tool_suspension_cancelled': {\n toolNames.delete(event.toolCallId);\n suspended.delete(event.toolCallId);\n return;\n }\n case 'agent_end': {\n // Drop any in-flight starts that will never see a matching `tool_end`\n // on this run. Genuinely suspended calls stay so their eventual\n // resume-time `tool_end` can still map back to a tool name. Without\n // this, sessions that repeatedly abort or error before a qualifying\n // completion would accumulate stale entries for the entire lifetime\n // of the subscription.\n for (const id of toolNames.keys()) {\n if (!suspended.has(id)) toolNames.delete(id);\n }\n return;\n }\n case 'tool_end': {\n const toolName = toolNames.get(event.toolCallId);\n toolNames.delete(event.toolCallId);\n suspended.delete(event.toolCallId);\n if (event.isError) return;\n if (event.denied) return;\n if (!isMeaningfulToolName(toolName)) return;\n seen = true;\n unsubscribe();\n void sourceControl.sessions\n .markFirstMeaningfulExec({ sessionId: session.identity.getResourceId() })\n .catch(error => console.warn('[Factory first-exec capture] Unable to persist first exec time.', error));\n return;\n }\n }\n });\n return unsubscribe;\n}\n"],"mappings":";;;;;;;;;AAuBA,MAAM,wCAA6C,IAAI,IAAI;CAEzD;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CAEA;CACA;CAEA;CACA;CACA;AACF,CAAC;AAED,SAAS,qBAAqB,MAAmC;CAC/D,IAAI,CAAC,MAAM,OAAO;CAClB,IAAI,KAAK,WAAW,GAAG,uBAAuB,EAAE,GAAG,OAAO;CAC1D,OAAO,sBAAsB,IAAI,IAAI;AACvC;;;;;;;;;;;;;;;;;;;;;;;AAwBA,SAAgB,wBACd,SACA,EAAE,iBACU;CACZ,IAAI,OAAO;CAIX,MAAM,4BAAY,IAAI,IAAoB;CAC1C,MAAM,4BAAY,IAAI,IAAY;CAClC,MAAM,cAAc,QAAQ,WAAU,UAAS;EAC7C,IAAI,MAAM;EACV,QAAQ,MAAM,MAAd;GACE,KAAK;IACH,UAAU,IAAI,MAAM,YAAY,MAAM,QAAQ;IAC9C;GAEF,KAAK;IACH,UAAU,IAAI,MAAM,UAAU;IAC9B;GAEF,KAAK;IACH,UAAU,OAAO,MAAM,UAAU;IACjC,UAAU,OAAO,MAAM,UAAU;IACjC;GAEF,KAAK;IAOH,KAAK,MAAM,MAAM,UAAU,KAAK,GAC9B,IAAI,CAAC,UAAU,IAAI,EAAE,GAAG,UAAU,OAAO,EAAE;IAE7C;GAEF,KAAK,YAAY;IACf,MAAM,WAAW,UAAU,IAAI,MAAM,UAAU;IAC/C,UAAU,OAAO,MAAM,UAAU;IACjC,UAAU,OAAO,MAAM,UAAU;IACjC,IAAI,MAAM,SAAS;IACnB,IAAI,MAAM,QAAQ;IAClB,IAAI,CAAC,qBAAqB,QAAQ,GAAG;IACrC,OAAO;IACP,YAAY;IACZ,cAAmB,SAChB,wBAAwB,EAAE,WAAW,QAAQ,SAAS,cAAc,EAAE,CAAC,CAAC,CACxE,OAAM,UAAS,QAAQ,KAAK,mEAAmE,KAAK,CAAC;IACxG;GACF;EACF;CACF,CAAC;CACD,OAAO;AACT"}
@@ -12,18 +12,22 @@ export interface FirstMessageCaptureDependencies {
12
12
  };
13
13
  }
14
14
  /**
15
- * Record when a session's agent first started working on a message.
15
+ * Record when a session's agent first produced an actual conversational
16
+ * message (the TTFI anchor — "time to first interaction").
16
17
  *
17
- * `agent_start` is the earliest reliable session event for "a message reached
18
- * the agent": it fires when the run engine begins processing an accepted
19
- * message a user's chat message, a factory run's kickoff prompt, or a
20
- * channel message for every session kind (user, work, review). The plain
21
- * user message itself is never emitted as a `message_start` event, so the run
22
- * start is the observable proxy, milliseconds after arrival.
18
+ * We stamp on the first `message_start` whose role is `user` or `assistant`.
19
+ * The coordinator writes `role='signal'` rows into the thread (skill loads,
20
+ * phase markers, memory reminders) before the model is ever invoked; those
21
+ * signals used to trigger a stamp via `agent_start`, giving every session
22
+ * including zero-message model-init failures a false TTFI of a few seconds.
23
+ * Gating on real conversational roles keeps the TTFI column honest: sessions
24
+ * that never produced a user or assistant message stay NULL and drop out of
25
+ * TTFI percentiles instead of contaminating them.
23
26
  *
24
- * The listener unsubscribes after the first event; the storage write is
25
- * guarded (`first_message_at IS NULL`), so restarts, re-materialized sessions,
26
- * and sessions without a source-control row (chat-only channels) are no-ops.
27
+ * The listener unsubscribes after the first qualifying message; the storage
28
+ * write is guarded (`first_message_at IS NULL`), so restarts, re-materialized
29
+ * sessions, and sessions without a source-control row (chat-only channels)
30
+ * are no-ops.
27
31
  */
28
32
  export declare function observeSessionFirstMessage(session: FirstMessageCaptureSession, { sourceControl }: FirstMessageCaptureDependencies): () => void;
29
33
  //# sourceMappingURL=first-message-capture.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"first-message-capture.d.ts","sourceRoot":"","sources":["../../src/session/first-message-capture.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAE1E,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AAE5F,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,QAAQ,EAAE;QAAE,aAAa,IAAI,MAAM,CAAA;KAAE,CAAC;IAC/C,SAAS,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,GAAG,MAAM,IAAI,CAAC;CACxE;AAED,MAAM,WAAW,+BAA+B;IAC9C,aAAa,EAAE;QACb,QAAQ,EAAE,IAAI,CAAC,0BAA0B,CAAC,UAAU,CAAC,EAAE,kBAAkB,CAAC,CAAC;KAC5E,CAAC;CACH;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,0BAA0B,EACnC,EAAE,aAAa,EAAE,EAAE,+BAA+B,GACjD,MAAM,IAAI,CAWZ"}
1
+ {"version":3,"file":"first-message-capture.d.ts","sourceRoot":"","sources":["../../src/session/first-message-capture.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAE1E,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AAE5F,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,QAAQ,EAAE;QAAE,aAAa,IAAI,MAAM,CAAA;KAAE,CAAC;IAC/C,SAAS,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,GAAG,MAAM,IAAI,CAAC;CACxE;AAED,MAAM,WAAW,+BAA+B;IAC9C,aAAa,EAAE;QACb,QAAQ,EAAE,IAAI,CAAC,0BAA0B,CAAC,UAAU,CAAC,EAAE,kBAAkB,CAAC,CAAC;KAC5E,CAAC;CACH;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,0BAA0B,EACnC,EAAE,aAAa,EAAE,EAAE,+BAA+B,GACjD,MAAM,IAAI,CAaZ"}
@@ -1,22 +1,28 @@
1
1
  //#region src/session/first-message-capture.ts
2
2
  /**
3
- * Record when a session's agent first started working on a message.
3
+ * Record when a session's agent first produced an actual conversational
4
+ * message (the TTFI anchor — "time to first interaction").
4
5
  *
5
- * `agent_start` is the earliest reliable session event for "a message reached
6
- * the agent": it fires when the run engine begins processing an accepted
7
- * message a user's chat message, a factory run's kickoff prompt, or a
8
- * channel message for every session kind (user, work, review). The plain
9
- * user message itself is never emitted as a `message_start` event, so the run
10
- * start is the observable proxy, milliseconds after arrival.
6
+ * We stamp on the first `message_start` whose role is `user` or `assistant`.
7
+ * The coordinator writes `role='signal'` rows into the thread (skill loads,
8
+ * phase markers, memory reminders) before the model is ever invoked; those
9
+ * signals used to trigger a stamp via `agent_start`, giving every session
10
+ * including zero-message model-init failures a false TTFI of a few seconds.
11
+ * Gating on real conversational roles keeps the TTFI column honest: sessions
12
+ * that never produced a user or assistant message stay NULL and drop out of
13
+ * TTFI percentiles instead of contaminating them.
11
14
  *
12
- * The listener unsubscribes after the first event; the storage write is
13
- * guarded (`first_message_at IS NULL`), so restarts, re-materialized sessions,
14
- * and sessions without a source-control row (chat-only channels) are no-ops.
15
+ * The listener unsubscribes after the first qualifying message; the storage
16
+ * write is guarded (`first_message_at IS NULL`), so restarts, re-materialized
17
+ * sessions, and sessions without a source-control row (chat-only channels)
18
+ * are no-ops.
15
19
  */
16
20
  function observeSessionFirstMessage(session, { sourceControl }) {
17
21
  let seen = false;
18
22
  const unsubscribe = session.subscribe((event) => {
19
- if (seen || event.type !== "agent_start") return;
23
+ if (seen || event.type !== "message_start") return;
24
+ const role = event.message.role;
25
+ if (role !== "user" && role !== "assistant") return;
20
26
  seen = true;
21
27
  unsubscribe();
22
28
  sourceControl.sessions.markFirstMessage({ sessionId: session.identity.getResourceId() }).catch((error) => console.warn("[Factory first-message capture] Unable to persist first message time.", error));
@@ -1 +1 @@
1
- {"version":3,"file":"first-message-capture.js","names":[],"sources":["../../src/session/first-message-capture.ts"],"sourcesContent":["import type { AgentControllerEvent } from '@mastra/core/agent-controller';\n\nimport type { SourceControlStorageHandle } from '../storage/domains/source-control/base.js';\n\nexport interface FirstMessageCaptureSession {\n readonly identity: { getResourceId(): string };\n subscribe(listener: (event: AgentControllerEvent) => void): () => void;\n}\n\nexport interface FirstMessageCaptureDependencies {\n sourceControl: {\n sessions: Pick<SourceControlStorageHandle['sessions'], 'markFirstMessage'>;\n };\n}\n\n/**\n * Record when a session's agent first started working on a message.\n *\n * `agent_start` is the earliest reliable session event for \"a message reached\n * the agent\": it fires when the run engine begins processing an accepted\n * message a user's chat message, a factory run's kickoff prompt, or a\n * channel message for every session kind (user, work, review). The plain\n * user message itself is never emitted as a `message_start` event, so the run\n * start is the observable proxy, milliseconds after arrival.\n *\n * The listener unsubscribes after the first event; the storage write is\n * guarded (`first_message_at IS NULL`), so restarts, re-materialized sessions,\n * and sessions without a source-control row (chat-only channels) are no-ops.\n */\nexport function observeSessionFirstMessage(\n session: FirstMessageCaptureSession,\n { sourceControl }: FirstMessageCaptureDependencies,\n): () => void {\n let seen = false;\n const unsubscribe = session.subscribe(event => {\n if (seen || event.type !== 'agent_start') return;\n seen = true;\n unsubscribe();\n void sourceControl.sessions\n .markFirstMessage({ sessionId: session.identity.getResourceId() })\n .catch(error => console.warn('[Factory first-message capture] Unable to persist first message time.', error));\n });\n return unsubscribe;\n}\n"],"mappings":";;;;;;;;;;;;;;;AA6BA,SAAgB,2BACd,SACA,EAAE,iBACU;CACZ,IAAI,OAAO;CACX,MAAM,cAAc,QAAQ,WAAU,UAAS;EAC7C,IAAI,QAAQ,MAAM,SAAS,eAAe;EAC1C,OAAO;EACP,YAAY;EACZ,cAAmB,SAChB,iBAAiB,EAAE,WAAW,QAAQ,SAAS,cAAc,EAAE,CAAC,CAAC,CACjE,OAAM,UAAS,QAAQ,KAAK,yEAAyE,KAAK,CAAC;CAChH,CAAC;CACD,OAAO;AACT"}
1
+ {"version":3,"file":"first-message-capture.js","names":[],"sources":["../../src/session/first-message-capture.ts"],"sourcesContent":["import type { AgentControllerEvent } from '@mastra/core/agent-controller';\n\nimport type { SourceControlStorageHandle } from '../storage/domains/source-control/base.js';\n\nexport interface FirstMessageCaptureSession {\n readonly identity: { getResourceId(): string };\n subscribe(listener: (event: AgentControllerEvent) => void): () => void;\n}\n\nexport interface FirstMessageCaptureDependencies {\n sourceControl: {\n sessions: Pick<SourceControlStorageHandle['sessions'], 'markFirstMessage'>;\n };\n}\n\n/**\n * Record when a session's agent first produced an actual conversational\n * message (the TTFI anchor — \"time to first interaction\").\n *\n * We stamp on the first `message_start` whose role is `user` or `assistant`.\n * The coordinator writes `role='signal'` rows into the thread (skill loads,\n * phase markers, memory reminders) before the model is ever invoked; those\n * signals used to trigger a stamp via `agent_start`, giving every session —\n * including zero-message model-init failures — a false TTFI of a few seconds.\n * Gating on real conversational roles keeps the TTFI column honest: sessions\n * that never produced a user or assistant message stay NULL and drop out of\n * TTFI percentiles instead of contaminating them.\n *\n * The listener unsubscribes after the first qualifying message; the storage\n * write is guarded (`first_message_at IS NULL`), so restarts, re-materialized\n * sessions, and sessions without a source-control row (chat-only channels)\n * are no-ops.\n */\nexport function observeSessionFirstMessage(\n session: FirstMessageCaptureSession,\n { sourceControl }: FirstMessageCaptureDependencies,\n): () => void {\n let seen = false;\n const unsubscribe = session.subscribe(event => {\n if (seen || event.type !== 'message_start') return;\n const role = event.message.role;\n if (role !== 'user' && role !== 'assistant') return;\n seen = true;\n unsubscribe();\n void sourceControl.sessions\n .markFirstMessage({ sessionId: session.identity.getResourceId() })\n .catch(error => console.warn('[Factory first-message capture] Unable to persist first message time.', error));\n });\n return unsubscribe;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAiCA,SAAgB,2BACd,SACA,EAAE,iBACU;CACZ,IAAI,OAAO;CACX,MAAM,cAAc,QAAQ,WAAU,UAAS;EAC7C,IAAI,QAAQ,MAAM,SAAS,iBAAiB;EAC5C,MAAM,OAAO,MAAM,QAAQ;EAC3B,IAAI,SAAS,UAAU,SAAS,aAAa;EAC7C,OAAO;EACP,YAAY;EACZ,cAAmB,SAChB,iBAAiB,EAAE,WAAW,QAAQ,SAAS,cAAc,EAAE,CAAC,CAAC,CACjE,OAAM,UAAS,QAAQ,KAAK,yEAAyE,KAAK,CAAC;CAChH,CAAC;CACD,OAAO;AACT"}
@@ -1,5 +1,8 @@
1
1
  import { FactoryStorageDomain } from '@mastra/core/storage';
2
2
  import type { CollectionSchema } from '@mastra/core/storage';
3
+ export declare class SourceControlConnectionNotFoundError extends Error {
4
+ constructor();
5
+ }
3
6
  export declare const SOURCE_CONTROL_SCHEMAS: CollectionSchema[];
4
7
  export type SourceControlProviderMetadata = Record<string, unknown>;
5
8
  export interface SourceControlInstallation {
@@ -1 +1 @@
1
- {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/source-control/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAwB,MAAM,sBAAsB,CAAC;AAClF,OAAO,KAAK,EAAE,gBAAgB,EAAqB,MAAM,sBAAsB,CAAC;AAYhF,eAAO,MAAM,sBAAsB,EAAE,gBAAgB,EA6LpD,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEpE,MAAM,WAAW,yBAAyB;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,gBAAgB,EAAE,6BAA6B,CAAC;IAChD,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,oCAAoC;IACnD,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,gBAAgB,CAAC,EAAE,6BAA6B,CAAC;CAClD;AAED,MAAM,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AAqB,SAAQ,oBAAoB;;IAKtD,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAIrB,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC;IAW1C,cAAc,CAAC,aAAa,EAAE,MAAM,GAAG,0BAA0B;CA6nBlE"}
@@ -9,6 +9,12 @@ const SANDBOXES = "source_control_project_repository_sandboxes";
9
9
  const SANDBOX_POOL = "source_control_sandbox_pool";
10
10
  const WORKTREES = "source_control_worktrees";
11
11
  const SESSIONS = "source_control_sessions";
12
+ var SourceControlConnectionNotFoundError = class extends Error {
13
+ constructor() {
14
+ super("Project source-control connection not found for this organization and integration.");
15
+ this.name = "SourceControlConnectionNotFoundError";
16
+ }
17
+ };
12
18
  const SOURCE_CONTROL_SCHEMAS = [
13
19
  {
14
20
  name: INSTALLATIONS,
@@ -422,7 +428,7 @@ var SourceControlStorage = class extends FactoryStorageDomain {
422
428
  };
423
429
  const requireConnection = async (args) => {
424
430
  const connection = await getConnection(args);
425
- if (!connection) throw new Error("Project source-control connection not found for this organization and integration.");
431
+ if (!connection) throw new SourceControlConnectionNotFoundError();
426
432
  return connection;
427
433
  };
428
434
  const getProjectRepository = async (args) => {
@@ -1011,6 +1017,6 @@ var SourceControlStorage = class extends FactoryStorageDomain {
1011
1017
  }
1012
1018
  };
1013
1019
  //#endregion
1014
- export { SOURCE_CONTROL_SCHEMAS, SourceControlStorage };
1020
+ export { SOURCE_CONTROL_SCHEMAS, SourceControlConnectionNotFoundError, SourceControlStorage };
1015
1021
 
1016
1022
  //# sourceMappingURL=base.js.map