@idea1/cli 1.10.4 → 1.11.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.
Files changed (58) hide show
  1. package/README.md +29 -6
  2. package/dist/commands/help.d.ts.map +1 -1
  3. package/dist/commands/help.js +14 -2
  4. package/dist/commands/help.js.map +1 -1
  5. package/dist/commands/index.d.ts +3 -1
  6. package/dist/commands/index.d.ts.map +1 -1
  7. package/dist/commands/index.js +5 -1
  8. package/dist/commands/index.js.map +1 -1
  9. package/dist/commands/login.d.ts +3 -0
  10. package/dist/commands/login.d.ts.map +1 -0
  11. package/dist/commands/login.js +15 -0
  12. package/dist/commands/login.js.map +1 -0
  13. package/dist/commands/logout.d.ts +3 -0
  14. package/dist/commands/logout.d.ts.map +1 -0
  15. package/dist/commands/logout.js +17 -0
  16. package/dist/commands/logout.js.map +1 -0
  17. package/dist/commands/release.d.ts +2 -1
  18. package/dist/commands/release.d.ts.map +1 -1
  19. package/dist/commands/release.js +2 -1
  20. package/dist/commands/release.js.map +1 -1
  21. package/dist/lib/project-item-url.d.ts +6 -0
  22. package/dist/lib/project-item-url.d.ts.map +1 -1
  23. package/dist/lib/project-item-url.js +11 -0
  24. package/dist/lib/project-item-url.js.map +1 -1
  25. package/dist/lib/settings.d.ts +10 -3
  26. package/dist/lib/settings.d.ts.map +1 -1
  27. package/dist/lib/settings.js +13 -1
  28. package/dist/lib/settings.js.map +1 -1
  29. package/dist/prompts/platform-prompts.d.ts +5 -30
  30. package/dist/prompts/platform-prompts.d.ts.map +1 -1
  31. package/dist/prompts/platform-prompts.js +5 -44
  32. package/dist/prompts/platform-prompts.js.map +1 -1
  33. package/dist/services/platform-auth.d.ts +43 -0
  34. package/dist/services/platform-auth.d.ts.map +1 -0
  35. package/dist/services/platform-auth.js +380 -0
  36. package/dist/services/platform-auth.js.map +1 -0
  37. package/dist/services/platform.d.ts +23 -16
  38. package/dist/services/platform.d.ts.map +1 -1
  39. package/dist/services/platform.js +188 -190
  40. package/dist/services/platform.js.map +1 -1
  41. package/dist/services/setup.d.ts.map +1 -1
  42. package/dist/services/setup.js +2 -1
  43. package/dist/services/setup.js.map +1 -1
  44. package/dist/types/index.d.ts +16 -0
  45. package/dist/types/index.d.ts.map +1 -1
  46. package/dist/types/index.js +1 -1
  47. package/dist/types/index.js.map +1 -1
  48. package/dist/workflow/data/team-member.d.ts +9 -2
  49. package/dist/workflow/data/team-member.d.ts.map +1 -1
  50. package/dist/workflow/data/team-member.js +8 -1
  51. package/dist/workflow/data/team-member.js.map +1 -1
  52. package/dist/workflow/engine/branch-setup.d.ts +1 -1
  53. package/dist/workflow/engine/branch-setup.js +1 -1
  54. package/dist/workflow/engine/release-engine.d.ts +6 -2
  55. package/dist/workflow/engine/release-engine.d.ts.map +1 -1
  56. package/dist/workflow/engine/release-engine.js +16 -5
  57. package/dist/workflow/engine/release-engine.js.map +1 -1
  58. package/package.json +2 -1
@@ -1,68 +1,182 @@
1
1
  import { logger } from '../lib/logger.js';
2
- import { AgentErrorResponse, validateAgentResponse } from '../lib/agent-core.js';
3
- import { isProjectItemUrl } from '../lib/project-item-url.js';
4
- import { createProjectItemPrompt, generateBranchNamePrompt, getProjectItemSummaryForBranchPrompt, getProjectItemSummaryPrompt, listProjectsPrompt, listTeamMembersPrompt, setWorkflowStatusPrompt, upsertProjectItemWorkflowContextPrompt } from '../prompts/platform-prompts.js';
2
+ import { projectItemExternalId } from '../lib/project-item-url.js';
3
+ import { generateBranchNamePrompt } from '../prompts/platform-prompts.js';
5
4
  import * as claude from './claude.js';
