@mossbear/protocol 0.1.0-alpha.49 → 0.1.0-alpha.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/schemas.d.ts CHANGED
@@ -1290,7 +1290,7 @@ export declare const ContextItemVersionResponseSchema: v.ObjectSchema<{
1290
1290
  export declare const DEFAULT_VERSIONS_LIMIT = 50;
1291
1291
  export declare const MAX_VERSIONS_LIMIT = 200;
1292
1292
  export declare const ProposalCitationSchema: v.ObjectSchema<{
1293
- readonly sessionId: v.StringSchema<undefined>;
1293
+ readonly agentSessionId: v.StringSchema<undefined>;
1294
1294
  readonly timestamp: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1295
1295
  readonly summary: v.StringSchema<undefined>;
1296
1296
  }, undefined>;
@@ -1326,9 +1326,10 @@ export declare const ActionSkillLoadSchema: v.ObjectSchema<{
1326
1326
  * Deliberately **not** a member of `KNOWN_ACTION_TYPES` below, even though the
1327
1327
  * CLI emits it on purpose. A skill load is evidence about what was in the
1328
1328
  * agent's *context*, not a piece of work anyone should grade — it is an input to
1329
- * `inContextGuides`, never a row the grader judges (`gradeableActions.ts`
1330
- * filters it out). Keeping it out of the known-vocabulary list is what stops it
1331
- * being treated as gradeable work by anything that enumerates that list.
1329
+ * `inContextGuides`, never a row the grader judges — the dashboard's
1330
+ * gradeable-action filter excludes it. Keeping it out of the known-vocabulary
1331
+ * list is what stops it being treated as gradeable work by anything that
1332
+ * enumerates that list.
1332
1333
  */
1333
1334
  export declare const SKILL_LOAD_ACTION_TYPE = "skill_load";
1334
1335
  /**
@@ -1434,9 +1435,9 @@ export declare const TokenUsageSchema: v.ObjectSchema<{
1434
1435
  readonly cacheReadTokens: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
1435
1436
  readonly cacheWriteTokens: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
1436
1437
  }, undefined>;
1437
- export declare const DashboardRunUsageSchema: v.ObjectSchema<{
1438
- readonly runId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1439
- readonly sessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1438
+ export declare const DashboardSessionUsageSchema: v.ObjectSchema<{
1439
+ readonly sessionId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1440
+ readonly agentSessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1440
1441
  readonly usage: v.ArraySchema<v.ObjectSchema<{
1441
1442
  readonly model: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1442
1443
  readonly provider: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
@@ -1453,8 +1454,8 @@ export declare const SkillUsageEntrySchema: v.ObjectSchema<{
1453
1454
  readonly cacheWriteTokens: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
1454
1455
  }, undefined>;
1455
1456
  export declare const DashboardSkillUsageSchema: v.ObjectSchema<{
1456
- readonly runId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1457
- readonly sessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1457
+ readonly sessionId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1458
+ readonly agentSessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1458
1459
  readonly usage: v.ArraySchema<v.ObjectSchema<{
1459
1460
  readonly skillName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1460
1461
  readonly model: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
@@ -1464,7 +1465,7 @@ export declare const DashboardSkillUsageSchema: v.ObjectSchema<{
1464
1465
  }, undefined>;
1465
1466
  export declare const DashboardSyncActionSchema: v.ObjectSchema<{
1466
1467
  readonly id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, "id must not contain whitespace or control characters">]>, undefined>;
1467
- readonly runId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1468
+ readonly sessionId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1468
1469
  /**
1469
1470
  * Optional on the wire, but **required to be graded**: runs are the only
1470
1471
  * grading unit, and an action with no session joins no run.
@@ -1472,12 +1473,12 @@ export declare const DashboardSyncActionSchema: v.ObjectSchema<{
1472
1473
  * tightening it would 400 a whole batch — a poison pill for any queue file
1473
1474
  * carrying one — and no shipped CLI omits it: the hook always writes a
1474
1475
  * session id, falling back to the literal `'unknown'`
1475
- * (`packages/cli/src/hook-logger.ts:129`), which groups into a run like any
1476
+ * (`packages/cli/src/hook-logger.ts:364`), which groups into a run like any
1476
1477
  * other. A direct API caller that omits it gets its actions stored and
1477
1478
  * ungraded, and the server logs `sync.actions_without_session` so the case is
1478
1479
  * visible rather than silent.
1479
1480
  */
1480
- readonly sessionId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1481
+ readonly agentSessionId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1481
1482
  readonly actionType: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 128, undefined>]>;
1482
1483
  readonly summary: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 4000, undefined>]>;
1483
1484
  readonly filePaths: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 1024, undefined>]>, undefined>, v.MaxLengthAction<string[], 100, undefined>]>, undefined>;
@@ -1494,6 +1495,8 @@ export declare const DashboardSyncActionSchema: v.ObjectSchema<{
1494
1495
  [x: string]: unknown;
1495
1496
  }, "metadata.repoId must be repo_ followed by 32 hex chars">, v.CheckAction<{
1496
1497
  [x: string]: unknown;
1498
+ }, "metadata.projectId must be a project id (letters, digits, underscore, dot or hyphen)">, v.CheckAction<{
1499
+ [x: string]: unknown;
1497
1500
  }, "metadata.harness must be a known harness id">, v.CheckAction<{
1498
1501
  [x: string]: unknown;
1499
1502
  }, "metadata.outcome must be { status: \"ok\" | \"error\", errorClass?: string, exitCode?: number } with no other keys">]>, undefined>, undefined>;
