@basou/core 0.32.0 → 0.34.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.
- package/dist/index.d.ts +467 -185
- package/dist/index.js +830 -510
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1747,6 +1747,409 @@ declare function replayEvents(sessionDir: string, options?: ReplayOptions): Asyn
|
|
|
1747
1747
|
*/
|
|
1748
1748
|
declare function readAllEvents(sessionDir: string, options?: ReplayOptions): Promise<Event[]>;
|
|
1749
1749
|
|
|
1750
|
+
/**
|
|
1751
|
+
* Project roster drift (the "saddle" model). A project's repos are DECLARED
|
|
1752
|
+
* once in the manifest's `repos` list; the capture config (`source_roots`) must
|
|
1753
|
+
* cover every declared repo. This computes the drift between the two so
|
|
1754
|
+
* `basou project check` can surface a declared repo that is NOT being captured
|
|
1755
|
+
* — the class of bug where a companion repo was wired into the workspace but
|
|
1756
|
+
* never added to `source_roots`, so its work silently fell out of capture.
|
|
1757
|
+
*
|
|
1758
|
+
* Pure: it compares declared relative paths against captured relative paths and
|
|
1759
|
+
* performs no filesystem or git I/O. Paths are compared as declared (both lists
|
|
1760
|
+
* use the same machine-portable relative-path form), not resolved on disk.
|
|
1761
|
+
*/
|
|
1762
|
+
type RepoVisibility = "public" | "private" | "future-public";
|
|
1763
|
+
/**
|
|
1764
|
+
* The audience-driven language axis. Independent of visibility: a private repo
|
|
1765
|
+
* can publish English content, a public repo can carry bilingual docs. `en` /
|
|
1766
|
+
* `ja` for a single audience, `en+ja` when both are served.
|
|
1767
|
+
*/
|
|
1768
|
+
type RepoLanguage = "en" | "ja" | "en+ja";
|
|
1769
|
+
/** A published surface a repo emits: a deployed website or a package registry. */
|
|
1770
|
+
type PublishKind = "web" | "npm";
|
|
1771
|
+
/**
|
|
1772
|
+
* Where a repo's agent instruction files live (the instruction-source axis),
|
|
1773
|
+
* independent of visibility / language / publishes. `hub` is basou's native,
|
|
1774
|
+
* generated hub-and-spoke topology (canonical in the anchor, gitignored symlinks
|
|
1775
|
+
* in each repo); `self` is the additive opt-in where the canonical AGENTS.md is a
|
|
1776
|
+
* regular committed file in the repo itself and basou stays hands-off about its
|
|
1777
|
+
* content. See {@link instructionMode} for the default (absent => `hub`).
|
|
1778
|
+
*/
|
|
1779
|
+
type RepoInstructions = "hub" | "self";
|
|
1780
|
+
/**
|
|
1781
|
+
* One published surface. Its visibility and language are INDEPENDENT of the
|
|
1782
|
+
* source repo's: a private repo commonly publishes a public website. Both are
|
|
1783
|
+
* optional so a surface can be declared
|
|
1784
|
+
* before those facts are pinned down (mirroring how `adopt` leaves repo
|
|
1785
|
+
* visibility unset for the operator to fill in).
|
|
1786
|
+
*/
|
|
1787
|
+
type PublishTarget = {
|
|
1788
|
+
kind: PublishKind;
|
|
1789
|
+
visibility?: RepoVisibility | undefined;
|
|
1790
|
+
language?: RepoLanguage | undefined;
|
|
1791
|
+
};
|
|
1792
|
+
type RepoEntry = {
|
|
1793
|
+
/** Path relative to the manifest repo root (e.g. ".", "../takuhon"). */
|
|
1794
|
+
path: string;
|
|
1795
|
+
visibility?: RepoVisibility | undefined;
|
|
1796
|
+
/** Source language (commits/comments/code, read by contributors). Independent of visibility. */
|
|
1797
|
+
language?: RepoLanguage | undefined;
|
|
1798
|
+
/** Published surfaces this repo emits (opt-in; absent for a repo that publishes nothing). */
|
|
1799
|
+
publishes?: PublishTarget[] | undefined;
|
|
1800
|
+
/**
|
|
1801
|
+
* Instruction-source mode. Absent => `hub` (basou's native generated topology),
|
|
1802
|
+
* so an existing roster's behavior is unchanged. `self` opts the repo out of
|
|
1803
|
+
* generation: its AGENTS.md is a hand-authored committed file and basou stays
|
|
1804
|
+
* hands-off. Resolve the effective mode with {@link instructionMode}.
|
|
1805
|
+
*/
|
|
1806
|
+
instructions?: RepoInstructions | undefined;
|
|
1807
|
+
};
|
|
1808
|
+
/**
|
|
1809
|
+
* The effective instruction-source mode for a repo: the declared `instructions`,
|
|
1810
|
+
* defaulting to `hub` when absent. The default is the single guarantee that an
|
|
1811
|
+
* existing roster (which has no `instructions` field) keeps basou's current
|
|
1812
|
+
* hub-and-spoke behavior byte-for-byte — every generator branches on this, never
|
|
1813
|
+
* on the raw optional field, so "absent => hub" is decided in exactly one place.
|
|
1814
|
+
*/
|
|
1815
|
+
declare function instructionMode(entry: {
|
|
1816
|
+
instructions?: RepoInstructions | undefined;
|
|
1817
|
+
}): RepoInstructions;
|
|
1818
|
+
type RosterDriftSummary = {
|
|
1819
|
+
declaredCount: number;
|
|
1820
|
+
capturedCount: number;
|
|
1821
|
+
/** Declared in `repos` but absent from `source_roots`: a capture gap. */
|
|
1822
|
+
gaps: RepoEntry[];
|
|
1823
|
+
/** In `source_roots` but not declared in `repos` (e.g. a workspace view, or a stray). */
|
|
1824
|
+
extra: string[];
|
|
1825
|
+
/** Declared paths that are also captured. */
|
|
1826
|
+
matched: string[];
|
|
1827
|
+
/** True when there is no capture gap (every declared repo is covered). */
|
|
1828
|
+
ok: boolean;
|
|
1829
|
+
};
|
|
1830
|
+
/**
|
|
1831
|
+
* Compute the {@link RosterDriftSummary} for a project. A declared repo missing
|
|
1832
|
+
* from the captured set is a `gap` (the surfaced suspicion); a captured path not
|
|
1833
|
+
* in the declared set is `extra` (commonly the workspace view, which is a
|
|
1834
|
+
* capture source but not itself a project repo). With no declared roster, there
|
|
1835
|
+
* are no gaps (nothing to check against) and every captured path is `extra`.
|
|
1836
|
+
*/
|
|
1837
|
+
declare function summarizeRosterDrift(input: {
|
|
1838
|
+
repos?: RepoEntry[];
|
|
1839
|
+
sourceRoots?: string[];
|
|
1840
|
+
}): RosterDriftSummary;
|
|
1841
|
+
type SourceRootsReconcile = {
|
|
1842
|
+
/**
|
|
1843
|
+
* The reconciled `source_roots`: the existing entries verbatim, then every
|
|
1844
|
+
* declared repo path that was missing (normalized, in roster order). Existing
|
|
1845
|
+
* order and form are preserved so the manifest diff is minimal and reversible.
|
|
1846
|
+
*/
|
|
1847
|
+
next: string[];
|
|
1848
|
+
/** Declared repo paths (normalized) that were appended because `source_roots` did not cover them. */
|
|
1849
|
+
added: string[];
|
|
1850
|
+
/** True when `source_roots` already covers every declared repo (`next` equals the current list). */
|
|
1851
|
+
unchanged: boolean;
|
|
1852
|
+
};
|
|
1853
|
+
/**
|
|
1854
|
+
* Derive the `source_roots` a project's declared repo roster requires. The
|
|
1855
|
+
* roster (`repos`) is the single source of truth for which repos belong to the
|
|
1856
|
+
* project; this is the actuator behind `basou project sync`, computing the
|
|
1857
|
+
* additive reconciliation so every declared repo is captured.
|
|
1858
|
+
*
|
|
1859
|
+
* ADDITIVE ONLY: it appends declared paths that are missing and never removes
|
|
1860
|
+
* an existing entry. A captured-but-undeclared path (commonly the generated
|
|
1861
|
+
* workspace view — a legitimate capture source that is not itself a project
|
|
1862
|
+
* repo) is preserved; pruning strays is deferred to the slice that generates
|
|
1863
|
+
* the view (so basou knows which extras it owns). Existing entries are kept
|
|
1864
|
+
* byte-identical; only appended paths are normalized.
|
|
1865
|
+
*
|
|
1866
|
+
* Pure: no filesystem or git I/O. Paths are compared in the same normalized
|
|
1867
|
+
* form as {@link summarizeRosterDrift}, so a trailing-slash variant of an
|
|
1868
|
+
* already-captured repo is not re-appended.
|
|
1869
|
+
*/
|
|
1870
|
+
declare function reconcileSourceRoots(input: {
|
|
1871
|
+
repos?: RepoEntry[];
|
|
1872
|
+
sourceRoots?: string[];
|
|
1873
|
+
}): SourceRootsReconcile;
|
|
1874
|
+
/**
|
|
1875
|
+
* On-disk classification of a source-root candidate during adoption: a git repo
|
|
1876
|
+
* root (→ becomes a roster entry), a resolved-but-non-repo directory (the
|
|
1877
|
+
* generated workspace view, `/tmp`, a scratch dir → excluded), or a path that
|
|
1878
|
+
* could not be resolved on disk (→ excluded).
|
|
1879
|
+
*/
|
|
1880
|
+
type AdoptCandidateKind = "repo" | "non-repo" | "unresolved";
|
|
1881
|
+
type AdoptCandidate = {
|
|
1882
|
+
/** Source-root path as declared (relative to the manifest root). */
|
|
1883
|
+
path: string;
|
|
1884
|
+
/** On-disk classification; the filesystem probing that produces it is the caller's job. */
|
|
1885
|
+
kind: AdoptCandidateKind;
|
|
1886
|
+
};
|
|
1887
|
+
type RosterAdoptionPlan = {
|
|
1888
|
+
/** Proposed `repos` entries: the candidates that are git repos (visibility left unset for the operator). */
|
|
1889
|
+
repos: RepoEntry[];
|
|
1890
|
+
/** Candidates excluded from the roster, with why (a non-repo directory, or an unresolvable path). */
|
|
1891
|
+
excluded: {
|
|
1892
|
+
path: string;
|
|
1893
|
+
kind: Exclude<AdoptCandidateKind, "repo">;
|
|
1894
|
+
}[];
|
|
1895
|
+
};
|
|
1896
|
+
/**
|
|
1897
|
+
* Plan a `repos` roster from classified source-root candidates (the actuator
|
|
1898
|
+
* behind `basou project adopt`). Pure: it partitions already-classified
|
|
1899
|
+
* candidates — the realpath / `.git` filesystem probing that produces each
|
|
1900
|
+
* `kind` is the caller's job, so this stays testable without disk I/O.
|
|
1901
|
+
*
|
|
1902
|
+
* A git repo becomes a roster entry (path only; visibility is left unset because
|
|
1903
|
+
* it is a human judgment, kept independent of the other axes). A non-repo
|
|
1904
|
+
* (commonly the generated workspace view) or an unresolvable path is excluded and
|
|
1905
|
+
* reported, so the operator sees what was dropped and why before editing. Repo
|
|
1906
|
+
* paths are deduped by normalized form, preserving the first declared form and
|
|
1907
|
+
* order.
|
|
1908
|
+
*/
|
|
1909
|
+
declare function planRosterAdoption(candidates: AdoptCandidate[]): RosterAdoptionPlan;
|
|
1910
|
+
|
|
1911
|
+
/**
|
|
1912
|
+
* The language of the GENERATED-VIEW chrome (headings, labels, verdict prose)
|
|
1913
|
+
* in handoff.md / orientation.md / decisions.md / report output.
|
|
1914
|
+
*
|
|
1915
|
+
* This is deliberately narrower than the manifest's repo `language` axis
|
|
1916
|
+
* (`en | ja | en+ja`): a generated view has exactly one chrome language, so
|
|
1917
|
+
* `en+ja` resolves to `en`. User data (decision titles, notes, labels, file
|
|
1918
|
+
* paths) always passes through verbatim — only the tool-generated strings are
|
|
1919
|
+
* localized, which is exactly the split this type exists to keep honest.
|
|
1920
|
+
*/
|
|
1921
|
+
type ViewLanguage = "en" | "ja";
|
|
1922
|
+
/**
|
|
1923
|
+
* Resolve the generated-view language from a manifest: the workspace speaks
|
|
1924
|
+
* the language of its ANCHOR repo (the `repos[]` entry whose path is `.`).
|
|
1925
|
+
*
|
|
1926
|
+
* Rules (fixed by design):
|
|
1927
|
+
* - anchor declares `ja` -> `ja`
|
|
1928
|
+
* - anchor declares `en` / `en+ja` -> `en` (a bilingual surface renders one
|
|
1929
|
+
* chrome; en is the shared floor)
|
|
1930
|
+
* - no roster / no anchor entry / no declared language -> `en` (the default
|
|
1931
|
+
* for basou's English-first OSS surface)
|
|
1932
|
+
*
|
|
1933
|
+
* Binding the view to the anchor's language is a deliberate, documented
|
|
1934
|
+
* coupling: the anchor is the planning/trail home the views live in, so its
|
|
1935
|
+
* declared audience is the views' audience. Other repos' languages do not
|
|
1936
|
+
* participate.
|
|
1937
|
+
*/
|
|
1938
|
+
declare function resolveViewLanguage(manifest: Pick<Manifest, "repos"> | null): ViewLanguage;
|
|
1939
|
+
/**
|
|
1940
|
+
* Manifest-reading convenience for the renderers: resolve the view language
|
|
1941
|
+
* for a workspace, defaulting to `en` when the manifest is missing or
|
|
1942
|
+
* unreadable (mirrors the orientation renderer's tolerant source_roots read —
|
|
1943
|
+
* a broken manifest must never break a view render).
|
|
1944
|
+
*/
|
|
1945
|
+
declare function resolveViewLanguageFromPaths(paths: BasouPaths): Promise<ViewLanguage>;
|
|
1946
|
+
/**
|
|
1947
|
+
* Every localized string the four view renderers emit, grouped per renderer
|
|
1948
|
+
* with a small `common` set for lines that are byte-identical across views.
|
|
1949
|
+
* Parameterized lines are functions so the two languages can order their
|
|
1950
|
+
* parts naturally.
|
|
1951
|
+
*
|
|
1952
|
+
* This module is the SINGLE home for generated Japanese — the view chrome here
|
|
1953
|
+
* and the instruction-file content in {@link PresetStrings} (the E-5
|
|
1954
|
+
* language-lint allowlist points here, not at the renderers/generators), so
|
|
1955
|
+
* "user data language" and "tool-generated content language" can never blur
|
|
1956
|
+
* together again.
|
|
1957
|
+
*/
|
|
1958
|
+
type ViewStrings = {
|
|
1959
|
+
/** Localized relative age for prose lines, e.g. "3日4時間前" / "3d 4h ago". */
|
|
1960
|
+
relativeAge: (startedAt: string | null, now: Date) => string;
|
|
1961
|
+
common: {
|
|
1962
|
+
/** "最終 session" — the latest live session pointer. */
|
|
1963
|
+
lastSessionLabel: string;
|
|
1964
|
+
/** "直近の判断" — the latest recorded decision pointer. */
|
|
1965
|
+
latestDecisionLabel: string;
|
|
1966
|
+
/** "直近の変更ファイル" — the latest session's related files. */
|
|
1967
|
+
recentFilesLabel: string;
|
|
1968
|
+
/** "理由" — a track's rationale label. */
|
|
1969
|
+
trackWhyLabel: string;
|
|
1970
|
+
/** Note that the latest decision comes from a different session. */
|
|
1971
|
+
decisionOtherSessionNote: (shortSessionId: string) => string;
|
|
1972
|
+
};
|
|
1973
|
+
orientation: {
|
|
1974
|
+
headingWhere: string;
|
|
1975
|
+
headingRecent: (sessionCount: number) => string;
|
|
1976
|
+
headingInFlight: string;
|
|
1977
|
+
headingForward: string;
|
|
1978
|
+
headingCurrency: string;
|
|
1979
|
+
inFlightTasksHeading: (n: number) => string;
|
|
1980
|
+
pendingApprovalsHeading: (n: number) => string;
|
|
1981
|
+
suspectSessionsHeading: (n: number) => string;
|
|
1982
|
+
openTracksHeading: (n: number) => string;
|
|
1983
|
+
/** Stale-decision honesty note under 直近の判断. */
|
|
1984
|
+
decisionStaleNote: (activityAge: string) => string;
|
|
1985
|
+
outOfRootWarning: (count: number, files: string) => string;
|
|
1986
|
+
recentEmpty: string;
|
|
1987
|
+
recentDecisionsLabel: string;
|
|
1988
|
+
recentNextStepLabel: string;
|
|
1989
|
+
recentChangedLabel: string;
|
|
1990
|
+
trackCloseInstruction: string;
|
|
1991
|
+
nextStepRecordedLabel: (age: string) => string;
|
|
1992
|
+
noteStaleNote: (activityAge: string) => string;
|
|
1993
|
+
fallbackStaleDirection: string;
|
|
1994
|
+
fallbackStaleReferenceLabel: string;
|
|
1995
|
+
trackNudge: string;
|
|
1996
|
+
federatedFreshnessNote: string;
|
|
1997
|
+
bannerUnverifiable: (n: number) => string;
|
|
1998
|
+
bannerStale: (parts: string) => string;
|
|
1999
|
+
partNew: (n: number) => string;
|
|
2000
|
+
partUpdated: (n: number) => string;
|
|
2001
|
+
partsJoiner: string;
|
|
2002
|
+
verdictUnverifiable: (n: number) => [string, string];
|
|
2003
|
+
verdictStale: (parts: string) => [string, string];
|
|
2004
|
+
verdictUpdatedOnly: (n: number) => [string, string];
|
|
2005
|
+
verdictSuspectsAlso: (n: number) => string;
|
|
2006
|
+
verdictEmpty: [string, string];
|
|
2007
|
+
verdictUnprobed: (rel: string, tool: string) => [string, string];
|
|
2008
|
+
verdictCurrent: (rel: string, tool: string, hasHosts: boolean) => string;
|
|
2009
|
+
verdictSuspectsCaveat: (n: number) => string;
|
|
2010
|
+
verdictScopeDisclaimer: string;
|
|
2011
|
+
toolTerminal: string;
|
|
2012
|
+
toolHuman: string;
|
|
2013
|
+
toolImport: string;
|
|
2014
|
+
toolUnknown: string;
|
|
2015
|
+
};
|
|
2016
|
+
handoff: {
|
|
2017
|
+
headingCurrentState: string;
|
|
2018
|
+
headingRecentFiles: string;
|
|
2019
|
+
headingLatestDecision: string;
|
|
2020
|
+
headingOpenTracks: string;
|
|
2021
|
+
headingUnresolved: string;
|
|
2022
|
+
headingReadNext: string;
|
|
2023
|
+
headingNextWork: string;
|
|
2024
|
+
headingSessions: string;
|
|
2025
|
+
lastTaskLabel: string;
|
|
2026
|
+
decisionStaleNote: string;
|
|
2027
|
+
trackCloseInstruction: string;
|
|
2028
|
+
};
|
|
2029
|
+
decisions: {
|
|
2030
|
+
dateLabel: string;
|
|
2031
|
+
trackKindLine: string;
|
|
2032
|
+
decisionLabel: string;
|
|
2033
|
+
};
|
|
2034
|
+
report: {
|
|
2035
|
+
headingSummary: string;
|
|
2036
|
+
headingVolume: string;
|
|
2037
|
+
headingDecisions: string;
|
|
2038
|
+
headingApprovals: string;
|
|
2039
|
+
headingTasks: string;
|
|
2040
|
+
headingChangedFiles: string;
|
|
2041
|
+
headingSessions: string;
|
|
2042
|
+
headingIntegrity: string;
|
|
2043
|
+
};
|
|
2044
|
+
};
|
|
2045
|
+
/** Look up the string table for a resolved view language. */
|
|
2046
|
+
declare function viewStrings(language: ViewLanguage): ViewStrings;
|
|
2047
|
+
/**
|
|
2048
|
+
* Resolve a GENERATED INSTRUCTION-FILE's content language from the target
|
|
2049
|
+
* repo's declared `language`. Unlike the views (workspace-level artifacts that
|
|
2050
|
+
* follow the anchor), a preset block lives inside one repo's instruction file,
|
|
2051
|
+
* so its audience is that repo's declared audience: `ja` renders Japanese
|
|
2052
|
+
* (byte-identical to the pre-i18n output), `en` / `en+ja` / undeclared render
|
|
2053
|
+
* English (one content language per generated block; en is the shared floor).
|
|
2054
|
+
*/
|
|
2055
|
+
declare function resolveRepoContentLanguage(language: RepoLanguage | undefined): ViewLanguage;
|
|
2056
|
+
/**
|
|
2057
|
+
* Resolve the content language of a WORKSPACE-LEVEL instruction artifact (the
|
|
2058
|
+
* view's AGENTS.md block, the anchor's starter) from an already-gathered
|
|
2059
|
+
* roster: the entry flagged `anchor` speaks for the workspace, mirroring the
|
|
2060
|
+
* views' anchor-language rule. No anchor entry (or no declared language)
|
|
2061
|
+
* resolves to English. When more than one entry carries the flag, the first
|
|
2062
|
+
* wins (declared order).
|
|
2063
|
+
*
|
|
2064
|
+
* Note the anchor is identified by the CALLER-SET flag, not by this module:
|
|
2065
|
+
* {@link resolveViewLanguage} keys on the manifest path being `.`, while the
|
|
2066
|
+
* instruction-file callers flag the anchor by resolved-path identity. For a
|
|
2067
|
+
* conventional manifest (anchor declared as `.`) the two agree; a roster that
|
|
2068
|
+
* reaches the anchor only through an aliased path is where they can diverge,
|
|
2069
|
+
* and the caller's flag is authoritative for the instruction files.
|
|
2070
|
+
*/
|
|
2071
|
+
declare function resolveAnchorContentLanguage(repos: ReadonlyArray<{
|
|
2072
|
+
anchor?: boolean | undefined;
|
|
2073
|
+
language?: RepoLanguage | undefined;
|
|
2074
|
+
}>): ViewLanguage;
|
|
2075
|
+
/**
|
|
2076
|
+
* Every localized string the instruction-file generators emit: the per-repo
|
|
2077
|
+
* preset block, the workspace view's block, and the anchor's starter. Lives in
|
|
2078
|
+
* this module for the same reason as {@link ViewStrings}: it is the SINGLE
|
|
2079
|
+
* home for generated Japanese, so the language-lint E-5 allowlist stays one
|
|
2080
|
+
* file and "generated content language" is always a declaration-driven table
|
|
2081
|
+
* lookup, never a hardcode.
|
|
2082
|
+
*/
|
|
2083
|
+
type PresetStrings = {
|
|
2084
|
+
repoBlock: {
|
|
2085
|
+
heading: string;
|
|
2086
|
+
intro: string;
|
|
2087
|
+
/** Source git-visibility, rendered with the consequence the agent must respect. */
|
|
2088
|
+
visibilityLabel: (v: RepoVisibility | undefined) => string;
|
|
2089
|
+
/**
|
|
2090
|
+
* Source language (commits/comments/code), rendered with the audience it
|
|
2091
|
+
* serves. Invariant note: the table itself is SELECTED by this same field
|
|
2092
|
+
* (ja -> JA table, everything else -> EN), so the JA table's en / en+ja /
|
|
2093
|
+
* unset branches and the EN table's ja branch are unreachable from
|
|
2094
|
+
* renderPresetBlock — they exist for table completeness (and the
|
|
2095
|
+
* both-language sweep test), not because a render can emit them.
|
|
2096
|
+
*/
|
|
2097
|
+
sourceLanguageLabel: (l: RepoLanguage | undefined) => string;
|
|
2098
|
+
/** Published-surface kind. */
|
|
2099
|
+
publishKindLabel: (k: PublishTarget["kind"]) => string;
|
|
2100
|
+
/** A published surface's visibility (independent of the source repo's). */
|
|
2101
|
+
publishVisibilityLabel: (v: RepoVisibility | undefined) => string;
|
|
2102
|
+
/** A published surface's content language (read by end users; may differ from source). */
|
|
2103
|
+
contentLanguageLabel: (l: RepoLanguage | undefined) => string;
|
|
2104
|
+
/** "ソース可視性" — the source-visibility line label. */
|
|
2105
|
+
sourceVisibilityLabel: string;
|
|
2106
|
+
/** "ソース言語" — the source-language line label. */
|
|
2107
|
+
sourceLanguageLineLabel: string;
|
|
2108
|
+
/** "- 配信物: なし" — no published surfaces. */
|
|
2109
|
+
publishesNone: string;
|
|
2110
|
+
/** "- 配信物:" — the published-surfaces list header. */
|
|
2111
|
+
publishesHeader: string;
|
|
2112
|
+
};
|
|
2113
|
+
viewBlock: {
|
|
2114
|
+
heading: string;
|
|
2115
|
+
intro: string;
|
|
2116
|
+
selfNote: (viewName: string) => string;
|
|
2117
|
+
aggregates: (repoCount: number) => string;
|
|
2118
|
+
reposHeading: string;
|
|
2119
|
+
tableHeader: string;
|
|
2120
|
+
/** Instruction-file ownership labels: who writes the repo's AGENTS.md. */
|
|
2121
|
+
instructionsAnchor: string;
|
|
2122
|
+
instructionsSelf: string;
|
|
2123
|
+
instructionsHub: string;
|
|
2124
|
+
/** "未設定" — the short table cell for an undeclared visibility / language. */
|
|
2125
|
+
unsetShort: string;
|
|
2126
|
+
commitHeading: string;
|
|
2127
|
+
commitBody: string;
|
|
2128
|
+
conventionsHeading: string;
|
|
2129
|
+
conventionsBody: string;
|
|
2130
|
+
principlesHeading: string;
|
|
2131
|
+
principleStateless: string;
|
|
2132
|
+
principleNoFiles: string;
|
|
2133
|
+
};
|
|
2134
|
+
anchorStarter: {
|
|
2135
|
+
identityLine: (title: string) => string;
|
|
2136
|
+
starterNote: string;
|
|
2137
|
+
basicsHeading: string;
|
|
2138
|
+
basicsTodo: string;
|
|
2139
|
+
commitHeading: string;
|
|
2140
|
+
commitPlanning: string;
|
|
2141
|
+
commitImplementation: string;
|
|
2142
|
+
commitView: string;
|
|
2143
|
+
conventionsHeading: string;
|
|
2144
|
+
conventionsBody: string;
|
|
2145
|
+
viewPointerLine: (viewName: string) => string;
|
|
2146
|
+
policyHeading: string;
|
|
2147
|
+
policyTodo: string[];
|
|
2148
|
+
};
|
|
2149
|
+
};
|
|
2150
|
+
/** Look up the instruction-file string table for a resolved content language. */
|
|
2151
|
+
declare function presetStrings(language: ViewLanguage): PresetStrings;
|
|
2152
|
+
|
|
1750
2153
|
/** Session lifecycle states. */
|
|
1751
2154
|
declare const SessionStatusSchema: z.ZodEnum<{
|
|
1752
2155
|
initialized: "initialized";
|
|
@@ -2077,6 +2480,12 @@ type DecisionsRendererInput = {
|
|
|
2077
2480
|
nowIso: string;
|
|
2078
2481
|
onWarning?: (warning: ReplayWarning, sessionId: string) => void;
|
|
2079
2482
|
onSessionSkip?: (sessionId: string, reason: SessionSkipReason) => void;
|
|
2483
|
+
/**
|
|
2484
|
+
* Generated-view chrome language. Omitted (the normal path) = resolved from
|
|
2485
|
+
* the manifest's anchor repo via {@link resolveViewLanguageFromPaths}; the
|
|
2486
|
+
* override exists for tests and programmatic callers that already resolved it.
|
|
2487
|
+
*/
|
|
2488
|
+
language?: ViewLanguage;
|
|
2080
2489
|
};
|
|
2081
2490
|
type DecisionsRendererResult = {
|
|
2082
2491
|
/** Generated body WITHOUT BASOU:GENERATED markers. */
|
|
@@ -3343,6 +3752,12 @@ type HandoffRendererInput = {
|
|
|
3343
3752
|
onTaskSkip?: (taskId: string, reason: TaskSkipReason) => void;
|
|
3344
3753
|
/** Maximum related_files entries to display before `... +N more`. Default 20. */
|
|
3345
3754
|
relatedFilesLimit?: number;
|
|
3755
|
+
/**
|
|
3756
|
+
* Generated-view chrome language. Omitted (the normal path) = resolved from
|
|
3757
|
+
* the manifest's anchor repo via {@link resolveViewLanguageFromPaths}; the
|
|
3758
|
+
* override exists for tests and programmatic callers that already resolved it.
|
|
3759
|
+
*/
|
|
3760
|
+
language?: ViewLanguage;
|
|
3346
3761
|
};
|
|
3347
3762
|
type HandoffRendererResult = {
|
|
3348
3763
|
/** Generated body WITHOUT BASOU:GENERATED markers (markdown-store wraps them). */
|
|
@@ -3353,7 +3768,7 @@ type HandoffRendererResult = {
|
|
|
3353
3768
|
suspectCount: number;
|
|
3354
3769
|
/** Total number of task.md files successfully loaded. */
|
|
3355
3770
|
taskCount: number;
|
|
3356
|
-
/** Tasks whose status is `planned` or `in_progress` (= shown in
|
|
3771
|
+
/** Tasks whose status is `planned` or `in_progress` (= shown in the next-work section). */
|
|
3357
3772
|
pendingTaskCount: number;
|
|
3358
3773
|
};
|
|
3359
3774
|
/**
|
|
@@ -3363,16 +3778,16 @@ type HandoffRendererResult = {
|
|
|
3363
3778
|
* {@link loadSessionEntries} / {@link enumerateApprovals}). It assembles the
|
|
3364
3779
|
* the spec's `handoff.md` sections in order:
|
|
3365
3780
|
*
|
|
3366
|
-
* 1.
|
|
3367
|
-
* 2.
|
|
3781
|
+
* 1. Current state: latest live session (status not archived, source not import).
|
|
3782
|
+
* 2. Recently changed files: the most recent session's `related_files`, dedup +
|
|
3368
3783
|
* sorted asc + truncated to `relatedFilesLimit` (default 20).
|
|
3369
|
-
* 3.
|
|
3370
|
-
* 4.
|
|
3371
|
-
* 5.
|
|
3784
|
+
* 3. Latest decision: latest `decision_recorded` event (chronological).
|
|
3785
|
+
* 4. Unresolved items: pending-approval count + suspect-session count.
|
|
3786
|
+
* 5. Files to read next: `.basou/decisions.md` + top-3 related files
|
|
3372
3787
|
* (the same `displayedFiles` source is intentionally reused in two
|
|
3373
3788
|
* sections — overview vs. resume context).
|
|
3374
|
-
* 6.
|
|
3375
|
-
* 7.
|
|
3789
|
+
* 6. Work to do next: placeholder until task events land.
|
|
3790
|
+
* 7. Sessions: all sessions newest first with inline suspect labels.
|
|
3376
3791
|
*
|
|
3377
3792
|
* Session enumeration goes through {@link loadSessionEntries} so the set of
|
|
3378
3793
|
* sessions whose `decision_recorded` events we replay matches the
|
|
@@ -3595,7 +4010,7 @@ type OrientationRendererInput = {
|
|
|
3595
4010
|
/**
|
|
3596
4011
|
* Result of a read-only dry-run staleness probe (sessions a `basou refresh`
|
|
3597
4012
|
* would add or update), computed by the CLI which holds the import context.
|
|
3598
|
-
* Drives the plain "
|
|
4013
|
+
* Drives the plain "is this current" verdict. `null` / omitted = not probed, so
|
|
3599
4014
|
* the verdict says it cannot confirm freshness rather than claiming current.
|
|
3600
4015
|
*/
|
|
3601
4016
|
staleness?: {
|
|
@@ -3609,6 +4024,12 @@ type OrientationRendererInput = {
|
|
|
3609
4024
|
* reads as a verdict for a supervisor, not developer diagnostics.
|
|
3610
4025
|
*/
|
|
3611
4026
|
verbose?: boolean;
|
|
4027
|
+
/**
|
|
4028
|
+
* Generated-view chrome language. Omitted (the normal path) = resolved from
|
|
4029
|
+
* the manifest's anchor repo via {@link resolveViewLanguageFromPaths}; the
|
|
4030
|
+
* override exists for tests and programmatic callers that already resolved it.
|
|
4031
|
+
*/
|
|
4032
|
+
language?: ViewLanguage;
|
|
3612
4033
|
/**
|
|
3613
4034
|
* Additional trail stores to MERGE into this orientation, each a local path
|
|
3614
4035
|
* (an SSHFS mount / rsync mirror of another host's `.basou`) tagged with a
|
|
@@ -3664,8 +4085,8 @@ type NoteRecord = {
|
|
|
3664
4085
|
host: string | null;
|
|
3665
4086
|
};
|
|
3666
4087
|
/**
|
|
3667
|
-
* One recent session condensed to its direction signal, for the "
|
|
3668
|
-
*
|
|
4088
|
+
* One recent session condensed to its direction signal, for the "recent
|
|
4089
|
+
* direction" section. Across the last N non-archived sessions
|
|
3669
4090
|
* (newest first), this surfaces the ARC of recent intent — the decision titles
|
|
3670
4091
|
* and next-step notes recorded in EACH session — rather than orientation's
|
|
3671
4092
|
* single latest decision/note, which can be stale or missing. When a session
|
|
@@ -3748,7 +4169,7 @@ type OrientationSummary = {
|
|
|
3748
4169
|
decisionCount: number;
|
|
3749
4170
|
/**
|
|
3750
4171
|
* Open (non-voided) `kind: "track"` decisions — strategic, unfinished
|
|
3751
|
-
* directions that the forward section ("
|
|
4172
|
+
* directions that the forward section ("where you are heading") resurfaces every session
|
|
3752
4173
|
* until they are closed with `decision void` / supersede. Newest first. This
|
|
3753
4174
|
* is the intent-continuity layer: distinct from the single latest decision
|
|
3754
4175
|
* (point-in-time) and the recorded next step (`note`), an open track keeps
|
|
@@ -3758,12 +4179,12 @@ type OrientationSummary = {
|
|
|
3758
4179
|
openTracks: TrackRecord[];
|
|
3759
4180
|
/**
|
|
3760
4181
|
* Most recent `note_added` over non-archived sessions — the recorded next
|
|
3761
|
-
* step / handoff ("
|
|
4182
|
+
* step / handoff ("next step") surfaced in the forward section; null when none.
|
|
3762
4183
|
*/
|
|
3763
4184
|
latestNote: NoteRecord | null;
|
|
3764
4185
|
/**
|
|
3765
4186
|
* The last N non-archived sessions (newest first) condensed to their direction
|
|
3766
|
-
* signal — the "
|
|
4187
|
+
* signal — the "recent direction" arc. Distinct from the single
|
|
3767
4188
|
* latest decision/note: it shows the trajectory of intent across recent
|
|
3768
4189
|
* sessions, and falls back to each session's changed files when no decision or
|
|
3769
4190
|
* note was captured, so a resuming agent has grounding even when explicit
|
|
@@ -3872,12 +4293,20 @@ declare function renderOrientation(input: OrientationRendererInput): Promise<Ori
|
|
|
3872
4293
|
* the output is a function of the manifest snapshot at seed time. It embeds no
|
|
3873
4294
|
* operator-specific string beyond the declared repo names / project name.
|
|
3874
4295
|
*/
|
|
4296
|
+
|
|
3875
4297
|
/** One roster repo referenced by the anchor starter's per-repo pointers. */
|
|
3876
4298
|
type AnchorStarterRepo = {
|
|
3877
4299
|
/** The repo's display name (its on-disk basename). */
|
|
3878
4300
|
name: string;
|
|
3879
4301
|
/** True when this repo IS the anchor (the planning master itself; excluded from the pointers). */
|
|
3880
4302
|
anchor?: boolean | undefined;
|
|
4303
|
+
/**
|
|
4304
|
+
* The repo's declared `language`. Only the ANCHOR entry's value participates:
|
|
4305
|
+
* the starter is the anchor's own file, so its content language follows the
|
|
4306
|
+
* anchor's declared audience (`ja` renders the pre-i18n Japanese bytes;
|
|
4307
|
+
* anything else renders English).
|
|
4308
|
+
*/
|
|
4309
|
+
language?: RepoLanguage | undefined;
|
|
3881
4310
|
};
|
|
3882
4311
|
/** The declared fields the anchor starter is rendered from. */
|
|
3883
4312
|
type AnchorStarterInput = {
|
|
@@ -3896,171 +4325,13 @@ type AnchorStarterInput = {
|
|
|
3896
4325
|
* declaration; everything basou cannot know (product facts, phase, secrets,
|
|
3897
4326
|
* language policy) is left as an explicit `<!-- TODO -->` for the operator. The
|
|
3898
4327
|
* live roster is NOT snapshotted here — the file points at the workspace view's
|
|
3899
|
-
* generated AGENTS.md for it.
|
|
4328
|
+
* generated AGENTS.md for it. The content language follows the ANCHOR entry's
|
|
4329
|
+
* declared `language` (a ja anchor renders byte-identical to the pre-i18n
|
|
4330
|
+
* output; anything else renders English). Returns the file content WITH a
|
|
4331
|
+
* trailing newline.
|
|
3900
4332
|
*/
|
|
3901
4333
|
declare function renderAnchorStarter(input: AnchorStarterInput): string;
|
|
3902
4334
|
|
|
3903
|
-
/**
|
|
3904
|
-
* Project roster drift (the "saddle" model). A project's repos are DECLARED
|
|
3905
|
-
* once in the manifest's `repos` list; the capture config (`source_roots`) must
|
|
3906
|
-
* cover every declared repo. This computes the drift between the two so
|
|
3907
|
-
* `basou project check` can surface a declared repo that is NOT being captured
|
|
3908
|
-
* — the class of bug where a companion repo was wired into the workspace but
|
|
3909
|
-
* never added to `source_roots`, so its work silently fell out of capture.
|
|
3910
|
-
*
|
|
3911
|
-
* Pure: it compares declared relative paths against captured relative paths and
|
|
3912
|
-
* performs no filesystem or git I/O. Paths are compared as declared (both lists
|
|
3913
|
-
* use the same machine-portable relative-path form), not resolved on disk.
|
|
3914
|
-
*/
|
|
3915
|
-
type RepoVisibility = "public" | "private" | "future-public";
|
|
3916
|
-
/**
|
|
3917
|
-
* The audience-driven language axis. Independent of visibility: a private repo
|
|
3918
|
-
* can publish English content, a public repo can carry bilingual docs. `en` /
|
|
3919
|
-
* `ja` for a single audience, `en+ja` when both are served.
|
|
3920
|
-
*/
|
|
3921
|
-
type RepoLanguage = "en" | "ja" | "en+ja";
|
|
3922
|
-
/** A published surface a repo emits: a deployed website or a package registry. */
|
|
3923
|
-
type PublishKind = "web" | "npm";
|
|
3924
|
-
/**
|
|
3925
|
-
* Where a repo's agent instruction files live (the instruction-source axis),
|
|
3926
|
-
* independent of visibility / language / publishes. `hub` is basou's native,
|
|
3927
|
-
* generated hub-and-spoke topology (canonical in the anchor, gitignored symlinks
|
|
3928
|
-
* in each repo); `self` is the additive opt-in where the canonical AGENTS.md is a
|
|
3929
|
-
* regular committed file in the repo itself and basou stays hands-off about its
|
|
3930
|
-
* content. See {@link instructionMode} for the default (absent => `hub`).
|
|
3931
|
-
*/
|
|
3932
|
-
type RepoInstructions = "hub" | "self";
|
|
3933
|
-
/**
|
|
3934
|
-
* One published surface. Its visibility and language are INDEPENDENT of the
|
|
3935
|
-
* source repo's: a private repo commonly publishes a public website. Both are
|
|
3936
|
-
* optional so a surface can be declared
|
|
3937
|
-
* before those facts are pinned down (mirroring how `adopt` leaves repo
|
|
3938
|
-
* visibility unset for the operator to fill in).
|
|
3939
|
-
*/
|
|
3940
|
-
type PublishTarget = {
|
|
3941
|
-
kind: PublishKind;
|
|
3942
|
-
visibility?: RepoVisibility | undefined;
|
|
3943
|
-
language?: RepoLanguage | undefined;
|
|
3944
|
-
};
|
|
3945
|
-
type RepoEntry = {
|
|
3946
|
-
/** Path relative to the manifest repo root (e.g. ".", "../takuhon"). */
|
|
3947
|
-
path: string;
|
|
3948
|
-
visibility?: RepoVisibility | undefined;
|
|
3949
|
-
/** Source language (commits/comments/code, read by contributors). Independent of visibility. */
|
|
3950
|
-
language?: RepoLanguage | undefined;
|
|
3951
|
-
/** Published surfaces this repo emits (opt-in; absent for a repo that publishes nothing). */
|
|
3952
|
-
publishes?: PublishTarget[] | undefined;
|
|
3953
|
-
/**
|
|
3954
|
-
* Instruction-source mode. Absent => `hub` (basou's native generated topology),
|
|
3955
|
-
* so an existing roster's behavior is unchanged. `self` opts the repo out of
|
|
3956
|
-
* generation: its AGENTS.md is a hand-authored committed file and basou stays
|
|
3957
|
-
* hands-off. Resolve the effective mode with {@link instructionMode}.
|
|
3958
|
-
*/
|
|
3959
|
-
instructions?: RepoInstructions | undefined;
|
|
3960
|
-
};
|
|
3961
|
-
/**
|
|
3962
|
-
* The effective instruction-source mode for a repo: the declared `instructions`,
|
|
3963
|
-
* defaulting to `hub` when absent. The default is the single guarantee that an
|
|
3964
|
-
* existing roster (which has no `instructions` field) keeps basou's current
|
|
3965
|
-
* hub-and-spoke behavior byte-for-byte — every generator branches on this, never
|
|
3966
|
-
* on the raw optional field, so "absent => hub" is decided in exactly one place.
|
|
3967
|
-
*/
|
|
3968
|
-
declare function instructionMode(entry: {
|
|
3969
|
-
instructions?: RepoInstructions | undefined;
|
|
3970
|
-
}): RepoInstructions;
|
|
3971
|
-
type RosterDriftSummary = {
|
|
3972
|
-
declaredCount: number;
|
|
3973
|
-
capturedCount: number;
|
|
3974
|
-
/** Declared in `repos` but absent from `source_roots`: a capture gap. */
|
|
3975
|
-
gaps: RepoEntry[];
|
|
3976
|
-
/** In `source_roots` but not declared in `repos` (e.g. a workspace view, or a stray). */
|
|
3977
|
-
extra: string[];
|
|
3978
|
-
/** Declared paths that are also captured. */
|
|
3979
|
-
matched: string[];
|
|
3980
|
-
/** True when there is no capture gap (every declared repo is covered). */
|
|
3981
|
-
ok: boolean;
|
|
3982
|
-
};
|
|
3983
|
-
/**
|
|
3984
|
-
* Compute the {@link RosterDriftSummary} for a project. A declared repo missing
|
|
3985
|
-
* from the captured set is a `gap` (the surfaced suspicion); a captured path not
|
|
3986
|
-
* in the declared set is `extra` (commonly the workspace view, which is a
|
|
3987
|
-
* capture source but not itself a project repo). With no declared roster, there
|
|
3988
|
-
* are no gaps (nothing to check against) and every captured path is `extra`.
|
|
3989
|
-
*/
|
|
3990
|
-
declare function summarizeRosterDrift(input: {
|
|
3991
|
-
repos?: RepoEntry[];
|
|
3992
|
-
sourceRoots?: string[];
|
|
3993
|
-
}): RosterDriftSummary;
|
|
3994
|
-
type SourceRootsReconcile = {
|
|
3995
|
-
/**
|
|
3996
|
-
* The reconciled `source_roots`: the existing entries verbatim, then every
|
|
3997
|
-
* declared repo path that was missing (normalized, in roster order). Existing
|
|
3998
|
-
* order and form are preserved so the manifest diff is minimal and reversible.
|
|
3999
|
-
*/
|
|
4000
|
-
next: string[];
|
|
4001
|
-
/** Declared repo paths (normalized) that were appended because `source_roots` did not cover them. */
|
|
4002
|
-
added: string[];
|
|
4003
|
-
/** True when `source_roots` already covers every declared repo (`next` equals the current list). */
|
|
4004
|
-
unchanged: boolean;
|
|
4005
|
-
};
|
|
4006
|
-
/**
|
|
4007
|
-
* Derive the `source_roots` a project's declared repo roster requires. The
|
|
4008
|
-
* roster (`repos`) is the single source of truth for which repos belong to the
|
|
4009
|
-
* project; this is the actuator behind `basou project sync`, computing the
|
|
4010
|
-
* additive reconciliation so every declared repo is captured.
|
|
4011
|
-
*
|
|
4012
|
-
* ADDITIVE ONLY: it appends declared paths that are missing and never removes
|
|
4013
|
-
* an existing entry. A captured-but-undeclared path (commonly the generated
|
|
4014
|
-
* workspace view — a legitimate capture source that is not itself a project
|
|
4015
|
-
* repo) is preserved; pruning strays is deferred to the slice that generates
|
|
4016
|
-
* the view (so basou knows which extras it owns). Existing entries are kept
|
|
4017
|
-
* byte-identical; only appended paths are normalized.
|
|
4018
|
-
*
|
|
4019
|
-
* Pure: no filesystem or git I/O. Paths are compared in the same normalized
|
|
4020
|
-
* form as {@link summarizeRosterDrift}, so a trailing-slash variant of an
|
|
4021
|
-
* already-captured repo is not re-appended.
|
|
4022
|
-
*/
|
|
4023
|
-
declare function reconcileSourceRoots(input: {
|
|
4024
|
-
repos?: RepoEntry[];
|
|
4025
|
-
sourceRoots?: string[];
|
|
4026
|
-
}): SourceRootsReconcile;
|
|
4027
|
-
/**
|
|
4028
|
-
* On-disk classification of a source-root candidate during adoption: a git repo
|
|
4029
|
-
* root (→ becomes a roster entry), a resolved-but-non-repo directory (the
|
|
4030
|
-
* generated workspace view, `/tmp`, a scratch dir → excluded), or a path that
|
|
4031
|
-
* could not be resolved on disk (→ excluded).
|
|
4032
|
-
*/
|
|
4033
|
-
type AdoptCandidateKind = "repo" | "non-repo" | "unresolved";
|
|
4034
|
-
type AdoptCandidate = {
|
|
4035
|
-
/** Source-root path as declared (relative to the manifest root). */
|
|
4036
|
-
path: string;
|
|
4037
|
-
/** On-disk classification; the filesystem probing that produces it is the caller's job. */
|
|
4038
|
-
kind: AdoptCandidateKind;
|
|
4039
|
-
};
|
|
4040
|
-
type RosterAdoptionPlan = {
|
|
4041
|
-
/** Proposed `repos` entries: the candidates that are git repos (visibility left unset for the operator). */
|
|
4042
|
-
repos: RepoEntry[];
|
|
4043
|
-
/** Candidates excluded from the roster, with why (a non-repo directory, or an unresolvable path). */
|
|
4044
|
-
excluded: {
|
|
4045
|
-
path: string;
|
|
4046
|
-
kind: Exclude<AdoptCandidateKind, "repo">;
|
|
4047
|
-
}[];
|
|
4048
|
-
};
|
|
4049
|
-
/**
|
|
4050
|
-
* Plan a `repos` roster from classified source-root candidates (the actuator
|
|
4051
|
-
* behind `basou project adopt`). Pure: it partitions already-classified
|
|
4052
|
-
* candidates — the realpath / `.git` filesystem probing that produces each
|
|
4053
|
-
* `kind` is the caller's job, so this stays testable without disk I/O.
|
|
4054
|
-
*
|
|
4055
|
-
* A git repo becomes a roster entry (path only; visibility is left unset because
|
|
4056
|
-
* it is a human judgment, kept independent of the other axes). A non-repo
|
|
4057
|
-
* (commonly the generated workspace view) or an unresolvable path is excluded and
|
|
4058
|
-
* reported, so the operator sees what was dropped and why before editing. Repo
|
|
4059
|
-
* paths are deduped by normalized form, preserving the first declared form and
|
|
4060
|
-
* order.
|
|
4061
|
-
*/
|
|
4062
|
-
declare function planRosterAdoption(candidates: AdoptCandidate[]): RosterAdoptionPlan;
|
|
4063
|
-
|
|
4064
4335
|
/**
|
|
4065
4336
|
* Archive (fold) a repo out of a project's declared roster — the inverse of
|
|
4066
4337
|
* `adopt` + `sync`, and the first PRUNING step in the saddle model (every prior
|
|
@@ -4226,7 +4497,7 @@ type PresetRepo = {
|
|
|
4226
4497
|
};
|
|
4227
4498
|
/**
|
|
4228
4499
|
* Whether a repo has anything to render. A repo with no visibility, no language,
|
|
4229
|
-
* and no published surface yields an all-"
|
|
4500
|
+
* and no published surface yields an all-"unset" block that helps no one, so it
|
|
4230
4501
|
* is reported as `undeclared` rather than generated.
|
|
4231
4502
|
*/
|
|
4232
4503
|
declare function isRenderable(repo: PresetRepo): boolean;
|
|
@@ -4235,9 +4506,12 @@ declare function isRenderable(repo: PresetRepo): boolean;
|
|
|
4235
4506
|
* BASOU:GENERATED markers in a canonical). Deterministic and OSS-generic: it
|
|
4236
4507
|
* derives entirely from the declared fields, embedding no operator-specific
|
|
4237
4508
|
* names, so re-running on an unchanged manifest produces byte-identical output
|
|
4238
|
-
* (the basis for drift detection). The
|
|
4239
|
-
*
|
|
4240
|
-
*
|
|
4509
|
+
* (the basis for drift detection). The block's content language follows the
|
|
4510
|
+
* repo's own declared `language` (its audience): `ja` renders the Japanese
|
|
4511
|
+
* strings byte-identical to the pre-i18n output; `en` / `en+ja` / undeclared
|
|
4512
|
+
* render English. The published surfaces are listed in their declared order.
|
|
4513
|
+
* Returns the block WITHOUT a trailing newline; the marker writer adds the
|
|
4514
|
+
* surrounding structure.
|
|
4241
4515
|
*/
|
|
4242
4516
|
declare function renderPresetBlock(repo: PresetRepo): string;
|
|
4243
4517
|
/** One repo aggregated by the view, rendered with its short visibility / language. */
|
|
@@ -4276,10 +4550,12 @@ type ViewPresetInput = {
|
|
|
4276
4550
|
* {@link renderPresetBlock} it is deterministic and OSS-generic: it derives
|
|
4277
4551
|
* entirely from the declared roster (repo names come from the manifest, no
|
|
4278
4552
|
* operator-specific string is embedded), so re-running on an unchanged manifest
|
|
4279
|
-
* produces byte-identical output. The
|
|
4280
|
-
*
|
|
4281
|
-
*
|
|
4282
|
-
*
|
|
4553
|
+
* produces byte-identical output. The view is a workspace-level artifact, so
|
|
4554
|
+
* its content language follows the ANCHOR entry's declared language (mirroring
|
|
4555
|
+
* the generated views' rule); a `ja` anchor renders byte-identical to the
|
|
4556
|
+
* pre-i18n output. The repos are listed in the order supplied. An empty roster
|
|
4557
|
+
* still renders cleanly (a header-only table, empty lists). Returns the block
|
|
4558
|
+
* WITHOUT a trailing newline; the marker writer adds the surrounding structure.
|
|
4283
4559
|
*/
|
|
4284
4560
|
declare function renderViewPresetBlock(input: ViewPresetInput): string;
|
|
4285
4561
|
/**
|
|
@@ -5549,6 +5825,12 @@ type ReportRendererInput = {
|
|
|
5549
5825
|
onWarning?: (warning: ReplayWarning, sessionId: string) => void;
|
|
5550
5826
|
onSessionSkip?: (sessionId: string, reason: SessionSkipReason) => void;
|
|
5551
5827
|
onTaskSkip?: (taskId: string, reason: TaskSkipReason) => void;
|
|
5828
|
+
/**
|
|
5829
|
+
* Generated-view chrome language. Omitted (the normal path) = resolved from
|
|
5830
|
+
* the manifest's anchor repo via {@link resolveViewLanguageFromPaths}; the
|
|
5831
|
+
* override exists for tests and programmatic callers that already resolved it.
|
|
5832
|
+
*/
|
|
5833
|
+
language?: ViewLanguage;
|
|
5552
5834
|
};
|
|
5553
5835
|
type ReportSessionItem = {
|
|
5554
5836
|
id: string;
|
|
@@ -6431,4 +6713,4 @@ declare function overwriteYamlFile(filePath: string, value: unknown): Promise<vo
|
|
|
6431
6713
|
*/
|
|
6432
6714
|
declare const BASOU_CORE_VERSION = "0.1.0";
|
|
6433
6715
|
|
|
6434
|
-
export { ACTIVE_GAP_CAP_MS, AGENT_INFRA_DIRS, type ActiveTimeBasis, type AdapterOutputEvent, type AdoptCandidate, type AdoptCandidateKind, type AnchorStarterInput, type AnchorStarterRepo, type AppendBasouGitignoreOptions, type AppendBasouGitignoreResult, type AppendEventToExistingInput, type AppendEventToExistingResult, type Approval, type ApprovalApprovedEvent, type ApprovalExpiredEvent, ApprovalIdSchema, type ApprovalLocation, type ApprovalRejectedEvent, type ApprovalRequestedEvent, ApprovalSchema, type ApprovalStatus, ApprovalStatusSchema, type ArchivePlan, type ArchiveTaskInput, type ArchiveTaskResult, type AttachTaskInput, type AttachUpdateTaskStatusInput, type AttachableStatus, BASOU_CORE_VERSION, type BasouPaths, type BuildStopHookCommandOptions, type BulkChainResult, CLAUDE_IMPORT_SOURCE, CODEX_IMPORT_SOURCE, type CaptureMode, type ChainBreakReason, type ChainTailState, type ChainVerdict, type ChainVerdictStatus, type ChainedEvents, ChildProcessRunner, type CitedReview, type ClaudeSettings, type ClaudeTranscriptRecord, type ClaudeTranscriptToPayloadOptions, type CodexCommandLookup, type CodexRolloutRecord, type CodexRolloutToPayloadOptions, type CommandExecutedEvent, type CommandLookup, type CreateAdHocSessionInput, type CreateAdHocSessionResult, type CreateAdHocTaskInput, type CreateManifestInput, type CreateTaskInput, type CreateTaskResult, DEFAULT_STOP_HOOK_MIN_EDITS, type DayWorkStats, DecisionIdSchema, type DecisionRecordedEvent, type DecisionsRendererInput, type DecisionsRendererResult, type DeleteTaskInput, type DeleteTaskResult, type DiffResult, type EditTaskInput, type EditTaskResult, type Event, EventIdSchema, EventSchema, EventSourceSchema, type ExistingViewLink, FailedToFinalizeError, type FederatedRoot, type FileChange, type FileChangeStatus, type FileChangedEvent, GENERATED_END, GENERATED_START, type GitSnapshot, type GitSnapshotEvent, type GitignorePlanSummary, type HandoffRendererInput, type HandoffRendererResult, ID_PREFIXES, type IdPrefix, type ImportSessionOptions, type ImportSessionResult, type IncompleteWiring, type InstructionFileFact, type InstructionSymlinkFact, type InstructionSymlinkState, IsoTimestampSchema, JSON_SCHEMA_VERSION, type JsonSchemaArtifact, type LoadFederatedOptions, type LoadSessionEntriesOptions, type LoadTaskEntriesOptions, type LoadedApproval, type LockHandle, type LockScope, type Manifest, ManifestSchema, type MarkerSection, type Markers, type MeasureAvailability, type MissingCanonical, type NoteAddedEvent, ORIENTATION_END, ORIENTATION_START, type OrientationRendererInput, type OrientationRendererResult, type OrientationSummary, PROTOCOL_END, PROTOCOL_START, type PrefixedId, type PresetAction, type PresetCollision, type PresetMarkerConflict, type PresetMarkerKind, type PresetPlanSummary, type PresetRepo, type ProcessRunner, type PublishKind, type PublishTarget, REVIEW_RECORD_NO_INPUT_HINT, type RechainOptions, type RechainResult, type ReconcileAllResult, type ReconcileAllTasksInput, type ReconcileAllTasksOptions, type ReconcileFailure, type ReconcileResult, type ReconcileTaskInput, type RefreshLinkageInput, type RefreshLinkageResult, type ReimportOptions, type ReimportResult, type RenamePlan, type ReplayOptions, type ReplayWarning, type RepoEntry, type RepoGitignoreFacts, type RepoGitignorePlan, type RepoInstructions, type RepoLanguage, type RepoPresetFacts, type RepoPresetPlan, type RepoSymlinkFacts, type RepoSymlinkPlan, type RepoVisibility, type RepoWiringFacts, type ReportApprovalItem, type ReportData, type ReportDecisionItem, type ReportRendererInput, type ReportRendererResult, type ReportSessionItem, type ReportTaskItem, type RetrofitAction, type RetrofitAgentsState, type RetrofitFacts, type RetrofitPlan, type RetrofitReason, type ReviewBlocked, type ReviewFinding, type ReviewGapRepoSummary, type ReviewGapUnit, type ReviewGapVerdict, type ReviewGapsInput, type ReviewGapsSummary, type ReviewGateResult, type ReviewGateSilentReason, type ReviewRecordBlockedInput, type ReviewRecordFindingInput, type ReviewRecordInput, type ReviewRecordedEvent, type RiskLevel, RiskLevelSchema, type RosterAdoptionPlan, type RosterDriftSummary, type RunOptions, type RunResult, STOP_HOOK_TIMEOUT_SECONDS, STUCK_THRESHOLD_MS, type SanitizePathOptions, type SanitizeRelatedFilesResult, SchemaVersionSchema, type Session, type SessionEndedEvent, type SessionEntry, SessionIdSchema, type SessionImportPayload, SessionImportPayloadSchema, type SessionInnerImportInput, SessionInnerImportSchema, type SessionIntegrity, SessionIntegritySchema, type SessionMetrics, SessionMetricsSchema, SessionSchema, type SessionSkipReason, type SessionSourceKind, SessionSourceKindSchema, type SessionStartedEvent, type SessionStatus, type SessionStatusChangedEvent, SessionStatusSchema, type SessionWorkStats, type SourceRootScope, type SourceRootsReconcile, type SourceWorkStats, type StatusCount, StatusSchema, type StatusSnapshot, type StopHookEvaluation, type StopHookEvaluationInput, type StopHookRemoval, type StopHookSilentReason, type StopHookUpsert, type SuspectReason, type SymlinkCollision, type SymlinkConflict, type SymlinkPlanSummary, type Task, type TaskArchivedEvent, type TaskCreatedEvent, type TaskDeletedEvent, type TaskDocument, TaskIdSchema, type TaskLinkageRefreshedEvent, type TaskReconciledEvent, TaskSchema, type TaskSkipReason, type TaskStatus, type TaskStatusChangedEvent, type TaskStatusCount, TaskStatusSchema, TaskWriteAfterEventError, type TaskWriteAfterEventPhase, type TokenTotals, type UpdateAdHocTaskStatusInput, type UpdateTaskStatusInput, type UpdateTaskStatusResult, type ViewCollision, type ViewConflict, type ViewLinkState, type ViewPresetInput, type ViewPresetRepo, type ViewRepoFact, type ViewStrayUnknown, type ViewWiringFacts, type WiringCollision, type WiringConflict, type WiringDriftSummary, type WiringRisk, type WiringSummary, type WorkStatsInput, type WorkStatsResult, type WorkStatsTotals, WorkspaceIdSchema, type WorkspaceViewPlan, type WriteEventsBulkOptions, type WriteTaskFileMode, acquireLock, appendBasouGitignore, appendChainedEvent, appendChainedEventLocked, appendEvent, appendEventToExistingSession, archiveTask, assertBasouRootSafe, basouPaths, buildJsonSchemas, buildReviewRecordLabel, buildReviewRecordedEvent, buildStatusSnapshot, buildStopHookCommand, chainEvents, chainRawJsonLines, classifyFilesBySourceRoot, classifyRetrofit, classifySuspect, claudeCodeAdapterMetadata, claudeTranscriptToImportPayload, codexAdapterMetadata, codexRolloutToImportPayload, computeWorkStats, createAdHocSessionWithEvent, createManifest, createTaskWithEvent, deleteTask, editTask, ensureBasouDirectory, enumerateApprovals, enumerateArchivedTaskIds, enumerateSessionDirs, enumerateTaskIds, evaluateStopHook, finalizeSessionYaml, findBasouStopHookCommand, findErrorCode, findReviewGaps, formatDurationMs, genesisHash, getDiff, getSnapshot, importSessionFromJson, inspectChainTail, instructionMode, isBasouStopHookCommand, isGitNotFound, isImportDerivedSource, isLazyExpired, isRenderable, isValidPrefixedId, lineHash, linkYamlFile, loadApproval, loadFederatedSessionEntries, loadSessionEntries, loadTaskEntries, normalizeRepoKey, normalizeRepoPath, overwriteYamlFile, parseDuration, parseMarkers, parseReviewRecordInput, pathBasename, planArchive, planGitignore, planRename, planRosterAdoption, planWorkspaceView, prefixedUlid, readAllEvents, readManifest, readMarkdownFile, readSessionYaml, readStatus, readTaskFile, readTaskFileWithArchiveFallback, readYamlFile, rechainSessionInPlace, reconcileAllTasks, reconcileSourceRoots, reconcileTask, refreshTaskLinkedSessions, reimportPreservingId, removeMarkerSection, removeStopHook, renderAnchorStarter, renderDecisions, renderHandoff, renderOrientation, renderPresetBlock, renderReport, renderViewPresetBlock, renderWithMarkers, replayEvents, resolveBasouRepositoryRoot, resolveClaudeCodeCommand, resolveCodexCommand, resolveRepositoryRoot, resolveSessionId, resolveTaskId, safeSimpleGit, sanitizePath, sanitizeRelatedFiles, sanitizeWorkingDirectory, seedMarkers, serializeEventLine, serializeJsonSchema, sessionWorkStatsFromEvents, summarizeAdapterOutput, summarizeOrientation, summarizePresetPlan, summarizeRosterDrift, summarizeSymlinkPlan, summarizeWiring, summarizeWiringDrift, tryRemoteUrl, ulid, unknownManifestKeys, updateTaskStatusWithEvent, upsertStopHook, verifyEventsChain, writeEventsBulk, writeManifest, writeMarkdownFile, writeStatus, writeTaskFile, writeYamlFile };
|
|
6716
|
+
export { ACTIVE_GAP_CAP_MS, AGENT_INFRA_DIRS, type ActiveTimeBasis, type AdapterOutputEvent, type AdoptCandidate, type AdoptCandidateKind, type AnchorStarterInput, type AnchorStarterRepo, type AppendBasouGitignoreOptions, type AppendBasouGitignoreResult, type AppendEventToExistingInput, type AppendEventToExistingResult, type Approval, type ApprovalApprovedEvent, type ApprovalExpiredEvent, ApprovalIdSchema, type ApprovalLocation, type ApprovalRejectedEvent, type ApprovalRequestedEvent, ApprovalSchema, type ApprovalStatus, ApprovalStatusSchema, type ArchivePlan, type ArchiveTaskInput, type ArchiveTaskResult, type AttachTaskInput, type AttachUpdateTaskStatusInput, type AttachableStatus, BASOU_CORE_VERSION, type BasouPaths, type BuildStopHookCommandOptions, type BulkChainResult, CLAUDE_IMPORT_SOURCE, CODEX_IMPORT_SOURCE, type CaptureMode, type ChainBreakReason, type ChainTailState, type ChainVerdict, type ChainVerdictStatus, type ChainedEvents, ChildProcessRunner, type CitedReview, type ClaudeSettings, type ClaudeTranscriptRecord, type ClaudeTranscriptToPayloadOptions, type CodexCommandLookup, type CodexRolloutRecord, type CodexRolloutToPayloadOptions, type CommandExecutedEvent, type CommandLookup, type CreateAdHocSessionInput, type CreateAdHocSessionResult, type CreateAdHocTaskInput, type CreateManifestInput, type CreateTaskInput, type CreateTaskResult, DEFAULT_STOP_HOOK_MIN_EDITS, type DayWorkStats, DecisionIdSchema, type DecisionRecordedEvent, type DecisionsRendererInput, type DecisionsRendererResult, type DeleteTaskInput, type DeleteTaskResult, type DiffResult, type EditTaskInput, type EditTaskResult, type Event, EventIdSchema, EventSchema, EventSourceSchema, type ExistingViewLink, FailedToFinalizeError, type FederatedRoot, type FileChange, type FileChangeStatus, type FileChangedEvent, GENERATED_END, GENERATED_START, type GitSnapshot, type GitSnapshotEvent, type GitignorePlanSummary, type HandoffRendererInput, type HandoffRendererResult, ID_PREFIXES, type IdPrefix, type ImportSessionOptions, type ImportSessionResult, type IncompleteWiring, type InstructionFileFact, type InstructionSymlinkFact, type InstructionSymlinkState, IsoTimestampSchema, JSON_SCHEMA_VERSION, type JsonSchemaArtifact, type LoadFederatedOptions, type LoadSessionEntriesOptions, type LoadTaskEntriesOptions, type LoadedApproval, type LockHandle, type LockScope, type Manifest, ManifestSchema, type MarkerSection, type Markers, type MeasureAvailability, type MissingCanonical, type NoteAddedEvent, ORIENTATION_END, ORIENTATION_START, type OrientationRendererInput, type OrientationRendererResult, type OrientationSummary, PROTOCOL_END, PROTOCOL_START, type PrefixedId, type PresetAction, type PresetCollision, type PresetMarkerConflict, type PresetMarkerKind, type PresetPlanSummary, type PresetRepo, type PresetStrings, type ProcessRunner, type PublishKind, type PublishTarget, REVIEW_RECORD_NO_INPUT_HINT, type RechainOptions, type RechainResult, type ReconcileAllResult, type ReconcileAllTasksInput, type ReconcileAllTasksOptions, type ReconcileFailure, type ReconcileResult, type ReconcileTaskInput, type RefreshLinkageInput, type RefreshLinkageResult, type ReimportOptions, type ReimportResult, type RenamePlan, type ReplayOptions, type ReplayWarning, type RepoEntry, type RepoGitignoreFacts, type RepoGitignorePlan, type RepoInstructions, type RepoLanguage, type RepoPresetFacts, type RepoPresetPlan, type RepoSymlinkFacts, type RepoSymlinkPlan, type RepoVisibility, type RepoWiringFacts, type ReportApprovalItem, type ReportData, type ReportDecisionItem, type ReportRendererInput, type ReportRendererResult, type ReportSessionItem, type ReportTaskItem, type RetrofitAction, type RetrofitAgentsState, type RetrofitFacts, type RetrofitPlan, type RetrofitReason, type ReviewBlocked, type ReviewFinding, type ReviewGapRepoSummary, type ReviewGapUnit, type ReviewGapVerdict, type ReviewGapsInput, type ReviewGapsSummary, type ReviewGateResult, type ReviewGateSilentReason, type ReviewRecordBlockedInput, type ReviewRecordFindingInput, type ReviewRecordInput, type ReviewRecordedEvent, type RiskLevel, RiskLevelSchema, type RosterAdoptionPlan, type RosterDriftSummary, type RunOptions, type RunResult, STOP_HOOK_TIMEOUT_SECONDS, STUCK_THRESHOLD_MS, type SanitizePathOptions, type SanitizeRelatedFilesResult, SchemaVersionSchema, type Session, type SessionEndedEvent, type SessionEntry, SessionIdSchema, type SessionImportPayload, SessionImportPayloadSchema, type SessionInnerImportInput, SessionInnerImportSchema, type SessionIntegrity, SessionIntegritySchema, type SessionMetrics, SessionMetricsSchema, SessionSchema, type SessionSkipReason, type SessionSourceKind, SessionSourceKindSchema, type SessionStartedEvent, type SessionStatus, type SessionStatusChangedEvent, SessionStatusSchema, type SessionWorkStats, type SourceRootScope, type SourceRootsReconcile, type SourceWorkStats, type StatusCount, StatusSchema, type StatusSnapshot, type StopHookEvaluation, type StopHookEvaluationInput, type StopHookRemoval, type StopHookSilentReason, type StopHookUpsert, type SuspectReason, type SymlinkCollision, type SymlinkConflict, type SymlinkPlanSummary, type Task, type TaskArchivedEvent, type TaskCreatedEvent, type TaskDeletedEvent, type TaskDocument, TaskIdSchema, type TaskLinkageRefreshedEvent, type TaskReconciledEvent, TaskSchema, type TaskSkipReason, type TaskStatus, type TaskStatusChangedEvent, type TaskStatusCount, TaskStatusSchema, TaskWriteAfterEventError, type TaskWriteAfterEventPhase, type TokenTotals, type UpdateAdHocTaskStatusInput, type UpdateTaskStatusInput, type UpdateTaskStatusResult, type ViewCollision, type ViewConflict, type ViewLanguage, type ViewLinkState, type ViewPresetInput, type ViewPresetRepo, type ViewRepoFact, type ViewStrayUnknown, type ViewStrings, type ViewWiringFacts, type WiringCollision, type WiringConflict, type WiringDriftSummary, type WiringRisk, type WiringSummary, type WorkStatsInput, type WorkStatsResult, type WorkStatsTotals, WorkspaceIdSchema, type WorkspaceViewPlan, type WriteEventsBulkOptions, type WriteTaskFileMode, acquireLock, appendBasouGitignore, appendChainedEvent, appendChainedEventLocked, appendEvent, appendEventToExistingSession, archiveTask, assertBasouRootSafe, basouPaths, buildJsonSchemas, buildReviewRecordLabel, buildReviewRecordedEvent, buildStatusSnapshot, buildStopHookCommand, chainEvents, chainRawJsonLines, classifyFilesBySourceRoot, classifyRetrofit, classifySuspect, claudeCodeAdapterMetadata, claudeTranscriptToImportPayload, codexAdapterMetadata, codexRolloutToImportPayload, computeWorkStats, createAdHocSessionWithEvent, createManifest, createTaskWithEvent, deleteTask, editTask, ensureBasouDirectory, enumerateApprovals, enumerateArchivedTaskIds, enumerateSessionDirs, enumerateTaskIds, evaluateStopHook, finalizeSessionYaml, findBasouStopHookCommand, findErrorCode, findReviewGaps, formatDurationMs, genesisHash, getDiff, getSnapshot, importSessionFromJson, inspectChainTail, instructionMode, isBasouStopHookCommand, isGitNotFound, isImportDerivedSource, isLazyExpired, isRenderable, isValidPrefixedId, lineHash, linkYamlFile, loadApproval, loadFederatedSessionEntries, loadSessionEntries, loadTaskEntries, normalizeRepoKey, normalizeRepoPath, overwriteYamlFile, parseDuration, parseMarkers, parseReviewRecordInput, pathBasename, planArchive, planGitignore, planRename, planRosterAdoption, planWorkspaceView, prefixedUlid, presetStrings, readAllEvents, readManifest, readMarkdownFile, readSessionYaml, readStatus, readTaskFile, readTaskFileWithArchiveFallback, readYamlFile, rechainSessionInPlace, reconcileAllTasks, reconcileSourceRoots, reconcileTask, refreshTaskLinkedSessions, reimportPreservingId, removeMarkerSection, removeStopHook, renderAnchorStarter, renderDecisions, renderHandoff, renderOrientation, renderPresetBlock, renderReport, renderViewPresetBlock, renderWithMarkers, replayEvents, resolveAnchorContentLanguage, resolveBasouRepositoryRoot, resolveClaudeCodeCommand, resolveCodexCommand, resolveRepoContentLanguage, resolveRepositoryRoot, resolveSessionId, resolveTaskId, resolveViewLanguage, resolveViewLanguageFromPaths, safeSimpleGit, sanitizePath, sanitizeRelatedFiles, sanitizeWorkingDirectory, seedMarkers, serializeEventLine, serializeJsonSchema, sessionWorkStatsFromEvents, summarizeAdapterOutput, summarizeOrientation, summarizePresetPlan, summarizeRosterDrift, summarizeSymlinkPlan, summarizeWiring, summarizeWiringDrift, tryRemoteUrl, ulid, unknownManifestKeys, updateTaskStatusWithEvent, upsertStopHook, verifyEventsChain, viewStrings, writeEventsBulk, writeManifest, writeMarkdownFile, writeStatus, writeTaskFile, writeYamlFile };
|