5
+ import { apiBaseUrl, authorizedFetch } from './platform-auth.js';
6
6
  /**
7
7
  * The CLI's access to the Idea1 cloud platform (app.idea1.ai / api.idea1.ai): reading a project
8
8
  * item's summary (by item or by branch), recording the item's workflow context, setting its workflow
9
9
  * status (with the teammate it is assigned to), creating items, listing the team's Projects and
10
- * members, deriving a branch name from an item. Callers use `platform.someFunction()` and know
11
- * nothing about the transport.
10
+ * members, deriving a branch name from an item, and reading who is signed in. Callers use
11
+ * `platform.someFunction()` and know nothing about the transport.
12
12
  *
13
- * Today the transport is Claude Code driving the Idea1 MCP tools. That is an implementation detail
14
- * of this module - it may be replaced by authenticated calls to the platform's HTTP API without
15
- * touching any caller. Because these are simple tool calls rather than implementation sessions,
16
- * every Claude run here uses PLATFORM_CALL_RUN_OPTIONS. The prompts are the templates in
17
- * `src/prompts/platform-prompts.ts`; this module owns the output schemas their answers are read with.
13
+ * The transport is the platform's REST API, authorized with the user's OAuth credential or
14
+ * `IDEA1_TOKEN` (see `platform-auth.ts`), on the team that credential is bound to. Responses are the
15
+ * platform's `ApiDataResponse` envelope; a refused request surfaces as an Error carrying the
16
+ * platform's status and message. Claude is used only to name branches, on PLATFORM_CALL_RUN_OPTIONS.
18
17
  */
19
18
  /**
20
- * Model and effort for every platform call: a small, fast model at medium effort is all a
21
- * single MCP tool call needs, and pinning it keeps these calls consistent and cheap.
19
+ * Model and effort for the Claude run that names a branch: a small, fast model at medium effort is
20
+ * all a one-line answer from a description needs, and pinning it keeps the run consistent and cheap.
22
21
  */
23
22
  export const PLATFORM_CALL_RUN_OPTIONS = { model: 'sonnet', effort: 'medium' };
24
23
  /**
25
- * Run a platform call with a JSON schema, returning the parsed structured output.
24
+ * The platform's `ApiResultType`, the `result` of every response envelope.
26
25
  */