@@ -1536,7 +1539,7 @@ export declare const DashboardGuideSuggestionSchema: v.ObjectSchema<{
1536
1539
  readonly reasoning: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1537
1540
  readonly triggerType: v.PicklistSchema<["uncovered", "ambiguous", "performance_pattern", "conversational_feedback"], undefined>;
1538
1541
  readonly sourceActionIds: v.OptionalSchema<v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.ObjectSchema<{
1539
- readonly sessionId: v.StringSchema<undefined>;
1542
+ readonly agentSessionId: v.StringSchema<undefined>;
1540
1543
  readonly timestamp: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1541
1544
  readonly summary: v.StringSchema<undefined>;
1542
1545
  }, undefined>], undefined>, undefined>, undefined>;
@@ -1672,7 +1675,7 @@ export declare const CommitAnchorSchema: v.ObjectSchema<{
1672
1675
  * rejected on the same line-initial fence. A separate declaration with the same
1673
1676
  * body would be two homes for one rule and would drift the first time either
1674
1677
  * moved. What differs is *which* prose and how much of it — the client's
1675
- * concern, decided in `extractRunSelfReport`, not the wire's.
1678
+ * concern, decided in `extractSessionSelfReport`, not the wire's.
1676
1679
  *
1677
1680
  * `minLength(1)` because absence has exactly one representation here: a run
1678
1681
  * with nothing to report omits the field. An empty string would be a second
@@ -1695,17 +1698,40 @@ export declare const CommitAnchorSchema: v.ObjectSchema<{
1695
1698
  * that attaches the report to the wrong batch cannot misattribute it, because
1696
1699
  * the writer matches on this field instead of trusting placement.
1697
1700
  */
1698
- export declare const RunSelfReportSchema: v.ObjectSchema<{
1701
+ export declare const SessionSelfReportSchema: v.ObjectSchema<{
1699
1702
  /** The session whose closing message this is. Must be one the request closes. */
1700
- readonly sessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1703
+ readonly agentSessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1701
1704
  /** The report itself — same content class and cap as narration. */
1702
1705
  readonly text: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>, v.CheckAction<string, "narration must not contain a code block — code is stripped structurally on the client before upload">]>, v.MinLengthAction<string, 1, undefined>]>;
1703
1706
  }, undefined>;
1704
- export type RunSelfReport = v.InferOutput<typeof RunSelfReportSchema>;
1707
+ export type SessionSelfReport = v.InferOutput<typeof SessionSelfReportSchema>;
1708
+ /**
1709
+ * The CLI entry point a sync came from, when that entry point is a hook.
1710
+ *
1711
+ * **One member on purpose.** `mossbear session-start` is the command
1712
+ * `mossbear init` registers as the `SessionStart` hook, and nothing else runs
1713
+ * it — so a request carrying this value is proof that the hooks a project was
1714
+ * set up with are firing, which is the one onboarding fact the dashboard could
1715
+ * not previously observe. The other two hooks (`Stop`, `SessionEnd`) both run
1716
+ * `mossbear sync`, which is also the command a person types by hand; their
1717
+ * requests are therefore indistinguishable from a manual sync and are
1718
+ * deliberately not named here rather than guessed at.
1719
+ *
1720
+ * Optional on the envelope, and its absence means only "not known to be a
1721
+ * session-start sync" — never "no hooks". A CLI predating this field sends
1722
+ * none, and so does every ordinary `mossbear sync`.
1723
+ *
1724
+ * A user can pass the flag that sets this by hand. That is not a privilege
1725
+ * boundary: the value is scoped to the caller's own account and the only thing
1726
+ * it can buy them is a more optimistic sentence on their own onboarding
1727
+ * screen.
1728
+ */
1729
+ export declare const SyncOriginSchema: v.PicklistSchema<["session-start"], undefined>;
1730
+ export type SyncOrigin = v.InferOutput<typeof SyncOriginSchema>;
1705
1731
  export declare const DashboardSyncRequestSchema: v.ObjectSchema<{
1706
1732
  readonly actions: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
1707
1733
  readonly id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, "id must not contain whitespace or control characters">]>, undefined>;
1708
- readonly runId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1734
+ readonly sessionId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1709
1735
  /**
1710
1736
  * Optional on the wire, but **required to be graded**: runs are the only
1711
1737
  * grading unit, and an action with no session joins no run.
@@ -1713,12 +1739,12 @@ export declare const DashboardSyncRequestSchema: v.ObjectSchema<{
1713
1739
  * tightening it would 400 a whole batch — a poison pill for any queue file
1714
1740
  * carrying one — and no shipped CLI omits it: the hook always writes a
1715
1741
  * session id, falling back to the literal `'unknown'`
1716
- * (`packages/cli/src/hook-logger.ts:129`), which groups into a run like any
1742
+ * (`packages/cli/src/hook-logger.ts:364`), which groups into a run like any
1717
1743
  * other. A direct API caller that omits it gets its actions stored and
1718
1744
  * ungraded, and the server logs `sync.actions_without_session` so the case is
1719
1745
  * visible rather than silent.
1720
1746
  */
1721
- readonly sessionId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1747
+ readonly agentSessionId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1722
1748
  readonly actionType: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 128, undefined>]>;
1723
1749
  readonly summary: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 4000, undefined>]>;
1724
1750
  readonly filePaths: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 1024, undefined>]>, undefined>, v.MaxLengthAction<string[], 100, undefined>]>, undefined>;
