@agentteams/cli 0.1.91 → 0.1.93
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/.eslintcache +1 -1
- package/README.md +36 -0
- package/dist/api/codeReview.d.ts.map +1 -1
- package/dist/api/codeReview.js +4 -2
- package/dist/api/codeReview.js.map +1 -1
- package/dist/api/convention.d.ts.map +1 -1
- package/dist/api/convention.js +3 -1
- package/dist/api/convention.js.map +1 -1
- package/dist/api/linear.d.ts.map +1 -1
- package/dist/api/linear.js +3 -1
- package/dist/api/linear.js.map +1 -1
- package/dist/api/task.js +1 -1
- package/dist/api/task.js.map +1 -1
- package/dist/commands/convention.d.ts +3 -0
- package/dist/commands/convention.d.ts.map +1 -1
- package/dist/commands/convention.js +35 -5
- package/dist/commands/convention.js.map +1 -1
- package/dist/commands/doctor.d.ts +5 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +93 -45
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/document.d.ts +11 -0
- package/dist/commands/document.d.ts.map +1 -1
- package/dist/commands/document.js +37 -12
- package/dist/commands/document.js.map +1 -1
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +19 -0
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/init.d.ts +110 -27
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +659 -462
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/initWorktree.d.ts +32 -0
- package/dist/commands/initWorktree.d.ts.map +1 -0
- package/dist/commands/initWorktree.js +348 -0
- package/dist/commands/initWorktree.js.map +1 -0
- package/dist/commands/resolve.d.ts +30 -0
- package/dist/commands/resolve.d.ts.map +1 -0
- package/dist/commands/resolve.js +166 -0
- package/dist/commands/resolve.js.map +1 -0
- package/dist/index.js +59 -5
- package/dist/index.js.map +1 -1
- package/dist/utils/agentEntryPoints.d.ts +68 -0
- package/dist/utils/agentEntryPoints.d.ts.map +1 -0
- package/dist/utils/agentEntryPoints.js +112 -0
- package/dist/utils/agentEntryPoints.js.map +1 -0
- package/dist/utils/authServer.d.ts +51 -1
- package/dist/utils/authServer.d.ts.map +1 -1
- package/dist/utils/authServer.js +77 -0
- package/dist/utils/authServer.js.map +1 -1
- package/dist/utils/doctorOutput.d.ts.map +1 -1
- package/dist/utils/doctorOutput.js +7 -3
- package/dist/utils/doctorOutput.js.map +1 -1
- package/dist/utils/entityId.d.ts.map +1 -1
- package/dist/utils/entityId.js +18 -5
- package/dist/utils/entityId.js.map +1 -1
- package/dist/utils/entityRef.d.ts +52 -0
- package/dist/utils/entityRef.d.ts.map +1 -0
- package/dist/utils/entityRef.js +259 -0
- package/dist/utils/entityRef.js.map +1 -0
- package/dist/utils/git.d.ts +28 -0
- package/dist/utils/git.d.ts.map +1 -1
- package/dist/utils/git.js +43 -0
- package/dist/utils/git.js.map +1 -1
- package/dist/utils/initOutput.d.ts.map +1 -1
- package/dist/utils/initOutput.js +97 -15
- package/dist/utils/initOutput.js.map +1 -1
- package/package.json +1 -1
package/dist/commands/init.d.ts
CHANGED
|
@@ -1,13 +1,63 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import { type
|
|
1
|
+
import { type ConventionStatusResult } from './convention.js';
|
|
2
|
+
import { type DoctorResult } from './doctor.js';
|
|
3
|
+
import type { AuthMode, Config } from '../types/index.js';
|
|
4
|
+
import { type WorktreeInitResult } from './initWorktree.js';
|
|
5
|
+
import { type EnsurePostCheckoutHookResult } from '../utils/conventionLink.js';
|
|
6
|
+
export { bootstrapLinkedWorktree } from './initWorktree.js';
|
|
7
|
+
export type { WorktreeEntryPointEntry, WorktreeEntryPointState, WorktreeInitResult } from './initWorktree.js';
|
|
3
8
|
type InitOptions = {
|
|
4
9
|
cwd?: string;
|
|
5
10
|
/** Personal login is the default; `api-key` is the explicit compatibility path. */
|
|
6
11
|
authMode?: AuthMode;
|
|
12
|
+
/**
|
|
13
|
+
* Raw `--agent-files` value. Absent means "decide from detection or the
|
|
14
|
+
* interactive prompt"; `none` means "create nothing" — the two are different
|
|
15
|
+
* answers, so this stays a string rather than a pre-parsed list.
|
|
16
|
+
*/
|
|
17
|
+
agentFiles?: unknown;
|
|
18
|
+
/** Restore the legacy `<name>-example` write when an entry point already exists. */
|
|
19
|
+
agentFilesExample?: boolean;
|
|
20
|
+
/** Install the managed post-checkout hook even without a linked worktree. */
|
|
21
|
+
installWorktreeHook?: boolean;
|
|
22
|
+
};
|
|
23
|
+
export type InitReadinessStatus = 'READY' | 'DEGRADED' | 'SKIPPED';
|
|
24
|
+
export type InitReadinessStage = 'project-binding' | 'credential' | 'convention-sync' | 'local-adapters';
|
|
25
|
+
export type InitReadinessIssue = {
|
|
26
|
+
code: string;
|
|
27
|
+
message: string;
|
|
28
|
+
};
|
|
29
|
+
export type InitReadinessStep = {
|
|
30
|
+
stage: InitReadinessStage;
|
|
31
|
+
status: InitReadinessStatus;
|
|
32
|
+
issues: InitReadinessIssue[];
|
|
33
|
+
retryCommand?: string;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* The local adapters init runs *after* the project binding and the credential
|
|
37
|
+
* are already on disk. They are reported one by one because they fail
|
|
38
|
+
* independently and each has its own repair command — collapsing them into a
|
|
39
|
+
* single verdict is what used to turn one unwritable file into
|
|
40
|
+
* "Initialization failed".
|
|
41
|
+
*/
|
|
42
|
+
export type InitAdapterName = 'gitignore' | 'agent-entry-points' | 'gemini-ignore' | 'post-checkout-hook';
|
|
43
|
+
export type InitAdapterOutcome = {
|
|
44
|
+
adapter: InitAdapterName;
|
|
45
|
+
status: InitReadinessStatus;
|
|
46
|
+
issues: InitReadinessIssue[];
|
|
47
|
+
retryCommand?: string;
|
|
7
48
|
};
|
|
8
49
|
export type AgentFileEntry = {
|
|
9
50
|
relativePath: string;
|
|
10
|
-
type: 'created' | 'example';
|
|
51
|
+
type: 'created' | 'example' | 'skipped';
|
|
52
|
+
};
|
|
53
|
+
/** One entry point path that could not be written, and why. */
|
|
54
|
+
export type AgentEntryPointWriteFailure = {
|
|
55
|
+
relativePath: string;
|
|
56
|
+
message: string;
|
|
57
|
+
};
|
|
58
|
+
export type AgentEntryPointWriteResult = {
|
|
59
|
+
entries: AgentFileEntry[];
|
|
60
|
+
failures: AgentEntryPointWriteFailure[];
|
|
11
61
|
};
|
|
12
62
|
type OAuthInitResult = {
|
|
13
63
|
success: true;
|
|
@@ -28,34 +78,67 @@ type OAuthInitResult = {
|
|
|
28
78
|
nickname: string;
|
|
29
79
|
persisted: boolean;
|
|
30
80
|
};
|
|
31
|
-
/**
|
|
32
|
-
* Personal-token path only. The browser round trip still mints an agent key —
|
|
33
|
-
* it is what fetches the convention template — and this records whether that
|
|
34
|
-
* key was handed back before init exited.
|
|
35
|
-
*/
|
|
36
|
-
agentKeyRevoked?: boolean;
|
|
37
81
|
warning?: string;
|
|
82
|
+
readiness: InitReadinessStep[];
|
|
83
|
+
/** Per-adapter detail behind the `local-adapters` readiness step. Additive. */
|
|
84
|
+
localAdapters: InitAdapterOutcome[];
|
|
38
85
|
};
|
|
39
|
-
export type
|
|
40
|
-
export type WorktreeEntryPointEntry = {
|
|
41
|
-
relativePath: string;
|
|
42
|
-
state: WorktreeEntryPointState;
|
|
43
|
-
};
|
|
44
|
-
export type WorktreeInitResult = {
|
|
86
|
+
export type ConfiguredProjectInitResult = {
|
|
45
87
|
success: true;
|
|
46
|
-
mode: '
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
88
|
+
mode: 'configured-project';
|
|
89
|
+
configPath: string;
|
|
90
|
+
conventionPath: string;
|
|
91
|
+
teamId: string;
|
|
92
|
+
projectId: string;
|
|
93
|
+
authMode: AuthMode;
|
|
94
|
+
credentialSource: 'explicit-api-key' | 'personal-token' | 'config-api-key';
|
|
95
|
+
conventionsUpdated: boolean;
|
|
96
|
+
conventionStatus?: ConventionStatusResult;
|
|
97
|
+
conventionError?: string;
|
|
98
|
+
doctor: DoctorResult;
|
|
99
|
+
readiness: InitReadinessStep[];
|
|
100
|
+
/** Entry points this run wrote or left alone. Additive; the fast path repairs them too. */
|
|
101
|
+
agentFiles: AgentFileEntry[];
|
|
102
|
+
/** Per-adapter detail behind the `local-adapters` readiness step. Additive. */
|
|
103
|
+
localAdapters: InitAdapterOutcome[];
|
|
104
|
+
postCheckoutHook?: EnsurePostCheckoutHookResult;
|
|
105
|
+
};
|
|
106
|
+
type InitResult = OAuthInitResult | WorktreeInitResult | ConfiguredProjectInitResult;
|
|
107
|
+
export type InitExecutionKind = 'linked-worktree' | 'configured-project' | 'new-project';
|
|
108
|
+
export type InitExecutionContext = {
|
|
109
|
+
kind: InitExecutionKind;
|
|
110
|
+
configPath: string | null;
|
|
111
|
+
config: Partial<Config> | null;
|
|
54
112
|
};
|
|
55
|
-
type InitResult = OAuthInitResult | WorktreeInitResult;
|
|
56
113
|
export declare function detectOsType(): 'MACOS' | 'LINUX' | 'WINDOWS' | undefined;
|
|
57
|
-
export
|
|
58
|
-
|
|
114
|
+
export type AuthorizeUrlInput = {
|
|
115
|
+
port: number;
|
|
116
|
+
projectName: string;
|
|
117
|
+
authPathEnc?: string;
|
|
118
|
+
osType?: string;
|
|
119
|
+
state?: string;
|
|
120
|
+
machineId?: string;
|
|
121
|
+
/**
|
|
122
|
+
* Present only on the unified setup path. It is what asks the web page to
|
|
123
|
+
* finish selection *and* the personal-token consent on one screen; a web build
|
|
124
|
+
* that does not know `flow=setup` simply ignores both parameters, which is why
|
|
125
|
+
* the `--auth api-key` path must keep omitting them.
|
|
126
|
+
*/
|
|
127
|
+
codeChallenge?: string;
|
|
128
|
+
};
|
|
129
|
+
export declare function buildAuthorizeUrl(input: AuthorizeUrlInput): string;
|
|
130
|
+
/**
|
|
131
|
+
* Classify init before it opens a browser or materializes any local adapters.
|
|
132
|
+
*
|
|
133
|
+
* This resolver is intentionally read-only: the linked-worktree branch calls
|
|
134
|
+
* `bootstrapLinkedWorktree` and the configured-project branch resolves its
|
|
135
|
+
* credential only after classification, so a classification never touches a
|
|
136
|
+
* keychain, a token, or the filesystem.
|
|
137
|
+
*
|
|
138
|
+
* `userHomeDir` is injectable for the same reason as in
|
|
139
|
+
* `getConfigurationNotFoundMessage`: `os.homedir()` does not follow a test's
|
|
140
|
+
* `process.env.HOME`, so the global-config rule would be untestable otherwise.
|
|
141
|
+
*/
|
|
142
|
+
export declare function detectInitExecutionContext(cwd: string, explicitAuthMode?: AuthMode, userHomeDir?: string): InitExecutionContext;
|
|
59
143
|
export declare function executeInitCommand(options?: InitOptions): Promise<InitResult>;
|
|
60
|
-
export {};
|
|
61
144
|
//# sourceMappingURL=init.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AA+BA,OAAO,EAIL,KAAK,sBAAsB,EAC5B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAwB,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AACtE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAW1D,OAAO,EAAwD,KAAK,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAClH,OAAO,EAGL,KAAK,4BAA4B,EAClC,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,YAAY,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAkB9G,KAAK,WAAW,GAAG;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,mFAAmF;IACnF,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oFAAoF;IACpF,iBA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