27
- async function callStructured(prompt, jsonSchema) {
28
- return claude.runStructured(prompt, jsonSchema, PLATFORM_CALL_RUN_OPTIONS);
26
+ var ApiResultType;
27
+ (function (ApiResultType) {
28
+ ApiResultType[ApiResultType["Ok"] = 0] = "Ok";
29
+ ApiResultType[ApiResultType["Failed"] = 1] = "Failed";
30
+ ApiResultType[ApiResultType["NotFound"] = 2] = "NotFound";
31
+ ApiResultType[ApiResultType["Unauthorized"] = 3] = "Unauthorized";
32
+ ApiResultType[ApiResultType["InvalidRequest"] = 4] = "InvalidRequest";
33
+ ApiResultType[ApiResultType["QuotaLimit"] = 5] = "QuotaLimit";
34
+ })(ApiResultType || (ApiResultType = {}));
35
+ /**
36
+ * The platform's `ProjectStatus`.
37
+ */
38
+ var ProjectStatus;
39
+ (function (ProjectStatus) {
40
+ ProjectStatus[ProjectStatus["Live"] = 0] = "Live";
41
+ ProjectStatus[ProjectStatus["Completed"] = 1] = "Completed";
42
+ ProjectStatus[ProjectStatus["Cancelled"] = 2] = "Cancelled";
43
+ })(ProjectStatus || (ProjectStatus = {}));
44
+ /**
45
+ * Send a request to the platform's API, at `path` relative to the API base URL.
46
+ */
47
+ function send(method, path, body) {
48
+ return authorizedFetch(`${apiBaseUrl()}/${path}`, {
49
+ method,
50
+ headers: body === null ? { Accept: 'application/json' } : { Accept: 'application/json', 'Content-Type': 'application/json' },
51
+ body: body === null ? undefined : JSON.stringify(body)
52
+ });
53
+ }
54
+ /**
55
+ * The `data` of a successful response; anything else throws an Error naming the request, the
56
+ * status and the platform's message.
57
+ */
58
+ async function readData(method, path, response) {
59
+ const text = await response.text();
60
+ if (!response.ok) {
61
+ const message = serverMessage(text);
62
+ throw new Error(`idea1.ai refused ${method} /${path} (${response.status} ${response.statusText})${message.length > 0 ? `: ${message}` : ''}`);
63
+ }
64
+ const envelope = JSON.parse(text);
65
+ if (envelope.result !== ApiResultType.Ok) {
66
+ throw new Error(`idea1.ai could not complete ${method} /${path}: ${ApiResultType[envelope.result]}`);
67
+ }
68
+ return envelope.data;
69
+ }
70
+ async function call(method, path, body) {
71
+ return readData(method, path, await send(method, path, body));
72
+ }
73
+ /**
74
+ * A branch name the platform returned, checked before it reaches git: the CLI passes branch names
75
+ * to git as arguments, so a name that is not a plain ref (one starting with `-` would read as an
76
+ * option) is refused.
77
+ */
78
+ const SAFE_BRANCH_NAME = /^(?!-)(?!.*\.\.)[A-Za-z0-9._\/-]+$/;
79
+ function checkedBranchName(name) {
80
+ if (!SAFE_BRANCH_NAME.test(name)) {
81
+ throw new Error(`idea1.ai returned an invalid branch name: ${JSON.stringify(name)}`);
82
+ }
83
+ return name;
84
+ }
85
+ /**
86
+ * A project item URL the platform returned, checked before it is stored in git config: it must be a
87
+ * plain idea1.ai project item URL.
88
+ */
89
+ const SAFE_PROJECT_ITEM_URL = /^https?:\/\/(app\.idea1\.ai|localhost(:\d+)?)\/project\/items\/\d+\/?$/i;
90
+ function checkedProjectItemUrl(url) {
91
+ if (!SAFE_PROJECT_ITEM_URL.test(url)) {
92
+ throw new Error(`idea1.ai returned an invalid project item URL: ${JSON.stringify(url)}`);
93
+ }
94
+ return url;
95
+ }
96
+ /**
97
+ * A workflow context the platform returned, with its branch names checked. Each field is copied by
98
+ * name, so nothing the platform sent reaches git without passing the check.
99
+ */
100
+ function checkedContext(context) {
101
+ return {
102
+ workflowStatus: context.workflowStatus,
103
+ codingAgentUrl: context.codingAgentUrl,
104
+ pullRequestUrl: context.pullRequestUrl,
105
+ repositoryFullName: context.repositoryFullName,
106
+ branchName: checkedBranchName(context.branchName),
107
+ baseBranch: checkedBranchName(context.baseBranch),
108
+ devWorkflowType: context.devWorkflowType,
109
+ stackBranch: context.stackBranch === null ? null : checkedBranchName(context.stackBranch),
110
+ integrationBranch: context.integrationBranch === null ? null : checkedBranchName(context.integrationBranch),
111
+ branchState: context.branchState
112
+ };
113
+ }
114
+ /** A project item summary the platform returned, with its URL and the branch names of its workflow context checked. */
115
+ function checkedSummary(summary) {
116
+ return {
117
+ url: checkedProjectItemUrl(summary.url),
118
+ externalId: summary.externalId,
119
+ title: summary.title,
120
+ epicId: summary.epicId,
121
+ completionDate: summary.completionDate,
122
+ legacyWorkflowStatus: summary.legacyWorkflowStatus,
123
+ projectId: summary.projectId,
124
+ assignedToUserId: summary.assignedToUserId,
125
+ workflowContext: summary.workflowContext === null ? null : checkedContext(summary.workflowContext)
126
+ };
127
+ }
128
+ async function callForSummary(method, path, body) {
129
+ return checkedSummary(await call(method, path, body));
130
+ }
131
+ /**
132
+ * The message an error response carries: the `message` (or OAuth `error_description`) of a JSON
133
+ * body, a JSON string, or the body's text; empty for an empty body.
134
+ */
135
+ function serverMessage(text) {
136
+ const trimmed = text.trim();
137
+ try {
138
+ const body = JSON.parse(trimmed);
139
+ if (typeof body === 'string') {
140
+ return body;
141
+ }
142
+ if (typeof body === 'object' && body !== null) {
143
+ const fields = body;
144
+ const message = [fields.message, fields.error_description, fields.error, fields.detail, fields.title].find(value => typeof value === 'string');
145
+ if (typeof message === 'string') {
146
+ return message;
147
+ }
148
+ }
149
+ }
150
+ catch {
151
+ // Not JSON: the text is the message.
152
+ }
153
+ return trimmed.slice(0, 500);
29
154
  }
30
155
  /**
31
- * Run a platform call whose answer is a single string; a model refusal throws AgentErrorResponse.
156
+ * The path of a project item by its URL's external id.
32
157
  */
33
- async function callForResult(prompt) {
34
- return claude.runWithPrompt(prompt, PLATFORM_CALL_RUN_OPTIONS);
158
+ function projectItemPath(itemUrl) {
159
+ return `v1/teams/active/project-items/by-external-id/${projectItemExternalId(itemUrl)}`;
35
160
  }
36
161
  /**
37
162
  * Record workflow context updates on an idea1.ai project item directly, with no side effects on the
38
163
  * platform: the CLI has already run the transition's work locally. The item must be under workflow
39
164
  * management (have a workflow context); the workflow engine is the only caller, as the persist step
40
165
  * of a transition. `assignedToEmail` names the team member the item is assigned to along with the
41
- * status; null leaves the assignment as it is.
42
- *
43
- * TODO: Direct workflow-context updates move from the update_item MCP tool to an authenticated
44
- * platform API call; the CLI will authenticate a user and call the API for direct integrations
45
- * like this, and MCP tools will be only operations that agents should run.
166
+ * status; null leaves the assignment as it is. Returns false, with a warning, when the platform did
167
+ * not record it.
46
168
  */
47
169
  export async function setWorkflowStatus(itemUrl, status, pullRequestUrl, assignedToEmail) {
48
- const hasClaude = await claude.ensureClaudeCli();
49
- if (!hasClaude) {
50
- logger.warning('Claude CLI not available, skipping workflow status update');
51
- return false;
52
- }
53
170
  logger.step(assignedToEmail === null
54
171
  ? `Setting workflow status to "${status}"...`
55
172
  : `Setting workflow status to "${status}", assigned to ${assignedToEmail}...`);
56
173
  try {
57
- await callForResult(setWorkflowStatusPrompt({ projectItemUrl: itemUrl, workflowStatus: status, pullRequestUrl, assignedToEmail }));
174
+ await call('PUT', `${projectItemPath(itemUrl)}/workflow-status`, { workflowStatus: status, pullRequestUrl, assignedToEmail });
58
175
  logger.success(`Workflow status updated to "${status}"`);
59
176
  return true;
60
177
  }
61
178
  catch (error) {
62
- const message = error instanceof AgentErrorResponse
63
- ? `Model could not update workflow status: ${error.message}`
64
- : `Could not update workflow status: ${error.message}`;
65
- logger.warning(message);
179
+ logger.warning(`Could not update workflow status: ${error.message}`);
66
180
  return false;
67
181
  }
68
182
  }
@@ -71,30 +185,21 @@ export async function setWorkflowStatus(itemUrl, status, pullRequestUrl, assigne
71
185
  * management. The repository is always named; nothing defaults it.
72
186
  */
73
187
  export async function getProjectItemSummaryForBranch(query) {
74
- const hasClaude = await claude.ensureClaudeCli();
75
- if (!hasClaude) {
76
- throw new Error('Claude CLI is required to read the project item of a branch from idea1.ai');
77
- }
78
188
  logger.step(`Reading the project item of ${query.branchName} from idea1.ai...`);
79
- const output = await callStructured(getProjectItemSummaryForBranchPrompt(query), projectItemSummaryOutputSchema);
80
- return readProjectItemSummaryOutput(output, error => /not under workflow management/i.test(error));
189
+ const path = `v1/teams/active/project-items/for-branch?${new URLSearchParams(query).toString()}`;
190
+ const response = await send('GET', path, null);
191
+ if (response.status === 404) {
192
+ return null;
193
+ }
194
+ return checkedSummary(await readData('GET', path, response));
81
195
  }
82
196
  /**
83
197
  * The summary of a project item: its `workflowContext` is null while the item is outside workflow
84
198
  * management.
85
199
  */
86
200
  export async function getProjectItemSummary(itemUrl) {
87
- const hasClaude = await claude.ensureClaudeCli();
88
- if (!hasClaude) {
89
- throw new Error('Claude CLI is required to read a project item from idea1.ai');
90
- }
91
201
  logger.step(`Reading ${itemUrl} from idea1.ai...`);
92
- const output = await callStructured(getProjectItemSummaryPrompt({ projectItemUrl: itemUrl }), projectItemSummaryOutputSchema);
93
- const summary = readProjectItemSummaryOutput(output, () => false);
94
- if (!summary) {
95
- throw new Error(`idea1.ai returned no project item for ${itemUrl}`);
96
- }
97
- return summary;
202
+ return callForSummary('GET', `${projectItemPath(itemUrl)}/summary`, null);
98
203
  }
99
204
  /**
100
205
  * Record a branch in a project item's workflow context as the one implementing the item, putting
@@ -104,120 +209,46 @@ export async function getProjectItemSummary(itemUrl) {
104
209
  * refused by the platform, which surfaces here as an error.
105
210
  */
106
211
  export async function upsertProjectItemWorkflowContext(input) {
107
- const hasClaude = await claude.ensureClaudeCli();
108
- if (!hasClaude) {
109
- throw new Error('Claude CLI is required to record the workflow context on idea1.ai');
110
- }
111
212
  logger.step(`Recording ${input.branchName} as the branch of ${input.projectItemUrl} on idea1.ai...`);
112
- const output = await callStructured(upsertProjectItemWorkflowContextPrompt(input), projectItemSummaryOutputSchema);
113
- const summary = readProjectItemSummaryOutput(output, () => false);
114
- if (!summary?.workflowContext) {
213
+ const summary = await callForSummary('PUT', `${projectItemPath(input.projectItemUrl)}/workflow-context`, {
214
+ repositoryFullName: input.repositoryFullName,
215
+ branchName: input.branchName,
216
+ baseBranch: input.baseBranch,
217
+ devWorkflowType: input.devWorkflowType,
218
+ stackBranch: input.stackBranch,
219
+ integrationBranch: input.integrationBranch
220
+ });
221
+ if (summary.workflowContext === null) {
115
222
  throw new Error('The platform returned no workflow context after recording the branch');
116
223
  }
117
224
  return summary;
118
225
  }
119
226
  /**
120
- * The summary an output carries. An error `isAbsence` recognizes as "the platform has no such
121
- * item" yields null; any other error is thrown.
122
- */
123
- function readProjectItemSummaryOutput(output, isAbsence) {
124
- if (typeof output.error === 'string' && output.error.trim().length > 0) {
125
- if (isAbsence(output.error)) {
126
- return null;
127
- }
128
- throw new Error(`idea1.ai: ${output.error.trim()}`);
129
- }
130
- const summary = output.projectItemSummary;
131
- if (!summary || typeof summary.url !== 'string' || !isProjectItemUrl(summary.url)) {
132
- throw new Error(`Claude did not return a valid project item summary: ${JSON.stringify(output.projectItemSummary)}`);
133
- }
134
- return summary;
135
- }
136
- /**
137
- * JSON schema for the project-item-summary structured output (`ProjectItemSummary` or an error).
138
- */
139
- const projectItemSummaryOutputSchema = {
140
- type: 'object',
141
- properties: {
142
- projectItemSummary: {
143
- type: ['object', 'null'],
144
- description: 'The project item summary the tool returned, or null when it returned an error',
145
- properties: {
146
- url: { type: 'string' },
147
- externalId: { type: 'integer' },
148
- title: { type: 'string' },
149
- epicId: { type: ['string', 'null'] },
150
- completionDate: { type: ['string', 'null'] },
151
- legacyWorkflowStatus: { type: 'string' },
152
- projectId: { type: ['string', 'null'], description: 'The Project the item is planned in; null when it is out of scope' },
153
- assignedToUserId: { type: ['string', 'null'], description: 'The team member the item is assigned to; null when unassigned' },
154
- workflowContext: {
155
- type: ['object', 'null'],
156
- properties: {
157
- workflowStatus: { type: 'string' },
158
- codingAgentUrl: { type: 'string' },
159
- pullRequestUrl: { type: 'string' },
160
- repositoryFullName: { type: 'string' },
161
- branchName: { type: 'string' },
162
- baseBranch: { type: 'string' },
163
- devWorkflowType: { type: 'string', enum: ['independent', 'integration'] },
164
- stackBranch: { type: ['string', 'null'] },
165
- integrationBranch: { type: ['string', 'null'] },
166
- branchState: { type: 'integer', enum: [0, 1, 2], description: '0 Live, 1 Merged, 2 Deleted' }
167
- },
168
- required: ['workflowStatus', 'codingAgentUrl', 'pullRequestUrl', 'repositoryFullName', 'branchName', 'baseBranch', 'devWorkflowType', 'stackBranch', 'integrationBranch', 'branchState'],
169
- additionalProperties: false
170
- }
171
- },
172
- required: ['url', 'externalId', 'title', 'epicId', 'completionDate', 'legacyWorkflowStatus', 'projectId', 'assignedToUserId', 'workflowContext'],
173
- additionalProperties: false
174
- },
175
- error: { type: ['string', 'null'], description: 'The error the tool returned, verbatim, or null on success' }
176
- },
177
- required: ['projectItemSummary', 'error'],
178
- additionalProperties: false
179
- };
180
- /**
181
- * Generate a branch name from a project item description
227
+ * Generate a branch name from a project item's description.
182
228
  */
183
229
  export async function generateBranchName(itemUrl) {
184
- const hasClaude = await claude.ensureClaudeCli();
185
- if (!hasClaude) {
186
- throw new Error('Claude CLI is required to generate branch names');
187
- }
188
230
  logger.step('Generating branch name from item description...');
189
- const branchName = await callForResult(generateBranchNamePrompt({ projectItemUrl: itemUrl }));
231
+ const item = await call('GET', projectItemPath(itemUrl), null);
232
+ const branchName = await claude.runWithPrompt(generateBranchNamePrompt({ description: item.description }), PLATFORM_CALL_RUN_OPTIONS);
190
233
  // Clean up any extra whitespace/newlines
191
234
  const cleanedName = branchName.replace(/\n/g, '').trim();
192
235
  logger.dim(`Generated branch name: ${cleanedName}`);
193
236
  return cleanedName;
194
237
  }
238
+ /**
239
+ * The team's live Projects, most recently created first.
240
+ */
241
+ async function readLiveProjects() {
242
+ const projects = await call('GET', 'v1/teams/active/projects', null);
243
+ return projects.filter(project => project.status === ProjectStatus.Live);
244
+ }
195
245
  /**
196
246
  * The names of the team's live Projects, most recently created first.
197
247
  */
198
248
  export async function listProjects() {
199
249
  logger.step('Reading the team\'s projects from idea1.ai...');
200
- const output = await callStructured(listProjectsPrompt({}), listProjectsSchema);
201
- const projects = Array.isArray(output.projects)
202
- ? output.projects.filter((name) => typeof name === 'string' && name.trim().length > 0).map(name => name.trim())
203
- : [];
204
- return projects;
250
+ return (await readLiveProjects()).map(project => project.name);
205
251
  }
206
- /**
207
- * JSON schema for the list-projects structured output.
208
- */
209
- const listProjectsSchema = {
210
- type: 'object',
211
- properties: {
212
- projects: {
213
- type: 'array',
214
- description: 'The names of the live Idea1 projects, most recently created first',
215
- items: { type: 'string' }
216
- }
217
- },
218
- required: ['projects'],
219
- additionalProperties: false
220
- };
221
252
  let teamMembers = null;
222
253
  /**
223
254
  * The members of the team, read once per process: the teammates a project item can be assigned
@@ -234,11 +265,8 @@ export function listTeamMembers() {
234
265
  }
235
266
  async function readTeamMembers() {
236
267
  logger.step('Reading the team\'s members from idea1.ai...');
237
- const output = await callStructured(listTeamMembersPrompt({}), listTeamMembersSchema);
238
- if (!Array.isArray(output.members)) {
239
- throw new Error(`Claude did not return the team's members: ${JSON.stringify(output.members)}`);
240
- }
241
- return output.members.map(member => ({
268
+ const members = await call('GET', 'v1/teams/active/members', null);
269
+ return members.map(member => ({
242
270
  userId: member.userId,
243
271
  email: member.email.trim(),
244
272
  role: member.role,
@@ -260,55 +288,25 @@ export async function resolveTeammate(identity) {
260
288
  return teammate;
261
289
  }
262
290
  /**
263
- * JSON schema for the list-team-members structured output.
264
- */
265
- const listTeamMembersSchema = {
266
- type: 'object',
267
- properties: {
268
- members: {
269
- type: 'array',
270
- description: 'The team\'s members, in the order returned',
271
- items: {
272
- type: 'object',
273
- properties: {
274
- userId: { type: 'string' },
275
- email: { type: 'string' },
276
- role: { type: 'string' },
277
- gitHubUsername: { type: ['string', 'null'], description: 'The member\'s linked GitHub login, or null when none is linked' }
278
- },
279
- required: ['userId', 'email', 'role', 'gitHubUsername'],
280
- additionalProperties: false
281
- }
282
- }
283
- },
284
- required: ['members'],
285
- additionalProperties: false
286
- };
287
- /**
288
- * Create a new idea1 project item with the given title in the named Project.
291
+ * Create a new idea1 project item with the given title in the named live Project.
289
292
  * The item is created with description `# <title>`.
290
293
  * Returns the created item's URL.
291
294
  */
292
295
  export async function createProjectItem(title, projectName) {
293
296
  logger.step(`Creating project item "${title}" in project "${projectName}"...`);
294
- const output = validateAgentResponse(await callStructured(createProjectItemPrompt({ title, projectName }), createProjectItemSchema));
295
- const url = typeof output.projectItemUrl === 'string' ? output.projectItemUrl.trim() : '';
296
- if (!isProjectItemUrl(url)) {
297
- throw new Error(`Claude did not return a valid project item URL: ${JSON.stringify(output.projectItemUrl)}`);
297
+ const project = (await readLiveProjects()).find(candidate => candidate.name.trim().toLowerCase() === projectName.trim().toLowerCase());
298
+ if (!project) {
299
+ throw new Error(`The team has no live project named "${projectName}".`);
298
300
  }
299
- logger.success(`Created project item: ${url}`);
300
- return url;
301
+ const summary = await callForSummary('POST', `v1/teams/active/projects/${project.projectId}/project-items`, { description: `# ${title}` });
302
+ logger.success(`Created project item: ${summary.url}`);
303
+ return summary.url;
301
304
  }
302
305
  /**
303
- * JSON schema for the create-project-item structured output.
306
+ * The user the platform credential signs in as, and the team its calls work on.
304
307
  */
305
- const createProjectItemSchema = {
306
- type: 'object',
307
- properties: {
308
- projectItemUrl: { type: 'string', description: 'The URL of the created idea1 project item, or an empty string on failure' },
309
- error: { type: ['string', 'null'], description: 'The error returned by create_item, or null when the item was created' }
310
- },
311
- required: ['projectItemUrl', 'error'],
312
- additionalProperties: false
313
- };
308
+ export async function getSignedInUser() {
309
+ const context = await call('GET', 'v1/user/core-application-context', null);
310
+ return { emailAddress: context.userContext.emailAddress, teamName: context.activeTeam.teamName };
311
+ }
314
312
  //# sourceMappingURL=platform.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"platform.js","sourceRoot":"","sources":["../../src/services/platform.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EACxB,oCAAoC,EACpC,2BAA2B,EAC3B,kBAAkB,EAClB,qBAAqB,EACrB,uBAAuB,EACvB,sCAAsC,EACvC,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAGtC;;;;;;;;;;;;GAYG;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAA+B,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;AAE3G;;GAEG;AACH,KAAK,UAAU,cAAc,CAAI,MAAc,EAAE,UAAkB;IACjE,OAAO,MAAM,CAAC,aAAa,CAAI,MAAM,EAAE,UAAU,EAAE,yBAAyB,CAAC,CAAC;AAChF,CAAC;AAED;;GAEG;AACH,KAAK,UAAU,aAAa,CAAC,MAAc;IACzC,OAAO,MAAM,CAAC,aAAa,CAAC,MAAM,EAA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AK,EAAE,kCAAkC,EAAE,IAAI,CAAC,CAAC;IACpG,OAAO,EAAE,YAAY,EAAE,OAAO,CAAC,WAAW,CAAC,YAAY,EAAE,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;AACnG,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/services/setup.ts"],"names":[],"mappings":"AAyIA;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEzD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAmBnD;AAED;;;;;GAKG;AACH,wBAAsB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAoBjE"}
1
+ {"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/services/setup.ts"],"names":[],"mappings":"AA0IA;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEzD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAmBnD;AAED;;;;;GAKG;AACH,wBAAsB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAoBjE"}
@@ -87,7 +87,7 @@ A state's entries replace that state's built-in ones. Each entry has a \`name\`
87
87
 
88
88
  ### release (optional)
89
89
 
90
- The packages \`idea1 release\` can version. Before the release PR is opened, every versioned
90
+ How changes may reach the release branch, and the packages \`idea1 release\` can version. Before the release PR is opened, every versioned
91
91
  package whose folder changed since the last release (and whose version has not moved yet) gets
92
92
  a version bump: its \`package.json\` version, and the lockfiles above it, are updated and
93
93
  committed to the release branch by \`idea1 release\` itself (the Idea1 web app makes the same
@@ -95,6 +95,7 @@ bump). Without this section a release has no version bump step.
95
95
 
96
96
  | Property | Description |
97
97
  |----------|-------------|
98
+ | \`releaseBranchChanges\` | How changes may reach the release branch: \`approved-only\` (default; every change arrives through its own approved change, and a release carrying a direct commit is refused until a repository admin records why) or \`direct-allowed\` (direct commits are carried and listed in the release PR for its approver to review) |
98
99
  | \`versionedPackages\` | The packages a release can bump: \`name\` (used by \`--bumps\`), \`label\` (shown in prompts) and \`path\` (the folder holding the package's \`package.json\`) |
99
100
 
100
101
  \`\`\`json
@@ -1 +1 @@
1
- {"version":3,"file":"setup.js","sourceRoot":"","sources":["../../src/services/setup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AACxF,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAE7D,MAAM,SAAS,GAAG,QAAQ,CAAC;AAC3B,MAAM,aAAa,GAAG,eAAe,CAAC;AACtC,MAAM,cAAc,GAAG,YAAY,CAAC;AACpC,MAAM,WAAW,GAAG,WAAW,CAAC;AAEhC,MAAM,gBAAgB,GAAG;IACvB,KAAK,EAAE,EACN;IACD,QAAQ,EAAE;QACR,YAAY,EAAE,uBAAuB,CAAC,YAAY;QAClD,UAAU,EAAE,uBAAuB,CAAC,UAAU;QAC9C,mBAAmB,EAAE,uBAAuB,CAAC,mBAAmB;QAChE,YAAY,EAAE,uBAAuB,CAAC,YAAY;QAClD,uBAAuB,EAAE,uBAAuB,CAAC,uBAAuB;QACxE,yBAAyB,EAAE,uBAAuB,CAAC,yBAAyB;QAC5E,6BAA6B,EAAE,uBAAuB,CAAC,6BAA6B;QACpF,WAAW,EAAE,uBAAuB,CAAC,WAAW;KACjD;CACF,CAAC;AAEF,kGAAkG;AAClG,MAAM,iBAA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AM,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO;IACT,CAAC;IAED,cAAc,CAAC,aAAa,EAAE,GAAG,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,+BAA+B,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1H,MAAM,CAAC,IAAI,CAAC,SAAS,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,SAAS,IAAI,cAAc,uBAAuB,CAAC,CAAC;AACpG,CAAC"}
@@ -108,6 +108,20 @@ export interface VersionedPackage {
108
108
  /** The package's folder, relative to the repo root; it holds the package's package.json. */
109
109
  path: string;
110
110
  }
111
+ /**
112
+ * How changes may reach the release branch (`defaults.baseBranch`), the branch a planned release is cut from.
113
+ * A workflow-level policy: it says what the workflow accepts, not which repository host feature enforces it.
114
+ *
115
+ * - `approved-only`: every change reaches the release branch through its own approved change. A commit
116
+ * made directly on the branch stops a release until a repository admin records why it was made there.
117
+ * - `direct-allowed`: a change may also be made directly on the release branch. A release carries such a
118
+ * commit and lists it for its approver to review, with no admin and no recorded reason.
119
+ *
120
+ * The release target branch (`defaults.releaseTargetBranch`) is not configurable: it only ever changes
121
+ * through a release, never directly.
122
+ */
123
+ export type ReleaseBranchChanges = 'approved-only' | 'direct-allowed';
124
+ export declare const RELEASE_BRANCH_CHANGES: readonly ReleaseBranchChanges[];
111
125
  /**
112
126
  * Idea1 settings from .idea1/settings.json, overlaid with .idea1/settings.local.json
113
127
  */
@@ -145,6 +159,8 @@ export interface Idea1Settings {
145
159
  * bumps those whose folder changed since the last release, before the release PR is opened.
146
160
  */
147
161
  versionedPackages?: VersionedPackage[];
162
+ /** How changes may reach the release branch (default `approved-only`). */
163
+ releaseBranchChanges?: ReleaseBranchChanges;
148
164
  };
149
165
  }
150
166
  /**