@@ -1735,6 +1761,8 @@ export declare const DashboardSyncRequestSchema: v.ObjectSchema<{
1735
1761
  [x: string]: unknown;
1736
1762
  }, "metadata.repoId must be repo_ followed by 32 hex chars">, v.CheckAction<{
1737
1763
  [x: string]: unknown;
1764
+ }, "metadata.projectId must be a project id (letters, digits, underscore, dot or hyphen)">, v.CheckAction<{
1765
+ [x: string]: unknown;
1738
1766
  }, "metadata.harness must be a known harness id">, v.CheckAction<{
1739
1767
  [x: string]: unknown;
1740
1768
  }, "metadata.outcome must be { status: \"ok\" | \"error\", errorClass?: string, exitCode?: number } with no other keys">]>, undefined>, undefined>;
@@ -1772,8 +1800,8 @@ export declare const DashboardSyncRequestSchema: v.ObjectSchema<{
1772
1800
  }, undefined>, undefined>;
1773
1801
  }, undefined>, undefined>, v.MaxLengthAction<{
1774
1802
  id?: string | undefined;
1775
- runId?: string | undefined;
1776
1803
  sessionId?: string | undefined;
1804
+ agentSessionId?: string | undefined;
1777
1805
  actionType: string;
1778
1806
  summary: string;
1779
1807
  filePaths?: string[] | undefined;
@@ -1796,7 +1824,7 @@ export declare const DashboardSyncRequestSchema: v.ObjectSchema<{
1796
1824
  readonly reasoning: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1797
1825
  readonly triggerType: v.PicklistSchema<["uncovered", "ambiguous", "performance_pattern", "conversational_feedback"], undefined>;
1798
1826
  readonly sourceActionIds: v.OptionalSchema<v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.ObjectSchema<{
1799
- readonly sessionId: v.StringSchema<undefined>;
1827
+ readonly agentSessionId: v.StringSchema<undefined>;
1800
1828
  readonly timestamp: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1801
1829
  readonly summary: v.StringSchema<undefined>;
1802
1830
  }, undefined>], undefined>, undefined>, undefined>;
@@ -1807,7 +1835,7 @@ export declare const DashboardSyncRequestSchema: v.ObjectSchema<{
1807
1835
  reasoning?: string | undefined;
1808
1836
  triggerType: "uncovered" | "ambiguous" | "performance_pattern" | "conversational_feedback";
1809
1837
  sourceActionIds?: (string | {
1810
- sessionId: string;
1838
+ agentSessionId: string;
1811
1839
  timestamp?: string | undefined;
1812
1840
  summary: string;
1813
1841
  })[] | undefined;
@@ -1829,8 +1857,8 @@ export declare const DashboardSyncRequestSchema: v.ObjectSchema<{
1829
1857
  status?: "dismissed" | "inferred" | "confirmed" | undefined;
1830
1858
  }[], 100, undefined>]>, undefined>;
1831
1859
  readonly runUsage: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
1832
- readonly runId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1833
- readonly sessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1860
+ readonly sessionId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1861
+ readonly agentSessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1834
1862
  readonly usage: v.ArraySchema<v.ObjectSchema<{
1835
1863
  readonly model: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1836
1864
  readonly provider: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
@@ -1840,8 +1868,8 @@ export declare const DashboardSyncRequestSchema: v.ObjectSchema<{
1840
1868
  readonly cacheWriteTokens: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
1841
1869
  }, undefined>, undefined>;
1842
1870
  }, undefined>, undefined>, v.MaxLengthAction<{
1843
- runId?: string | undefined;
1844
- sessionId: string;
1871
+ sessionId?: string | undefined;
1872
+ agentSessionId: string;
1845
1873
  usage: {
1846
1874
  model: string;
1847
1875
  provider?: string | undefined;
@@ -1852,8 +1880,8 @@ export declare const DashboardSyncRequestSchema: v.ObjectSchema<{
1852
1880
  }[];
1853
1881
  }[], 100, undefined>]>, undefined>;
1854
1882
  readonly skillUsage: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
1855
- readonly runId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1856
- readonly sessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1883
+ readonly sessionId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1884
+ readonly agentSessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1857
1885
  readonly usage: v.ArraySchema<v.ObjectSchema<{
1858
1886
  readonly skillName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1859
1887
  readonly model: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
@@ -1861,8 +1889,8 @@ export declare const DashboardSyncRequestSchema: v.ObjectSchema<{
1861
1889
  readonly cacheWriteTokens: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
1862
1890
  }, undefined>, undefined>;
1863
1891
  }, undefined>, undefined>, v.MaxLengthAction<{
1864
- runId?: string | undefined;
1865
- sessionId: string;
1892
+ sessionId?: string | undefined;
1893
+ agentSessionId: string;
1866
1894
  usage: {
1867
1895
  skillName: string;
1868
1896
  model: string;
@@ -1970,7 +1998,7 @@ export declare const DashboardSyncRequestSchema: v.ObjectSchema<{
1970
1998
  }, undefined>, undefined>;
1971
1999
  /**
1972
2000
  * What the agent said it did, as its own closing message — see
1973
- * {@link RunSelfReportSchema}.
2001
+ * {@link SessionSelfReportSchema}.
1974
2002
  *
1975
2003
  * Rides the same batches as `commitAnchor` and for the same reason: it
1976
2004
  * describes the *session that just ended*, and the ordinary `SessionEnd`
@@ -1985,10 +2013,16 @@ export declare const DashboardSyncRequestSchema: v.ObjectSchema<{
1985
2013
  */
1986
2014
  readonly selfReport: v.OptionalSchema<v.ObjectSchema<{
1987
2015
  /** The session whose closing message this is. Must be one the request closes. */
1988
- readonly sessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
2016
+ readonly agentSessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1989
2017
  /** The report itself — same content class and cap as narration. */
1990
2018
  readonly text: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>, v.CheckAction<string, "narration must not contain a code block — code is stripped structurally on the client before upload">]>, v.MinLengthAction<string, 1, undefined>]>;
1991
2019
  }, undefined>, undefined>;
2020
+ /**
2021
+ * Which of the CLI's entry points sent this request, named only when the
2022
+ * entry point is one an agent harness invokes rather than one a person types
2023
+ * — see {@link SyncOriginSchema}.
2024
+ */
2025
+ readonly origin: v.OptionalSchema<v.PicklistSchema<["session-start"], undefined>, undefined>;
1992
2026
  }, undefined>;
