@astryxdesign/cli 0.7.9-canary.6089ee6 → 0.7.9-canary.654b9c0
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/api/discover/_adapter.d.mts +1 -1
- package/api/search/_main-searcher.mjs +1 -1
- package/api/search/_result.d.mts +5 -5
- package/api/search/search.d.mts +1 -1
- package/assets/templates/blocks/components/PowerSearch/PowerSearchContentSearch.tsx +8 -7
- package/assets/templates/blocks/components/PowerSearch/PowerSearchFullFeatured.tsx +8 -7
- package/assets/templates/blocks/components/PowerSearch/PowerSearchPresetFilters.tsx +8 -7
- package/assets/templates/blocks/components/PowerSearch/PowerSearchSearchWithTable.tsx +12 -10
- package/assets/templates/blocks/components/PowerSearch/PowerSearchShowcase.tsx +8 -7
- package/assets/templates/blocks/components/Tokenizer/TokenizerClear.doc.mjs +2 -1
- package/assets/templates/blocks/components/Tokenizer/TokenizerClear.tsx +2 -2
- package/assets/templates/blocks/components/Tokenizer/TokenizerCreatable.tsx +0 -1
- package/assets/templates/blocks/components/Tokenizer/TokenizerEndContent.tsx +0 -1
- package/assets/templates/blocks/components/Tokenizer/TokenizerOverflow.doc.mjs +2 -1
- package/assets/templates/blocks/components/Tokenizer/TokenizerOverflow.tsx +0 -2
- package/assets/templates/pages/table-inbox/page.tsx +11 -8
- package/assets/templates/pages/work-item-detail/page.tsx +6 -2
- package/authoring/debug/parse.d.mts +2 -2
- package/clients/cli/index.mjs +11 -6
- package/foundation/agent-docs/agent-docs-target.d.mts +49 -0
- package/foundation/agent-docs/agent-docs-target.mjs +201 -0
- package/foundation/agent-docs/agent-docs.d.mts +1 -38
- package/foundation/agent-docs/agent-docs.mjs +16 -181
- package/foundation/config/config-path.d.mts +13 -0
- package/foundation/config/config-path.mjs +42 -0
- package/foundation/config/project.d.mts +1 -10
- package/foundation/config/project.mjs +4 -26
- package/foundation/discovery/component-loader.d.mts +1 -1
- package/foundation/discovery/icon-set-paths.d.mts +18 -0
- package/foundation/discovery/icon-set-paths.mjs +23 -0
- package/foundation/discovery/icon-set-writer.d.mts +2 -7
- package/foundation/discovery/icon-set-writer.mjs +3 -12
- package/foundation/fs/module-loader.d.mts +2 -8
- package/foundation/fs/module-loader.mjs +3 -12
- package/foundation/fs/present-files.d.mts +11 -0
- package/foundation/fs/present-files.mjs +25 -0
- package/foundation/integrations/autolink.d.mts +2 -21
- package/foundation/integrations/autolink.mjs +6 -42
- package/foundation/integrations/contribution-fixes.mjs +26 -3
- package/foundation/integrations/contribution-inventory.mjs +1 -1
- package/foundation/integrations/installed-package.d.mts +36 -0
- package/foundation/integrations/installed-package.mjs +57 -0
- package/foundation/integrations/integrations.d.mts +3 -75
- package/foundation/integrations/integrations.mjs +3 -16
- package/foundation/integrations/manifest-paths.d.mts +13 -0
- package/foundation/integrations/manifest-paths.mjs +31 -0
- package/foundation/runtime/locked-versions.mjs +1 -1
- package/foundation/runtime/package-set.mjs +1 -1
- package/package.json +9 -9
|
@@ -216,7 +216,7 @@ export const OFFICIAL_LIST_FILE: string;
|
|
|
216
216
|
*/
|
|
217
217
|
export const EXPERIMENTAL_KINDS: readonly ["icon-set"];
|
|
218
218
|
/** The item kinds every project reads: the catalog kinds, less experimental ones. */
|
|
219
|
-
export const STABLE_KINDS: ("template" | "component" | "
|
|
219
|
+
export const STABLE_KINDS: ("template" | "component" | "doc" | "theme" | "codemod" | "agent-doc" | "icon-set")[];
|
|
220
220
|
/** The list and detail entry fields for each item kind, in display order. */
|
|
221
221
|
export const KIND_FIELDS: readonly [readonly ["component", "components"], readonly ["template", "templates"], readonly ["doc", "docs"], readonly ["theme", "themes"], readonly ["codemod", "codemods"], readonly ["agent-doc", "agentDocs"], readonly ["icon-set", "iconSets"]];
|
|
222
222
|
export type ScannedPackage = import("./_package-scanner.mjs").ScannedPackage;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* domain the query wants. Its weights are static numbers in
|
|
9
9
|
* _main-searcher.weights.json.
|
|
10
10
|
* @input {query, options} and the gathered catalog with its static data
|
|
11
|
-
* @output the search response, the lexical response's shape and
|
|
11
|
+
* @output the search response, the lexical response's shape and count
|
|
12
12
|
* @position api/search; a child of the root dispatcher in tree.mjs
|
|
13
13
|
*/
|
|
14
14
|
|
package/api/search/_result.d.mts
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* (spec AST-081 FR3).
|
|
18
18
|
*/
|
|
19
19
|
export function toResult(c: Candidate, score: number, reason: string, matchedTerms: number, queryTerms: number, outside?: boolean): {
|
|
20
|
-
domain: "template" | "component" | "
|
|
20
|
+
domain: "template" | "component" | "doc" | "theme" | "hook";
|
|
21
21
|
name: string;
|
|
22
22
|
package: string | undefined;
|
|
23
23
|
score: number;
|
|
@@ -27,7 +27,7 @@ export function toResult(c: Candidate, score: number, reason: string, matchedTer
|
|
|
27
27
|
deprecated?: import("../../authoring/index.js").ComponentDeprecation | undefined;
|
|
28
28
|
import: string | undefined;
|
|
29
29
|
command: string;
|
|
30
|
-
domain: "template" | "component" | "
|
|
30
|
+
domain: "template" | "component" | "doc" | "theme" | "hook";
|
|
31
31
|
name: string;
|
|
32
32
|
package: string | undefined;
|
|
33
33
|
score: number;
|
|
@@ -39,7 +39,7 @@ export function toResult(c: Candidate, score: number, reason: string, matchedTer
|
|
|
39
39
|
command: string;
|
|
40
40
|
section?: string | undefined;
|
|
41
41
|
name: string;
|
|
42
|
-
domain: "template" | "component" | "
|
|
42
|
+
domain: "template" | "component" | "doc" | "theme" | "hook";
|
|
43
43
|
package: string | undefined;
|
|
44
44
|
score: number;
|
|
45
45
|
reason: string;
|
|
@@ -48,7 +48,7 @@ export function toResult(c: Candidate, score: number, reason: string, matchedTer
|
|
|
48
48
|
displayName: string | undefined;
|
|
49
49
|
kind: "page" | "block" | undefined;
|
|
50
50
|
command: string;
|
|
51
|
-
domain: "template" | "component" | "
|
|
51
|
+
domain: "template" | "component" | "doc" | "theme" | "hook";
|
|
52
52
|
name: string;
|
|
53
53
|
package: string | undefined;
|
|
54
54
|
score: number;
|
|
@@ -57,7 +57,7 @@ export function toResult(c: Candidate, score: number, reason: string, matchedTer
|
|
|
57
57
|
} | {
|
|
58
58
|
displayName: string | undefined;
|
|
59
59
|
command: string;
|
|
60
|
-
domain: "template" | "component" | "
|
|
60
|
+
domain: "template" | "component" | "doc" | "theme" | "hook";
|
|
61
61
|
name: string;
|
|
62
62
|
package: string | undefined;
|
|
63
63
|
score: number;
|
package/api/search/search.d.mts
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
export function search(query: string, options?: {
|
|
15
15
|
cwd?: string | undefined;
|
|
16
|
-
type?: "template" | "component" | "
|
|
16
|
+
type?: "template" | "component" | "doc" | "theme" | "hook" | undefined;
|
|
17
17
|
limit?: number | undefined;
|
|
18
18
|
}): Promise<import("./search.type.mjs").SearchResponse>;
|
|
19
19
|
/**
|
|
@@ -66,12 +66,13 @@ export default function PowerSearchContentSearch() {
|
|
|
66
66
|
const [filters, setFilters] = useState<PowerSearchFilter[]>([]);
|
|
67
67
|
|
|
68
68
|
return (
|
|
69
|
-
<
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
69
|
+
<div style={{display: 'grid', gridTemplateColumns: 'minmax(0, 300px)'}}>
|
|
70
|
+
<PowerSearch
|
|
71
|
+
config={config}
|
|
72
|
+
filters={filters}
|
|
73
|
+
onChange={newFilters => setFilters([...newFilters])}
|
|
74
|
+
placeholder="Type to search by title, or pick a field..."
|
|
75
|
+
/>
|
|
76
|
+
</div>
|
|
76
77
|
);
|
|
77
78
|
}
|
|
@@ -94,12 +94,13 @@ export default function PowerSearchFullFeatured() {
|
|
|
94
94
|
const [filters, setFilters] = useState<PowerSearchFilter[]>([]);
|
|
95
95
|
|
|
96
96
|
return (
|
|
97
|
-
<
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
97
|
+
<div style={{display: 'grid', gridTemplateColumns: 'minmax(0, 300px)'}}>
|
|
98
|
+
<PowerSearch
|
|
99
|
+
config={config}
|
|
100
|
+
filters={filters}
|
|
101
|
+
onChange={newFilters => setFilters([...newFilters])}
|
|
102
|
+
placeholder="Search..."
|
|
103
|
+
/>
|
|
104
|
+
</div>
|
|
104
105
|
);
|
|
105
106
|
}
|
|
@@ -69,12 +69,13 @@ export default function PowerSearchPresetFilters() {
|
|
|
69
69
|
]);
|
|
70
70
|
|
|
71
71
|
return (
|
|
72
|
-
<
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
72
|
+
<div style={{display: 'grid', gridTemplateColumns: 'minmax(0, 360px)'}}>
|
|
73
|
+
<PowerSearch
|
|
74
|
+
config={config}
|
|
75
|
+
filters={filters}
|
|
76
|
+
onChange={newFilters => setFilters([...newFilters])}
|
|
77
|
+
placeholder="Add more filters..."
|
|
78
|
+
/>
|
|
79
|
+
</div>
|
|
79
80
|
);
|
|
80
81
|
}
|
|
@@ -92,15 +92,17 @@ export default function PowerSearchSearchWithTable() {
|
|
|
92
92
|
const filteredBooks = applyFilters(filters, books);
|
|
93
93
|
|
|
94
94
|
return (
|
|
95
|
-
<
|
|
96
|
-
<
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
95
|
+
<div style={{display: 'grid', gridTemplateColumns: 'minmax(0, 500px)'}}>
|
|
96
|
+
<VStack gap={4}>
|
|
97
|
+
<PowerSearch
|
|
98
|
+
config={config}
|
|
99
|
+
filters={filters}
|
|
100
|
+
onChange={newFilters => setFilters([...newFilters])}
|
|
101
|
+
placeholder="Filter books by title, author, year, genre..."
|
|
102
|
+
resultCount={filteredBooks.length}
|
|
103
|
+
/>
|
|
104
|
+
<Table data={filteredBooks} columns={columns} idKey="id" hasHover />
|
|
105
|
+
</VStack>
|
|
106
|
+
</div>
|
|
105
107
|
);
|
|
106
108
|
}
|
|
@@ -55,12 +55,13 @@ export default function PowerSearchShowcase() {
|
|
|
55
55
|
const [filters, setFilters] = useState<PowerSearchFilter[]>(initialFilters);
|
|
56
56
|
|
|
57
57
|
return (
|
|
58
|
-
<
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
58
|
+
<div style={{display: 'grid', gridTemplateColumns: 'minmax(0, 400px)'}}>
|
|
59
|
+
<PowerSearch
|
|
60
|
+
config={config}
|
|
61
|
+
filters={filters}
|
|
62
|
+
onChange={newFilters => setFilters([...newFilters])}
|
|
63
|
+
placeholder="Search by status, title..."
|
|
64
|
+
/>
|
|
65
|
+
</div>
|
|
65
66
|
);
|
|
66
67
|
}
|
|
@@ -6,7 +6,8 @@ export const doc = {
|
|
|
6
6
|
exampleFor: 'Tokenizer',
|
|
7
7
|
name: 'Tokenizer \u2014 Clear',
|
|
8
8
|
displayName: 'Tokenizer \u2014 Clear',
|
|
9
|
-
description:
|
|
9
|
+
description:
|
|
10
|
+
"Tokenizer with a built-in clear-all button for bulk removal of all selected tokens. On touch screens, clear through the sheet's Clear all.",
|
|
10
11
|
isReady: true,
|
|
11
12
|
aspectRatio: 16 / 9,
|
|
12
13
|
componentsUsed: ['Tokenizer', 'Layout', 'Text'],
|
|
@@ -29,7 +29,8 @@ export default function TokenizerClear() {
|
|
|
29
29
|
<div style={{display: 'grid', gridTemplateColumns: 'minmax(0, 400px)'}}>
|
|
30
30
|
<Stack direction="vertical" gap={2}>
|
|
31
31
|
<Text type="supporting" color="secondary">
|
|
32
|
-
Clear-all button appears when tokens are selected
|
|
32
|
+
Clear-all button appears when tokens are selected; on touch screens,
|
|
33
|
+
clear through the sheet's Clear all
|
|
33
34
|
</Text>
|
|
34
35
|
<Tokenizer
|
|
35
36
|
label="Team Members"
|
|
@@ -38,7 +39,6 @@ export default function TokenizerClear() {
|
|
|
38
39
|
value={value}
|
|
39
40
|
onChange={items => setValue(items)}
|
|
40
41
|
hasClear
|
|
41
|
-
presentation="popover"
|
|
42
42
|
/>
|
|
43
43
|
</Stack>
|
|
44
44
|
</div>
|
|
@@ -6,7 +6,8 @@ export const doc = {
|
|
|
6
6
|
exampleFor: 'Tokenizer',
|
|
7
7
|
name: 'Tokenizer \u2014 Overflow',
|
|
8
8
|
displayName: 'Tokenizer \u2014 Overflow',
|
|
9
|
-
description:
|
|
9
|
+
description:
|
|
10
|
+
'Tokenizer with overflow truncation when unfocused. Inline mode pushes content down on expand; layer mode overlays without shifting layout. Overflow modes apply to the inline field.',
|
|
10
11
|
isReady: true,
|
|
11
12
|
aspectRatio: 16 / 9,
|
|
12
13
|
componentsUsed: ['Tokenizer', 'Layout', 'Text'],
|
|
@@ -41,7 +41,6 @@ export default function TokenizerOverflow() {
|
|
|
41
41
|
value={inlineValue}
|
|
42
42
|
onChange={items => setInlineValue(items)}
|
|
43
43
|
tokenOverflowBehavior="unfocusedInline"
|
|
44
|
-
presentation="popover"
|
|
45
44
|
/>
|
|
46
45
|
</Stack>
|
|
47
46
|
<Stack direction="vertical" gap={1}>
|
|
@@ -55,7 +54,6 @@ export default function TokenizerOverflow() {
|
|
|
55
54
|
value={layerValue}
|
|
56
55
|
onChange={items => setLayerValue(items)}
|
|
57
56
|
tokenOverflowBehavior="unfocusedLayer"
|
|
58
|
-
presentation="popover"
|
|
59
57
|
/>
|
|
60
58
|
</Stack>
|
|
61
59
|
</Stack>
|
|
@@ -82,6 +82,7 @@ import {
|
|
|
82
82
|
StackItem,
|
|
83
83
|
VStack,
|
|
84
84
|
} from '@astryxdesign/core/Layout';
|
|
85
|
+
import {rtlStyles} from '@astryxdesign/core/utils';
|
|
85
86
|
import {
|
|
86
87
|
durationVars,
|
|
87
88
|
easeVars,
|
|
@@ -1391,7 +1392,13 @@ function ConversationPane({
|
|
|
1391
1392
|
<Button
|
|
1392
1393
|
label="Inbox"
|
|
1393
1394
|
variant="ghost"
|
|
1394
|
-
icon={
|
|
1395
|
+
icon={
|
|
1396
|
+
<Icon
|
|
1397
|
+
icon={ArrowLeftIcon}
|
|
1398
|
+
size="sm"
|
|
1399
|
+
xstyle={rtlStyles.mirror}
|
|
1400
|
+
/>
|
|
1401
|
+
}
|
|
1395
1402
|
onClick={onClose}
|
|
1396
1403
|
/>
|
|
1397
1404
|
}
|
|
@@ -1840,7 +1847,9 @@ function ComposeWindow({
|
|
|
1840
1847
|
// than being rejected for not matching anything.
|
|
1841
1848
|
hasCreate
|
|
1842
1849
|
// Stamps data-autofocus, which is what the sheet looks for
|
|
1843
|
-
// once the window is actually visible.
|
|
1850
|
+
// once the window is actually visible. It applies to the
|
|
1851
|
+
// inline field: on a compact touch screen the field opens
|
|
1852
|
+
// its own sheet and ignores it.
|
|
1844
1853
|
//
|
|
1845
1854
|
// Deliberately without `hasEntriesOnFocus`: the two together
|
|
1846
1855
|
// mean the window can never open without the full directory
|
|
@@ -1874,10 +1883,6 @@ function ComposeWindow({
|
|
|
1874
1883
|
)}
|
|
1875
1884
|
</>
|
|
1876
1885
|
}
|
|
1877
|
-
// The recipient rows read as one header, so all three stay
|
|
1878
|
-
// inline fields on every device; the sheet has no end lane
|
|
1879
|
-
// for the Cc and Bcc buttons.
|
|
1880
|
-
presentation="popover"
|
|
1881
1886
|
/>
|
|
1882
1887
|
{hasCc ? (
|
|
1883
1888
|
<Tokenizer
|
|
@@ -1888,7 +1893,6 @@ function ComposeWindow({
|
|
|
1888
1893
|
value={cc}
|
|
1889
1894
|
onChange={items => setCc(items)}
|
|
1890
1895
|
hasCreate
|
|
1891
|
-
presentation="popover"
|
|
1892
1896
|
/>
|
|
1893
1897
|
) : null}
|
|
1894
1898
|
{hasBcc ? (
|
|
@@ -1900,7 +1904,6 @@ function ComposeWindow({
|
|
|
1900
1904
|
value={bcc}
|
|
1901
1905
|
onChange={items => setBcc(items)}
|
|
1902
1906
|
hasCreate
|
|
1903
|
-
presentation="popover"
|
|
1904
1907
|
/>
|
|
1905
1908
|
) : null}
|
|
1906
1909
|
<TextInput
|
|
@@ -29,6 +29,7 @@ import {MoreMenu} from '@astryxdesign/core/MoreMenu';
|
|
|
29
29
|
import type {DropdownMenuOption} from '@astryxdesign/core/DropdownMenu';
|
|
30
30
|
import {Link} from '@astryxdesign/core/Link';
|
|
31
31
|
import {Icon} from '@astryxdesign/core/Icon';
|
|
32
|
+
import {rtlStyles} from '@astryxdesign/core/utils';
|
|
32
33
|
import {AspectRatio} from '@astryxdesign/core/AspectRatio';
|
|
33
34
|
import {Divider} from '@astryxdesign/core/Divider';
|
|
34
35
|
import {StatusDot} from '@astryxdesign/core/StatusDot';
|
|
@@ -381,7 +382,11 @@ function PageHeader({
|
|
|
381
382
|
<HStack gap={4} vAlign="center" wrap="wrap">
|
|
382
383
|
<Link href="#" type="supporting" color="secondary">
|
|
383
384
|
<HStack as="span" gap={1} vAlign="center">
|
|
384
|
-
<Icon
|
|
385
|
+
<Icon
|
|
386
|
+
icon={ArrowLeftIcon}
|
|
387
|
+
size="sm"
|
|
388
|
+
xstyle={rtlStyles.mirror}
|
|
389
|
+
/>
|
|
385
390
|
All Tasks
|
|
386
391
|
</HStack>
|
|
387
392
|
</Link>
|
|
@@ -463,7 +468,6 @@ function PageHeader({
|
|
|
463
468
|
onRemove={onRemove}
|
|
464
469
|
/>
|
|
465
470
|
)}
|
|
466
|
-
presentation="popover"
|
|
467
471
|
/>
|
|
468
472
|
</HStack>
|
|
469
473
|
</VStack>
|
|
@@ -78,9 +78,9 @@ declare const eventSchema: z.ZodObject<{
|
|
|
78
78
|
template: "template";
|
|
79
79
|
command: "command";
|
|
80
80
|
component: "component";
|
|
81
|
-
hook: "hook";
|
|
82
|
-
theme: "theme";
|
|
83
81
|
doc: "doc";
|
|
82
|
+
theme: "theme";
|
|
83
|
+
hook: "hook";
|
|
84
84
|
integration: "integration";
|
|
85
85
|
migration: "migration";
|
|
86
86
|
mixed: "mixed";
|
package/clients/cli/index.mjs
CHANGED
|
@@ -19,6 +19,7 @@ import * as path from 'node:path';
|
|
|
19
19
|
import {formatCliCommand, getCliInvocation, quoteCommandArgument} from '../../foundation/env/package-manager.mjs';
|
|
20
20
|
import {hasRecordedProject} from '../../foundation/env/cli-command.mjs';
|
|
21
21
|
import {isOutsideProject} from '../../foundation/env/project-scope.mjs';
|
|
22
|
+
import {findConfigPath} from '../../foundation/config/config-path.mjs';
|
|
22
23
|
import {API_VERSION, setJsonMode} from '../../foundation/response/json.mjs';
|
|
23
24
|
import {answeredBy, runChoice} from '../../foundation/release/run-context.mjs';
|
|
24
25
|
import {cliInstallAdvice, installFolder} from '../../foundation/release/notices.mjs';
|
|
@@ -29,14 +30,18 @@ import {ERROR_CODES} from '../../foundation/response/error-codes.mjs';
|
|
|
29
30
|
import {levenshteinDistance} from '../../foundation/text/string-utils.mjs';
|
|
30
31
|
import {installJsonShim} from './lib/json-shim.mjs';
|
|
31
32
|
import {markReportsResult} from './lib/define-command.mjs';
|
|
33
|
+
// The light modules, not agent-docs.mjs: that one loads discovery and the
|
|
34
|
+
// project config, which every run would pay for at startup.
|
|
32
35
|
import {
|
|
33
36
|
agentDocsTargetDir,
|
|
34
37
|
assertAgentDocsTarget,
|
|
38
|
+
} from '../../foundation/agent-docs/agent-docs-target.mjs';
|
|
39
|
+
import {CLI_ROOT} from '../../foundation/fs/paths.mjs';
|
|
40
|
+
import {
|
|
35
41
|
isAstryxInitialized,
|
|
36
42
|
isAstryxPromptInReach,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
import {setupNudge} from '../../foundation/agent-docs/agent-doc-state.mjs';
|
|
43
|
+
setupNudge,
|
|
44
|
+
} from '../../foundation/agent-docs/agent-doc-state.mjs';
|
|
40
45
|
import * as debug from '../../foundation/debug/index.mjs';
|
|
41
46
|
|
|
42
47
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
@@ -186,9 +191,6 @@ function fullCommandName(actionCommand, root) {
|
|
|
186
191
|
*/
|
|
187
192
|
export async function loadProjectDebugHandler() {
|
|
188
193
|
try {
|
|
189
|
-
const {findConfigPath, Project} = await import(
|
|
190
|
-
'../../foundation/config/project.mjs'
|
|
191
|
-
);
|
|
192
194
|
const configPath = findConfigPath(process.cwd());
|
|
193
195
|
if (!configPath) return;
|
|
194
196
|
const text = fs.readFileSync(configPath, 'utf-8');
|
|
@@ -196,6 +198,9 @@ export async function loadProjectDebugHandler() {
|
|
|
196
198
|
debug.noteConfigGateSkipped();
|
|
197
199
|
return;
|
|
198
200
|
}
|
|
201
|
+
// Only now: a run in a folder with no such config never loads the project
|
|
202
|
+
// module and its discovery.
|
|
203
|
+
const {Project} = await import('../../foundation/config/project.mjs');
|
|
199
204
|
await Project.load(process.cwd());
|
|
200
205
|
} catch {
|
|
201
206
|
// A broken config is the command's problem to report, not ours.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// @generated by scripts/sync-api-types.mjs from the JSDoc in foundation/**/*.mjs.
|
|
2
|
+
// DO NOT EDIT — run `pnpm sync:api-types` to regenerate.
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* `p` resolved, through symlinks when it exists.
|
|
6
|
+
* @param {string} p
|
|
7
|
+
* @returns {string}
|
|
8
|
+
*/
|
|
9
|
+
export function realDir(p: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* Throw {@link AgentDocsHomeError} when `targetDir` is the home folder, or a
|
|
12
|
+
* settings folder in it outside a project.
|
|
13
|
+
* @param {string} targetDir
|
|
14
|
+
*/
|
|
15
|
+
export function assertAgentDocsTarget(targetDir: string): void;
|
|
16
|
+
/**
|
|
17
|
+
* The folder a run started in `cwd` writes agent docs to: the nearest folder at
|
|
18
|
+
* or above it whose package.json declares an `@astryxdesign` package, else the
|
|
19
|
+
* nearest folder with any package.json. The search stops at a repository root
|
|
20
|
+
* and never reaches the home folder, so a stray `~/package.json` cannot pull
|
|
21
|
+
* the docs there.
|
|
22
|
+
* @param {string} cwd
|
|
23
|
+
* @returns {string | null} null when no folder it searches has a package.json;
|
|
24
|
+
* init then writes where it runs, as before.
|
|
25
|
+
*/
|
|
26
|
+
export function resolveAgentDocsRoot(cwd: string): string | null;
|
|
27
|
+
/**
|
|
28
|
+
* The folder `init` run in `cwd` writes the agent docs to: the project root
|
|
29
|
+
* {@link resolveAgentDocsRoot} finds, else `cwd` itself. The one definition
|
|
30
|
+
* that init, its removal, and the per-command setup nudge all use.
|
|
31
|
+
* @param {string} cwd
|
|
32
|
+
* @returns {string}
|
|
33
|
+
*/
|
|
34
|
+
export function agentDocsTargetDir(cwd: string): string;
|
|
35
|
+
/**
|
|
36
|
+
* Thrown when agent docs would be written into the home folder, or into a
|
|
37
|
+
* settings folder in it such as `~/.gemini` outside a project. Agents read the
|
|
38
|
+
* files there (for example `~/.claude/CLAUDE.md` or `~/.gemini/GEMINI.md`) in
|
|
39
|
+
* every project, so a project's version-pinned block never goes there. Removal
|
|
40
|
+
* stays allowed.
|
|
41
|
+
*/
|
|
42
|
+
export class AgentDocsHomeError extends Error {
|
|
43
|
+
/** @param {string} dir */
|
|
44
|
+
constructor(dir: string);
|
|
45
|
+
/** The refused folder. */
|
|
46
|
+
dir: string;
|
|
47
|
+
}
|
|
48
|
+
/** Folders that mark a repository root; the project search stops there. */
|
|
49
|
+
export const REPOSITORY_MARKERS: string[];
|