1993
2027
  export declare const ExtractedGuideSuggestionSchema: v.ObjectSchema<{
1994
2028
  readonly id: v.StringSchema<undefined>;
@@ -1998,7 +2032,7 @@ export declare const ExtractedGuideSuggestionSchema: v.ObjectSchema<{
1998
2032
  readonly confidence: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>;
1999
2033
  readonly occurrences: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
2000
2034
  readonly citations: v.ArraySchema<v.ObjectSchema<{
2001
- readonly sessionId: v.StringSchema<undefined>;
2035
+ readonly agentSessionId: v.StringSchema<undefined>;
2002
2036
  readonly timestamp: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2003
2037
  readonly summary: v.StringSchema<undefined>;
2004
2038
  }, undefined>, undefined>;
@@ -2010,7 +2044,7 @@ export declare const ExtractedSkillSuggestionSchema: v.ObjectSchema<{
2010
2044
  readonly confidence: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>;
2011
2045
  readonly occurrences: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
2012
2046
  readonly citations: v.ArraySchema<v.ObjectSchema<{
2013
- readonly sessionId: v.StringSchema<undefined>;
2047
+ readonly agentSessionId: v.StringSchema<undefined>;
2014
2048
  readonly timestamp: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2015
2049
  readonly summary: v.StringSchema<undefined>;
2016
2050
  }, undefined>, undefined>;
@@ -2025,7 +2059,7 @@ export declare const ExtractedFeedbackBatchSchema: v.ObjectSchema<{
2025
2059
  readonly confidence: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>;
2026
2060
  readonly occurrences: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
2027
2061
  readonly citations: v.ArraySchema<v.ObjectSchema<{
2028
- readonly sessionId: v.StringSchema<undefined>;
2062
+ readonly agentSessionId: v.StringSchema<undefined>;
2029
2063
  readonly timestamp: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2030
2064
  readonly summary: v.StringSchema<undefined>;
2031
2065
  }, undefined>, undefined>;
@@ -2037,7 +2071,7 @@ export declare const ExtractedFeedbackBatchSchema: v.ObjectSchema<{
2037
2071
  readonly confidence: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>;
2038
2072
  readonly occurrences: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
2039
2073
  readonly citations: v.ArraySchema<v.ObjectSchema<{
2040
- readonly sessionId: v.StringSchema<undefined>;
2074
+ readonly agentSessionId: v.StringSchema<undefined>;
2041
2075
  readonly timestamp: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2042
2076
  readonly summary: v.StringSchema<undefined>;
2043
2077
  }, undefined>, undefined>;
@@ -2062,12 +2096,12 @@ export declare const ActionEntrySchema: v.ObjectSchema<{
2062
2096
  * adjacency cannot do once one assistant message emits several tool calls.
2063
2097
  *
2064
2098
  * Optional because run logs written before this field existed must stay
2065
- * readable. Sync derives an id for those from `(sessionId, line index)`; see
2099
+ * readable. Sync derives an id for those from `(agentSessionId, line index)`; see
2066
2100
  * `deriveLegacyActionId`.
2067
2101
  */
2068
2102
  readonly id: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2069
2103
  readonly timestamp: v.StringSchema<undefined>;
2070
- readonly sessionId: v.StringSchema<undefined>;
2104
+ readonly agentSessionId: v.StringSchema<undefined>;
2071
2105
  readonly toolName: v.StringSchema<undefined>;
2072
2106
  readonly filePath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2073
2107
  readonly command: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
@@ -2076,7 +2110,7 @@ export declare const ActionEntrySchema: v.ObjectSchema<{
2076
2110
  *
2077
2111
  * This is what makes a skill load ride the action stream instead of the
2078
2112
  * transcript. `skill_usage` — the other place a loaded skill name is
2079
- * recorded — is populated by `extractRunUsage`, which returns empty unless
2113
+ * recorded — is populated by `extractSessionUsage`, which returns empty unless
2080
2114
  * `mossbear sync` is given `--transcripts-dir`, and the hook `mossbear init`
2081
2115
  * installs never passes one. So the transcript path has no data in a normal
2082
2116
  * session, while an action definitionally syncs.
@@ -2099,7 +2133,7 @@ export declare const ActionEntrySchema: v.ObjectSchema<{
2099
2133
  *
2100
2134
  * Optional three times over: run logs written before this field existed must
2101
2135
  * stay readable, a hook protocol other than Claude Code's may not send it,
2102
- * and resolution falls back to the `<sessionId>.jsonl` filename convention
2136
+ * and resolution falls back to the `<agentSessionId>.jsonl` filename convention
2103
2137
  * when it is absent or stale.
2104
2138
  */
2105
2139
  readonly transcriptPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
@@ -2110,6 +2144,23 @@ export declare const ActionEntrySchema: v.ObjectSchema<{
2110
2144
  * sessions that ran in repo B (`run-repo-attribution`).
2111
2145
  */
2112
2146
  readonly repoId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "repoId must be repo_ followed by 32 hex chars">]>, undefined>;
2147
+ /**
2148
+ * Which *project* produced this action — the portable `project.id` a repo
2149
+ * commits in `.mossbear/config.json` (`ProjectIdSchema`), read by the logger
2150
+ * hook from the event's `cwd` beside `repoId`.
2151
+ *
2152
+ * The two answer different questions and both are needed. `repoId` is a
2153
+ * digest keyed by a machine-local secret, so it separates two checkouts on
2154
+ * one machine and matches nothing anywhere else — a fresh cloud container
2155
+ * mints a new key and so a new digest for the same repo. The handoff a
2156
+ * session reads at start (`session-handoff-context`) has to find *this
2157
+ * repo's* previous sessions from any machine, and the committed id is the
2158
+ * only key every clone agrees on.
2159
+ *
2160
+ * Optional: run logs written before this field existed must stay readable,
2161
+ * and a repo that has never run `mossbear init` declares no id.
2162
+ */
2163
+ readonly projectId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, "projectId must contain only letters, digits, underscore, dot or hyphen">]>, undefined>;
2113
2164
  /**
2114
2165
  * Which harness produced this action, stamped by the logger hook from the
2115
2166
  * `--harness` flag on its own hook entry (`run-source-linking` slice 1).
@@ -2249,9 +2300,9 @@ export type GuideHistoryRevision = v.InferOutput<typeof GuideHistoryRevisionSche
2249
2300
  * graded run has ever produced a verdict, while `awaiting_current_revision`
2250
2301
  * means the guide has a real record that is entirely about wording the user has
2251
2302
  * since rewritten. Collapsing those two onto "no data" is exactly the claim the
2252
- * dashboard stopped making (`guidePerformance.ts` → `isAwaitingCurrentRevision`),
2253
- * and an agent reading an absence as a verdict is the same error one screen
2254
- * further out.
2303
+ * dashboard stopped making with its awaiting-current-revision check, and an
2304
+ * agent reading an absence as a verdict is the same error one screen further
2305
+ * out.
2255
2306
  */
2256
2307
  export declare const GuideHistoryStateSchema: v.PicklistSchema<["evaluated", "awaiting_current_revision", "unevaluated"], undefined>;
2257
2308
  export type GuideHistoryState = v.InferOutput<typeof GuideHistoryStateSchema>;
@@ -2474,7 +2525,7 @@ export declare const MAX_GUIDE_HISTORY_REASONING_CHARS = 1200;
2474
2525
  * `pattern-evidence-guide-revision` removed from the dashboard.
2475
2526
  */
2476
2527
  export declare const GuideHistoryFindingSchema: v.ObjectSchema<{
2477
- readonly runId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
2528
+ readonly sessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
2478
2529
  readonly occurredAt: v.StringSchema<undefined>;
2479
2530
  readonly revision: v.NullableSchema<v.ObjectSchema<{
2480
2531
  readonly bodyItemId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
@@ -2641,7 +2692,7 @@ export declare const GuideHistoryResponseSchema: v.ObjectSchema<{
2641
2692
  readonly changedAt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
2642
2693
  }, undefined>, undefined>;
2643
2694
  readonly findings: v.ArraySchema<v.ObjectSchema<{
2644
- readonly runId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
2695
+ readonly sessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
2645
2696
  readonly occurredAt: v.StringSchema<undefined>;
2646
2697
  readonly revision: v.NullableSchema<v.ObjectSchema<{
2647
2698
  readonly bodyItemId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
@@ -2664,14 +2715,14 @@ export declare const GuideHistoryResponseSchema: v.ObjectSchema<{
2664
2715
  }, undefined>;
2665
2716
  }, undefined>;
2666
2717
  export type GuideHistoryResponse = v.InferOutput<typeof GuideHistoryResponseSchema>;
2667
- export declare const RunGradeRequestSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
2668
- readonly run: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 256, undefined>, v.CheckAction<string, "identifier must not contain control characters">]>, undefined>;
2718
+ export declare const SessionGradeRequestSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
2669
2719
  readonly session: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 256, undefined>, v.CheckAction<string, "identifier must not contain control characters">]>, undefined>;
2720
+ readonly agent_session: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 256, undefined>, v.CheckAction<string, "identifier must not contain control characters">]>, undefined>;
2670
2721
  }, undefined>, v.CheckAction<{
2671
- run?: string | undefined;
2672
2722
  session?: string | undefined;
2673
- }, "Pass exactly one of run or session">]>;
2674
- export type RunGradeRequest = v.InferOutput<typeof RunGradeRequestSchema>;
2723
+ agent_session?: string | undefined;
2724
+ }, "Pass exactly one of session or agent_session">]>;
2725
+ export type SessionGradeRequest = v.InferOutput<typeof SessionGradeRequestSchema>;
2675
2726
  /**
2676
2727
  * Which of four states the run's grade is in — a required field rather than
2677
2728
  * something a reader infers from a null `grade`.
@@ -2690,18 +2741,18 @@ export type RunGradeRequest = v.InferOutput<typeof RunGradeRequestSchema>;
2690
2741
  * select it. It will never be graded, and telling a reader to wait would
2691
2742
  * promise work the system does not do.
2692
2743
  */
2693
- export declare const RunGradeStateSchema: v.PicklistSchema<["pending", "graded", "nothing_to_grade", "expired"], undefined>;
2694
- export type RunGradeState = v.InferOutput<typeof RunGradeStateSchema>;
2744
+ export declare const SessionGradeStateSchema: v.PicklistSchema<["pending", "graded", "nothing_to_grade", "expired"], undefined>;
2745
+ export type SessionGradeState = v.InferOutput<typeof SessionGradeStateSchema>;
2695
2746
  /**
2696
2747
  * The run-level verdict vocabulary — `aligned | misaligned | not_applicable`.
2697
2748
  * `not_applicable` is a guide that was in the agent's context and that the
2698
2749
  * session never engaged. It is not `unguided`, which is an action-level word,
2699
2750
  * and neither is ever restated in terms of the other.
2700
2751
  */
2701
- export declare const RunGuideVerdictValueSchema: v.PicklistSchema<["aligned", "misaligned", "not_applicable"], undefined>;
2702
- export type RunGuideVerdictValue = v.InferOutput<typeof RunGuideVerdictValueSchema>;
2752
+ export declare const SessionGuideVerdictValueSchema: v.PicklistSchema<["aligned", "misaligned", "not_applicable"], undefined>;
2753
+ export type SessionGuideVerdictValue = v.InferOutput<typeof SessionGuideVerdictValueSchema>;
2703
2754
  /** One guide's verdict for the run, with the grader's reasoning wrapped. */
2704
- export declare const RunGradeGuideSchema: v.ObjectSchema<{
2755
+ export declare const SessionGradeGuideSchema: v.ObjectSchema<{
2705
2756
  readonly guideId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
2706
2757
  readonly title: v.StringSchema<undefined>;
2707
2758
  readonly verdict: v.PicklistSchema<["aligned", "misaligned", "not_applicable"], undefined>;
@@ -2713,8 +2764,8 @@ export declare const RunGradeGuideSchema: v.ObjectSchema<{
2713
2764
  */
2714
2765
  readonly reasoning: v.StringSchema<undefined>;
2715
2766
  }, undefined>;
2716
- export type RunGradeGuide = v.InferOutput<typeof RunGradeGuideSchema>;
2717
- export declare const RunGradeSchema: v.ObjectSchema<{
2767
+ export type SessionGradeGuide = v.InferOutput<typeof SessionGradeGuideSchema>;
2768
+ export declare const SessionGradeSchema: v.ObjectSchema<{
2718
2769
  /** The grader's one-paragraph judgment of the run, wrapped like `reasoning`; null when the record carries none. */
2719
2770
  readonly summary: v.NullableSchema<v.StringSchema<undefined>, undefined>;
2720
2771
  /** ISO timestamp, machine format — display formatting is the reader's job. */
@@ -2741,18 +2792,18 @@ export declare const RunGradeSchema: v.ObjectSchema<{
2741
2792
  readonly reasoning: v.StringSchema<undefined>;
2742
2793
  }, undefined>, undefined>;
2743
2794
  }, undefined>;
2744
- export type RunGrade = v.InferOutput<typeof RunGradeSchema>;
2745
- export declare const RunGradeRunSchema: v.ObjectSchema<{
2795
+ export type SessionGrade = v.InferOutput<typeof SessionGradeSchema>;
2796
+ export declare const GradedSessionSchema: v.ObjectSchema<{
2746
2797
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
2747
- readonly sessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
2798
+ readonly agentSessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
2748
2799
  readonly startedAt: v.StringSchema<undefined>;
2749
2800
  readonly endedAt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
2750
2801
  readonly status: v.PicklistSchema<["open", "closed"], undefined>;
2751
2802
  }, undefined>;
2752
- export declare const RunGradeResponseSchema: v.ObjectSchema<{
2803
+ export declare const SessionGradeResponseSchema: v.ObjectSchema<{
2753
2804
  readonly run: v.ObjectSchema<{
2754
2805
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
2755
- readonly sessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
2806
+ readonly agentSessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
2756
2807
  readonly startedAt: v.StringSchema<undefined>;
2757
2808
  readonly endedAt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
2758
2809
  readonly status: v.PicklistSchema<["open", "closed"], undefined>;
@@ -2797,7 +2848,78 @@ export declare const RunGradeResponseSchema: v.ObjectSchema<{
2797
2848
  readonly note: v.StringSchema<undefined>;
2798
2849
  }, undefined>, undefined>;
2799
2850
  }, undefined>;
2800
- export type RunGradeResponse = v.InferOutput<typeof RunGradeResponseSchema>;
2851
+ export type SessionGradeResponse = v.InferOutput<typeof SessionGradeResponseSchema>;
2852
+ /**
2853
+ * The five kinds of session residue the server extracts on session close —
2854
+ * the vocabulary of `guide_files.kind`. Mirrored here rather than imported
2855
+ * because this is the wire boundary: the CLI reads it, and a kind the server
2856
+ * adds later must widen this list (server first) before any CLI renders it.
2857
+ */
2858
+ export declare const SessionResidueKindSchema: v.PicklistSchema<["decision", "deferral", "assumption", "question", "found_not_fixed"], undefined>;
2859
+ export type SessionResidueKind = v.InferOutput<typeof SessionResidueKindSchema>;
2860
+ /**
2861
+ * How many residue items one read returns at most — the same cap the
2862
+ * extractor applies per session, applied again across sessions: the handoff a
2863
+ * session reads at start is a glance, not a log.
2864
+ */
2865
+ export declare const MAX_SESSION_RESIDUE_ITEMS = 5;
2866
+ /** `?project=` — the committed project id whose recent sessions to read. */
2867
+ export declare const SessionResidueRequestSchema: v.ObjectSchema<{
2868
+ readonly project: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, "projectId must contain only letters, digits, underscore, dot or hyphen">]>;
2869
+ }, undefined>;
2870
+ export type SessionResidueRequest = v.InferOutput<typeof SessionResidueRequestSchema>;
2871
+ /** One item a recent session in the project left behind. */
2872
+ export declare const SessionResidueItemSchema: v.ObjectSchema<{
2873
+ readonly kind: v.PicklistSchema<["decision", "deferral", "assumption", "question", "found_not_fixed"], undefined>;
2874
+ /**
2875
+ * The item's text, **already wrapped in the response's untrusted markers**
2876
+ * — model-authored, transcript-derived, and about to be placed in front of
2877
+ * an agent, so delimited at the source exactly as a grade's reasoning is.
2878
+ */
2879
+ readonly text: v.StringSchema<undefined>;
2880
+ /** The run the item came from; what `mossbear sessions <id>` takes. */
2881
+ readonly sessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
2882
+ readonly agentSessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
2883
+ /** ISO timestamp of the session's close; null while it is still open. */
2884
+ readonly endedAt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
2885
+ }, undefined>;
2886
+ export type SessionResidueItem = v.InferOutput<typeof SessionResidueItemSchema>;
2887
+ export declare const SessionResidueResponseSchema: v.ObjectSchema<{
2888
+ readonly project: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, "projectId must contain only letters, digits, underscore, dot or hyphen">]>;
2889
+ /**
2890
+ * Newest session first, then in the order the session recorded them; at
2891
+ * most {@link MAX_SESSION_RESIDUE_ITEMS}. Empty is the ordinary answer and
2892
+ * says "nothing on record", never "nothing happened".
2893
+ */
2894
+ readonly items: v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
2895
+ readonly kind: v.PicklistSchema<["decision", "deferral", "assumption", "question", "found_not_fixed"], undefined>;
2896
+ /**
2897
+ * The item's text, **already wrapped in the response's untrusted markers**
2898
+ * — model-authored, transcript-derived, and about to be placed in front of
2899
+ * an agent, so delimited at the source exactly as a grade's reasoning is.
2900
+ */
2901
+ readonly text: v.StringSchema<undefined>;
2902
+ /** The run the item came from; what `mossbear sessions <id>` takes. */
2903
+ readonly sessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
2904
+ readonly agentSessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
2905
+ /** ISO timestamp of the session's close; null while it is still open. */
2906
+ readonly endedAt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
2907
+ }, undefined>, undefined>, v.MaxLengthAction<{
2908
+ kind: "decision" | "deferral" | "assumption" | "question" | "found_not_fixed";
2909
+ text: string;
2910
+ sessionId: string;
2911
+ agentSessionId: string;
2912
+ endedAt: string | null;
2913
+ }[], 5, undefined>]>;
2914
+ /** The markers every `text` is wrapped in; present exactly when `items` is non-empty. */
2915
+ readonly untrusted: v.NullableSchema<v.ObjectSchema<{
2916
+ readonly token: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
2917
+ readonly startMarker: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
2918
+ readonly endMarker: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
2919
+ readonly note: v.StringSchema<undefined>;
2920
+ }, undefined>, undefined>;
2921
+ }, undefined>;
2922
+ export type SessionResidueResponse = v.InferOutput<typeof SessionResidueResponseSchema>;
2801
2923
  export declare function parseAgentConfig(data: unknown): {
2802
2924
  id: string;
2803
2925
  name: string;
@@ -3174,8 +3296,8 @@ export declare function parseInboxArchiveResponse(data: unknown): {
3174
3296
  export declare function parseDashboardSyncRequest(data: unknown): {
3175
3297
  actions?: {
3176
3298
  id?: string | undefined;
3177
- runId?: string | undefined;
3178
3299
  sessionId?: string | undefined;
3300
+ agentSessionId?: string | undefined;
3179
3301
  actionType: string;
3180
3302
  summary: string;
3181
3303
  filePaths?: string[] | undefined;
@@ -3198,7 +3320,7 @@ export declare function parseDashboardSyncRequest(data: unknown): {
3198
3320
  reasoning?: string | undefined;
3199
3321
  triggerType: "uncovered" | "ambiguous" | "performance_pattern" | "conversational_feedback";
3200
3322
  sourceActionIds?: (string | {
3201
- sessionId: string;
3323
+ agentSessionId: string;
3202
3324
  timestamp?: string | undefined;
3203
3325
  summary: string;
3204
3326
  })[] | undefined;
@@ -3213,8 +3335,8 @@ export declare function parseDashboardSyncRequest(data: unknown): {
3213
3335
  status?: "dismissed" | "inferred" | "confirmed" | undefined;
3214
3336
  }[] | undefined;
3215
3337
  runUsage?: {
3216
- runId?: string | undefined;
3217
- sessionId: string;
3338
+ sessionId?: string | undefined;
3339
+ agentSessionId: string;
3218
3340
  usage: {
3219
3341
  model: string;
3220
3342
  provider?: string | undefined;
@@ -3225,8 +3347,8 @@ export declare function parseDashboardSyncRequest(data: unknown): {
3225
3347
  }[];
3226
3348
  }[] | undefined;
3227
3349
  skillUsage?: {
3228
- runId?: string | undefined;
3229
- sessionId: string;
3350
+ sessionId?: string | undefined;
3351
+ agentSessionId: string;
3230
3352
  usage: {
3231
3353
  skillName: string;
3232
3354
  model: string;
@@ -3250,12 +3372,13 @@ export declare function parseDashboardSyncRequest(data: unknown): {
3250
3372
  branch: string | null;
3251
3373
  } | undefined;
3252
3374
  selfReport?: {
3253
- sessionId: string;
3375
+ agentSessionId: string;
3254
3376
  text: string;
3255
3377
  } | undefined;
3378
+ origin?: "session-start" | undefined;
3256
3379
  };
3257
3380
  export declare function parseProposalCitation(data: unknown): {
3258
- sessionId: string;
3381
+ agentSessionId: string;
3259
3382
  timestamp?: string | undefined;
3260
3383
  summary: string;
3261
3384
  };
@@ -3267,7 +3390,7 @@ export declare function parseExtractedGuideSuggestion(data: unknown): {
3267
3390
  confidence: number;
3268
3391
  occurrences: number;
3269
3392
  citations: {
3270
- sessionId: string;
3393
+ agentSessionId: string;
3271
3394
  timestamp?: string | undefined;
3272
3395
  summary: string;
3273
3396
  }[];
@@ -3279,7 +3402,7 @@ export declare function parseExtractedSkillSuggestion(data: unknown): {
3279
3402
  confidence: number;
3280
3403
  occurrences: number;
3281
3404
  citations: {
3282
- sessionId: string;
3405
+ agentSessionId: string;
3283
3406
  timestamp?: string | undefined;
3284
3407
  summary: string;
3285
3408
  }[];
@@ -3294,7 +3417,7 @@ export declare function parseExtractedFeedbackBatch(data: unknown): {
3294
3417
  confidence: number;
3295
3418
  occurrences: number;
3296
3419
  citations: {
3297
- sessionId: string;
3420
+ agentSessionId: string;
3298
3421
  timestamp?: string | undefined;
3299
3422
  summary: string;
3300
3423
  }[];
@@ -3306,7 +3429,7 @@ export declare function parseExtractedFeedbackBatch(data: unknown): {
3306
3429
  confidence: number;
3307
3430
  occurrences: number;
3308
3431
  citations: {
3309
- sessionId: string;
3432
+ agentSessionId: string;
3310
3433
  timestamp?: string | undefined;
3311
3434
  summary: string;
3312
3435
  }[];
@@ -3316,7 +3439,7 @@ export declare function parseExtractedFeedbackBatch(data: unknown): {
3316
3439
  export declare function parseActionEntry(data: unknown): {
3317
3440
  id?: string | undefined;
3318
3441
  timestamp: string;
3319
- sessionId: string;
3442
+ agentSessionId: string;
3320
3443
  toolName: string;
3321
3444
  filePath?: string | undefined;
3322
3445
  command?: string | undefined;
@@ -3326,6 +3449,7 @@ export declare function parseActionEntry(data: unknown): {
3326
3449
  } | undefined;
3327
3450
  transcriptPath?: string | undefined;
3328
3451
  repoId?: string | undefined;
3452
+ projectId?: string | undefined;
3329
3453
  harness?: "claude_code" | "codex" | "opencode" | "antigravity" | undefined;
3330
3454
  outcome?: {
3331
3455
  status: "ok" | "error";
@@ -3405,7 +3529,7 @@ export declare function parseGuideHistoryResponse(data: unknown): {
3405
3529
  changedAt: string | null;
3406
3530
  } | null;
3407
3531
  findings: {
3408
- runId: string;
3532
+ sessionId: string;
3409
3533
  occurredAt: string;
3410
3534
  revision: {
3411
3535
  bodyItemId: string;
@@ -3423,13 +3547,13 @@ export declare function parseGuideHistoryResponse(data: unknown): {
3423
3547
  };
3424
3548
  };
3425
3549
  export declare function parseRunGradeRequest(data: unknown): {
3426
- run?: string | undefined;
3427
3550
  session?: string | undefined;
3551
+ agent_session?: string | undefined;
3428
3552
  };
3429
- export declare function parseRunGradeResponse(data: unknown): {
3553
+ export declare function parseSessionGradeResponse(data: unknown): {
3430
3554
  run: {
3431
3555
  id: string;
3432
- sessionId: string;
3556
+ agentSessionId: string;
3433
3557
  startedAt: string;
3434
3558
  endedAt: string | null;
3435
3559
  status: "open" | "closed";
@@ -3454,5 +3578,21 @@ export declare function parseRunGradeResponse(data: unknown): {
3454
3578
  note: string;
3455
3579
  } | null;
3456
3580
  };
3581
+ export declare function parseSessionResidueResponse(data: unknown): {
3582
+ project: string;
3583
+ items: {
3584
+ kind: "decision" | "deferral" | "assumption" | "question" | "found_not_fixed";
3585
+ text: string;
3586
+ sessionId: string;
3587
+ agentSessionId: string;
3588
+ endedAt: string | null;
3589
+ }[];
3590
+ untrusted: {
3591
+ token: string;
3592
+ startMarker: string;
3593
+ endMarker: string;
3594
+ note: string;
3595
+ } | null;
3596
+ };
3457
3597
  export {};
3458
3598
  //# sourceMappingURL=schemas.d.ts.map