@devpad/cli 2.0.2 → 2.0.4

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 (2) hide show
  1. package/dist/index.js +190 -451
  2. package/package.json +10 -11
package/dist/index.js CHANGED
@@ -8291,7 +8291,7 @@ var coerce = {
8291
8291
  date: (arg) => ZodDate.create({ ...arg, coerce: true })
8292
8292
  };
8293
8293
  var NEVER = INVALID;
8294
- // ../api/dist/chunk-WTGVONUB.js
8294
+ // ../api/dist/chunk-XGQQPYSB.js
8295
8295
  var ArrayBufferedQueue = class {
8296
8296
  constructor(_capacity) {
8297
8297
  this._capacity = _capacity;
@@ -8347,7 +8347,8 @@ var upsert_project = exports_external.object({
8347
8347
  link_url: exports_external.string().nullable(),
8348
8348
  link_text: exports_external.string().nullable(),
8349
8349
  visibility: exports_external.union([exports_external.literal("PUBLIC"), exports_external.literal("PRIVATE"), exports_external.literal("HIDDEN"), exports_external.literal("ARCHIVED"), exports_external.literal("DRAFT"), exports_external.literal("DELETED")]).optional(),
8350
- current_version: exports_external.string().nullable()
8350
+ current_version: exports_external.string().nullable(),
8351
+ force: exports_external.boolean().optional().describe("Override protection on user-modified entities")
8351
8352
  });
8352
8353
  var upsert_todo = exports_external.object({
8353
8354
  id: exports_external.string().optional().nullable(),
@@ -8361,7 +8362,8 @@ var upsert_todo = exports_external.object({
8361
8362
  priority: exports_external.union([exports_external.literal("LOW"), exports_external.literal("MEDIUM"), exports_external.literal("HIGH")]).optional(),
8362
8363
  owner_id: exports_external.string(),
8363
8364
  project_id: exports_external.string().optional().nullable(),
8364
- goal_id: exports_external.string().optional().nullable()
8365
+ goal_id: exports_external.string().optional().nullable(),
8366
+ force: exports_external.boolean().optional().describe("Override protection on user-modified entities")
8365
8367
  });
8366
8368
  var update_action = exports_external.union([exports_external.literal("CONFIRM"), exports_external.literal("UNLINK"), exports_external.literal("CREATE"), exports_external.literal("IGNORE"), exports_external.literal("DELETE"), exports_external.literal("COMPLETE")]);
8367
8369
  var ConfigSchema = exports_external.object({
@@ -8414,7 +8416,8 @@ var upsert_milestone = exports_external.object({
8414
8416
  target_time: exports_external.string().nullable().optional(),
8415
8417
  target_version: exports_external.string().nullable().optional(),
8416
8418
  finished_at: exports_external.string().nullable().optional(),
8417
- after_id: exports_external.string().nullable().optional()
8419
+ after_id: exports_external.string().nullable().optional(),
8420
+ force: exports_external.boolean().optional().describe("Override protection on user-modified entities")
8418
8421
  });
8419
8422
  var upsert_goal = exports_external.object({
8420
8423
  id: exports_external.string().optional().nullable(),
@@ -8422,7 +8425,8 @@ var upsert_goal = exports_external.object({
8422
8425
  name: exports_external.string().min(1).max(200),
8423
8426
  description: exports_external.string().nullable().optional(),
8424
8427
  target_time: exports_external.string().nullable().optional(),
8425
- finished_at: exports_external.string().nullable().optional()
8428
+ finished_at: exports_external.string().nullable().optional(),
8429
+ force: exports_external.boolean().optional().describe("Override protection on user-modified entities")
8426
8430
  });
8427
8431
 
8428
8432
  // ../../node_modules/@f0rbit/corpus/dist/types.js
@@ -9249,46 +9253,6 @@ class ForeignKey {
9249
9253
  function uniqueKeyName2(table, columns) {
9250
9254
  return `${table[TableName]}_${columns.join("_")}_unique`;
9251
9255
  }
9252
- function unique(name) {
9253
- return new UniqueOnConstraintBuilder(name);
9254
- }
9255
-
9256
- class UniqueConstraintBuilder {
9257
- constructor(columns, name) {
9258
- this.name = name;
9259
- this.columns = columns;
9260
- }
9261
- static [entityKind] = "SQLiteUniqueConstraintBuilder";
9262
- columns;
9263
- build(table) {
9264
- return new UniqueConstraint(table, this.columns, this.name);
9265
- }
9266
- }
9267
-
9268
- class UniqueOnConstraintBuilder {
9269
- static [entityKind] = "SQLiteUniqueOnConstraintBuilder";
9270
- name;
9271
- constructor(name) {
9272
- this.name = name;
9273
- }
9274
- on(...columns) {
9275
- return new UniqueConstraintBuilder(columns, this.name);
9276
- }
9277
- }
9278
-
9279
- class UniqueConstraint {
9280
- constructor(table, columns, name) {
9281
- this.table = table;
9282
- this.columns = columns;
9283
- this.name = name ?? uniqueKeyName2(this.table, this.columns.map((column) => column.name));
9284
- }
9285
- static [entityKind] = "SQLiteUniqueConstraint";
9286
- columns;
9287
- name;
9288
- getName() {
9289
- return this.name;
9290
- }
9291
- }
9292
9256
 
9293
9257
  // ../../node_modules/drizzle-orm/sqlite-core/columns/common.js
9294
9258
  class SQLiteColumnBuilder extends ColumnBuilder {
@@ -9571,7 +9535,6 @@ function integer(a, b) {
9571
9535
  }
9572
9536
  return new SQLiteIntegerBuilder(name);
9573
9537
  }
9574
- var int = integer;
9575
9538
 
9576
9539
  // ../../node_modules/drizzle-orm/sqlite-core/columns/numeric.js
9577
9540
  class SQLiteNumericBuilder extends SQLiteColumnBuilder {
@@ -9767,9 +9730,9 @@ var sqliteTable = (name, columns, extraConfig) => {
9767
9730
 
9768
9731
  // ../../node_modules/drizzle-orm/sqlite-core/indexes.js
9769
9732
  class IndexBuilderOn {
9770
- constructor(name, unique2) {
9733
+ constructor(name, unique) {
9771
9734
  this.name = name;
9772
- this.unique = unique2;
9735
+ this.unique = unique;
9773
9736
  }
9774
9737
  static [entityKind] = "SQLiteIndexBuilderOn";
9775
9738
  on(...columns) {
@@ -9780,11 +9743,11 @@ class IndexBuilderOn {
9780
9743
  class IndexBuilder {
9781
9744
  static [entityKind] = "SQLiteIndexBuilder";
9782
9745
  config;
9783
- constructor(name, columns, unique2) {
9746
+ constructor(name, columns, unique) {
9784
9747
  this.config = {
9785
9748
  name,
9786
9749
  columns,
9787
- unique: unique2,
9750
+ unique,
9788
9751
  where: undefined
9789
9752
  };
9790
9753
  }
@@ -9843,21 +9806,6 @@ class PrimaryKey {
9843
9806
  }
9844
9807
  }
9845
9808
 
9846
- // ../../node_modules/drizzle-orm/relations.js
9847
- class Relations {
9848
- constructor(table, config) {
9849
- this.table = table;
9850
- this.config = config;
9851
- }
9852
- static [entityKind] = "Relations";
9853
- }
9854
- function relations(table, relations2) {
9855
- return new Relations(table, (helpers) => Object.fromEntries(Object.entries(relations2(helpers)).map(([key, value]) => [
9856
- key,
9857
- value.withFieldName(key)
9858
- ])));
9859
- }
9860
-
9861
9809
  // ../../node_modules/@f0rbit/corpus/dist/observations/schema.js
9862
9810
  var corpus_observations = sqliteTable("corpus_observations", {
9863
9811
  id: text("id").primaryKey(),
@@ -9916,275 +9864,6 @@ var corpus_snapshots = sqliteTable("corpus_snapshots", {
9916
9864
  hash_idx: index("idx_content_hash").on(table.store_id, table.content_hash),
9917
9865
  data_key_idx: index("idx_data_key").on(table.data_key)
9918
9866
  }));
9919
- // ../api/dist/chunk-FOO5XXY5.js
9920
- var timestamps = () => ({
9921
- created_at: text("created_at").notNull().default(sql`(CURRENT_TIMESTAMP)`),
9922
- updated_at: text("updated_at").notNull().default(sql`(CURRENT_TIMESTAMP)`)
9923
- });
9924
- var deleted = () => ({
9925
- deleted: int("deleted", { mode: "boolean" }).notNull().default(false)
9926
- });
9927
- var owner_id = () => ({
9928
- owner_id: text("owner_id").notNull().references(() => user.id)
9929
- });
9930
- var id = (prefix) => ({
9931
- id: text("id").primaryKey().$defaultFn(() => `${prefix}_${crypto.randomUUID()}`)
9932
- });
9933
- var entity = (prefix) => ({
9934
- ...id(prefix),
9935
- ...timestamps(),
9936
- ...deleted()
9937
- });
9938
- var owned_entity = (prefix) => ({
9939
- ...entity(prefix),
9940
- ...owner_id()
9941
- });
9942
- var user = sqliteTable("user", {
9943
- id: text("id").primaryKey().$defaultFn(() => `user_${crypto.randomUUID()}`),
9944
- github_id: integer("github_id"),
9945
- name: text("name"),
9946
- email: text("email").unique(),
9947
- email_verified: text("email_verified"),
9948
- image_url: text("image_url"),
9949
- task_view: text("task_view", { enum: ["list", "grid"] }).notNull().default("list")
9950
- });
9951
- var session = sqliteTable("session", {
9952
- id: text("id").notNull().primaryKey(),
9953
- userId: text("user_id").notNull().references(() => user.id),
9954
- expiresAt: integer("expires_at").notNull(),
9955
- access_token: text("access_token")
9956
- });
9957
- var api_keys = sqliteTable("api_keys", {
9958
- ...id("apikey"),
9959
- user_id: text("user_id").notNull().references(() => user.id),
9960
- key_hash: text("key_hash").notNull().unique(),
9961
- name: text("name"),
9962
- note: text("note"),
9963
- scope: text("scope", { enum: ["devpad", "blog", "media", "all"] }).notNull().default("all"),
9964
- enabled: integer("enabled", { mode: "boolean" }).notNull().default(true),
9965
- last_used_at: text("last_used_at"),
9966
- ...timestamps(),
9967
- deleted: integer("deleted", { mode: "boolean" }).notNull().default(false)
9968
- });
9969
- var project = sqliteTable("project", {
9970
- ...owned_entity("project"),
9971
- project_id: text("project_id").notNull(),
9972
- name: text("name").notNull(),
9973
- description: text("description"),
9974
- specification: text("specification"),
9975
- repo_url: text("repo_url"),
9976
- repo_id: integer("repo_id"),
9977
- icon_url: text("icon_url"),
9978
- status: text("status", { enum: ["DEVELOPMENT", "PAUSED", "RELEASED", "LIVE", "FINISHED", "ABANDONED", "STOPPED"] }).notNull().default("DEVELOPMENT"),
9979
- link_url: text("link_url"),
9980
- link_text: text("link_text"),
9981
- visibility: text("visibility", { enum: ["PUBLIC", "PRIVATE", "HIDDEN", "ARCHIVED", "DRAFT", "DELETED"] }).notNull().default("PRIVATE"),
9982
- current_version: text("current_version"),
9983
- scan_branch: text("scan_branch")
9984
- });
9985
- var ACTIONS = [
9986
- "CREATE_TASK",
9987
- "UPDATE_TASK",
9988
- "DELETE_TASK",
9989
- "CREATE_PROJECT",
9990
- "UPDATE_PROJECT",
9991
- "DELETE_PROJECT",
9992
- "CREATE_TAG",
9993
- "UPDATE_TAG",
9994
- "DELETE_TAG",
9995
- "CREATE_GOAL",
9996
- "UPDATE_GOAL",
9997
- "DELETE_GOAL",
9998
- "CREATE_MILESTONE",
9999
- "UPDATE_MILESTONE",
10000
- "DELETE_MILESTONE",
10001
- "CREATE_CHECKLIST",
10002
- "UPDATE_CHECKLIST",
10003
- "DELETE_CHECKLIST"
10004
- ];
10005
- var action = sqliteTable("action", {
10006
- ...owned_entity("action"),
10007
- type: text("type", { enum: ACTIONS }).notNull(),
10008
- description: text("description").notNull(),
10009
- data: text("data", { mode: "json" })
10010
- });
10011
- var tracker_result = sqliteTable("tracker_result", {
10012
- id: integer("id").primaryKey({ autoIncrement: true }),
10013
- project_id: text("project_id").notNull().references(() => project.id),
10014
- created_at: text("created_at").notNull().default(sql`(CURRENT_TIMESTAMP)`),
10015
- data: text("data", { mode: "json" }).notNull(),
10016
- accepted: integer("accepted", { mode: "boolean" }).notNull().default(false)
10017
- });
10018
- var todo_updates = sqliteTable("todo_updates", {
10019
- id: integer("id").primaryKey({ autoIncrement: true }),
10020
- project_id: text("project_id").notNull().references(() => project.id),
10021
- created_at: text("created_at").notNull().default(sql`(CURRENT_TIMESTAMP)`),
10022
- old_id: integer("old_id").references(() => tracker_result.id),
10023
- new_id: integer("new_id").notNull().references(() => tracker_result.id),
10024
- data: text("data", { mode: "json" }).notNull(),
10025
- status: text("status", { enum: ["PENDING", "ACCEPTED", "REJECTED", "IGNORED"] }).notNull().default("PENDING"),
10026
- branch: text("branch"),
10027
- commit_sha: text("commit_sha"),
10028
- commit_msg: text("commit_msg"),
10029
- commit_url: text("commit_url")
10030
- });
10031
- var update_tracker_relations = relations(todo_updates, ({ one }) => ({
10032
- old: one(tracker_result, { fields: [todo_updates.old_id], references: [tracker_result.id] }),
10033
- new: one(tracker_result, { fields: [todo_updates.new_id], references: [tracker_result.id] })
10034
- }));
10035
- var milestone = sqliteTable("milestone", {
10036
- ...entity("milestone"),
10037
- project_id: text("project_id").notNull().references(() => project.id),
10038
- name: text("name").notNull(),
10039
- description: text("description"),
10040
- target_time: text("target_time"),
10041
- target_version: text("target_version"),
10042
- finished_at: text("finished_at"),
10043
- after_id: text("after_id")
10044
- });
10045
- var goal = sqliteTable("goal", {
10046
- ...entity("goal"),
10047
- milestone_id: text("milestone_id").notNull().references(() => milestone.id),
10048
- name: text("name").notNull(),
10049
- description: text("description"),
10050
- target_time: text("target_time"),
10051
- finished_at: text("finished_at")
10052
- });
10053
- var task = sqliteTable("task", {
10054
- ...owned_entity("task"),
10055
- title: text("title").notNull(),
10056
- progress: text("progress", { enum: ["UNSTARTED", "IN_PROGRESS", "COMPLETED"] }).notNull().default("UNSTARTED"),
10057
- visibility: text("visibility", { enum: ["PUBLIC", "PRIVATE", "HIDDEN", "ARCHIVED", "DRAFT", "DELETED"] }).notNull().default("PRIVATE"),
10058
- goal_id: text("goal_id").references(() => goal.id),
10059
- project_id: text("project_id").references(() => project.id),
10060
- description: text("description"),
10061
- start_time: text("start_time"),
10062
- end_time: text("end_time"),
10063
- summary: text("summary"),
10064
- codebase_task_id: text("codebase_task_id").references(() => codebase_tasks.id),
10065
- priority: text("priority", { enum: ["LOW", "MEDIUM", "HIGH"] }).notNull().default("LOW")
10066
- });
10067
- var checklist = sqliteTable("checklist", {
10068
- ...entity("checklist"),
10069
- task_id: text("task_id").notNull().references(() => task.id),
10070
- name: text("name").notNull()
10071
- });
10072
- var checklist_item = sqliteTable("checklist_item", {
10073
- ...entity("checklist-item"),
10074
- checklist_id: text("checklist_id").notNull().references(() => checklist.id),
10075
- parent_id: text("parent_id"),
10076
- name: text("name").notNull(),
10077
- checked: int("checked", { mode: "boolean" }).notNull().default(false)
10078
- });
10079
- var codebase_tasks = sqliteTable("codebase_tasks", {
10080
- ...entity("codebase-task"),
10081
- branch: text("branch"),
10082
- commit_sha: text("commit_sha"),
10083
- commit_msg: text("commit_msg"),
10084
- commit_url: text("commit_url"),
10085
- type: text("type"),
10086
- text: text("text"),
10087
- file: text("file"),
10088
- line: integer("line"),
10089
- context: text("context", { mode: "json" }),
10090
- recent_scan_id: integer("recent_scan_id").references(() => tracker_result.id)
10091
- });
10092
- var tag = sqliteTable("tag", {
10093
- ...owned_entity("tag"),
10094
- title: text("title").notNull(),
10095
- color: text("color"),
10096
- render: int("render", { mode: "boolean" }).notNull().default(true)
10097
- }, (table) => ({
10098
- tag_unique: unique("tag_unique").on(table.owner_id, table.title)
10099
- }));
10100
- var task_tag = sqliteTable("task_tag", {
10101
- task_id: text("task_id").notNull().references(() => task.id),
10102
- tag_id: text("tag_id").notNull().references(() => tag.id),
10103
- ...timestamps()
10104
- }, (table) => ({
10105
- task_tag_unique: primaryKey({ columns: [table.task_id, table.tag_id] })
10106
- }));
10107
- var commit_detail = sqliteTable("commit_detail", {
10108
- sha: text("sha").primaryKey(),
10109
- message: text("message").notNull(),
10110
- url: text("url").notNull(),
10111
- avatar_url: text("avatar_url"),
10112
- author_user: text("author_user").notNull(),
10113
- author_name: text("author_name"),
10114
- author_email: text("author_email").notNull(),
10115
- date: text("date").notNull()
10116
- });
10117
- var tag_config = sqliteTable("tag_config", {
10118
- ...id("tag_config"),
10119
- project_id: text("project_id").notNull().references(() => project.id),
10120
- tag_id: text("tag_id").notNull().references(() => tag.id),
10121
- match: text("match").notNull(),
10122
- ...timestamps()
10123
- });
10124
- var ignore_path = sqliteTable("ignore_path", {
10125
- ...id("ignore_path"),
10126
- project_id: text("project_id").notNull().references(() => project.id),
10127
- path: text("path").notNull(),
10128
- ...timestamps()
10129
- });
10130
- var user_relations = relations(user, ({ many }) => ({
10131
- sessions: many(session),
10132
- api_keys: many(api_keys),
10133
- actions: many(action),
10134
- tasks: many(task),
10135
- tags: many(tag)
10136
- }));
10137
- var session_relations = relations(session, ({ one }) => ({
10138
- user: one(user, { fields: [session.userId], references: [user.id] })
10139
- }));
10140
- var api_keys_relations = relations(api_keys, ({ one }) => ({
10141
- owner: one(user, { fields: [api_keys.user_id], references: [user.id] })
10142
- }));
10143
- var project_relations = relations(project, ({ one, many }) => ({
10144
- owner: one(user, { fields: [project.owner_id], references: [user.id] }),
10145
- tracker_results: many(tracker_result),
10146
- milestones: many(milestone),
10147
- todo_updates: many(todo_updates)
10148
- }));
10149
- var action_relations = relations(action, ({ one }) => ({
10150
- owner: one(user, { fields: [action.owner_id], references: [user.id] })
10151
- }));
10152
- var tracker_result_relations = relations(tracker_result, ({ one }) => ({
10153
- project: one(project, { fields: [tracker_result.project_id], references: [project.id] })
10154
- }));
10155
- var todoUpdatesRelations = relations(todo_updates, ({ one }) => ({
10156
- project: one(project, { fields: [todo_updates.project_id], references: [project.id] }),
10157
- oldTrackerResult: one(tracker_result, { fields: [todo_updates.old_id], references: [tracker_result.id] }),
10158
- newTrackerResult: one(tracker_result, { fields: [todo_updates.new_id], references: [tracker_result.id] })
10159
- }));
10160
- var milestone_relations = relations(milestone, ({ one, many }) => ({
10161
- project: one(project, { fields: [milestone.project_id], references: [project.id] }),
10162
- goals: many(goal)
10163
- }));
10164
- var goal_relations = relations(goal, ({ one }) => ({
10165
- milestone: one(milestone, { fields: [goal.milestone_id], references: [milestone.id] })
10166
- }));
10167
- var task_relations = relations(task, ({ one, many }) => ({
10168
- owner: one(user, { fields: [task.owner_id], references: [user.id] }),
10169
- goal: one(goal, { fields: [task.goal_id], references: [goal.id] }),
10170
- codebase_task: one(codebase_tasks, { fields: [task.codebase_task_id], references: [codebase_tasks.id] }),
10171
- checklists: many(checklist)
10172
- }));
10173
- var checklist_relations = relations(checklist, ({ one, many }) => ({
10174
- task: one(task, { fields: [checklist.task_id], references: [task.id] }),
10175
- items: many(checklist_item)
10176
- }));
10177
- var checklist_item_relations = relations(checklist_item, ({ one }) => ({
10178
- checklist: one(checklist, { fields: [checklist_item.checklist_id], references: [checklist.id] })
10179
- }));
10180
- var tag_relations = relations(tag, ({ one }) => ({
10181
- owner: one(user, { fields: [tag.owner_id], references: [user.id] })
10182
- }));
10183
- var task_tag_relations = relations(task_tag, ({ one }) => ({
10184
- task: one(task, { fields: [task_tag.task_id], references: [task.id] }),
10185
- tag: one(tag, { fields: [task_tag.tag_id], references: [tag.id] })
10186
- }));
10187
-
10188
9867
  // ../api/dist/index.js
10189
9868
  var ApiError = class _ApiError extends Error {
10190
9869
  constructor(message, options = {}) {
@@ -10445,7 +10124,9 @@ var ApiClient2 = class {
10445
10124
  session: () => wrap(() => this.clients.auth_root.get("/auth/session")),
10446
10125
  keys: {
10447
10126
  list: () => wrap(() => this.clients.auth.get("/keys")),
10448
- create: (name) => wrap(() => this.clients.auth.post("/keys", { body: name ? { name } : {} })),
10127
+ create: (name) => wrap(() => this.clients.auth.post("/keys", {
10128
+ body: name ? { name } : {}
10129
+ })),
10449
10130
  revoke: (key_id) => wrap(() => this.clients.auth.delete(`/keys/${key_id}`)),
10450
10131
  remove: (key_id) => wrap(() => this.clients.auth.delete(`/keys/${key_id}`))
10451
10132
  }
@@ -10456,52 +10137,60 @@ var ApiClient2 = class {
10456
10137
  const result = await this.projects.list(filters);
10457
10138
  if (!result.ok)
10458
10139
  throw new Error(result.error.message);
10459
- return result.value.reduce((acc, project2) => {
10460
- acc[project2.id] = project2;
10140
+ return result.value.reduce((acc, project) => {
10141
+ acc[project.id] = project;
10461
10142
  return acc;
10462
10143
  }, {});
10463
10144
  }),
10464
- find: (id2) => wrap(() => this.clients.projects.get("/projects", { query: { id: id2 } })),
10145
+ find: (id) => wrap(() => this.clients.projects.get("/projects", { query: { id } })),
10465
10146
  getByName: (name) => wrap(() => this.clients.projects.get("/projects", { query: { name } })),
10466
- getById: (id2) => wrap(() => this.clients.projects.get("/projects", { query: { id: id2 } })),
10147
+ getById: (id) => wrap(() => this.clients.projects.get("/projects", { query: { id } })),
10467
10148
  create: (data) => wrap(() => this.clients.projects.patch("/projects", { body: data })),
10468
10149
  update: async (idOrData, changes) => wrap(async () => {
10469
10150
  if (typeof idOrData === "object" && idOrData.id) {
10470
- return this.clients.projects.patch("/projects", { body: idOrData });
10151
+ return this.clients.projects.patch("/projects", {
10152
+ body: idOrData
10153
+ });
10471
10154
  }
10472
- const id2 = idOrData;
10155
+ const id = idOrData;
10473
10156
  if (!changes) {
10474
10157
  throw new Error("Changes parameter required for update");
10475
10158
  }
10476
- const result = await this.projects.find(id2);
10159
+ const result = await this.projects.find(id);
10477
10160
  if (!result.ok)
10478
10161
  throw new Error(result.error.message);
10479
10162
  if (!result.value)
10480
- throw new Error(`Project with id ${id2} not found`);
10481
- const project2 = result.value;
10163
+ throw new Error(`Project with id ${id} not found`);
10164
+ const project = result.value;
10482
10165
  const updateData = {
10483
- id: project2.id,
10484
- project_id: project2.project_id,
10485
- owner_id: project2.owner_id,
10486
- name: project2.name,
10487
- description: project2.description,
10488
- specification: project2.specification,
10489
- repo_url: project2.repo_url,
10490
- repo_id: project2.repo_id,
10491
- icon_url: project2.icon_url,
10492
- status: project2.status,
10493
- deleted: project2.deleted,
10494
- link_url: project2.link_url,
10495
- link_text: project2.link_text,
10496
- visibility: project2.visibility,
10497
- current_version: project2.current_version,
10166
+ id: project.id,
10167
+ project_id: project.project_id,
10168
+ owner_id: project.owner_id,
10169
+ name: project.name,
10170
+ description: project.description,
10171
+ specification: project.specification,
10172
+ repo_url: project.repo_url,
10173
+ repo_id: project.repo_id,
10174
+ icon_url: project.icon_url,
10175
+ status: project.status,
10176
+ deleted: project.deleted,
10177
+ link_url: project.link_url,
10178
+ link_text: project.link_text,
10179
+ visibility: project.visibility,
10180
+ current_version: project.current_version,
10498
10181
  ...changes
10499
10182
  };
10500
- return this.clients.projects.patch("/projects", { body: updateData });
10183
+ return this.clients.projects.patch("/projects", {
10184
+ body: updateData
10185
+ });
10501
10186
  }),
10502
10187
  config: {
10503
- load: (project_id) => wrap(() => this.clients.projects.get("/projects/config", { query: { project_id } })),
10504
- save: (request) => wrap(() => this.clients.projects.patch("/projects/save_config", { body: request }))
10188
+ load: (project_id) => wrap(() => this.clients.projects.get("/projects/config", {
10189
+ query: { project_id }
10190
+ })),
10191
+ save: (request) => wrap(() => this.clients.projects.patch("/projects/save_config", {
10192
+ body: request
10193
+ }))
10505
10194
  },
10506
10195
  scan: {
10507
10196
  initiate: async (project_id) => {
@@ -10516,65 +10205,76 @@ var ApiClient2 = class {
10516
10205
  return stream;
10517
10206
  },
10518
10207
  updates: (project_id) => wrap(() => this.clients.projects.get("/projects/updates", { query: { project_id } }).then((response) => response.updates)),
10519
- update: (project_id, data) => wrap(() => this.clients.projects.post("/projects/scan_status", { query: { project_id }, body: data }))
10208
+ update: (project_id, data) => wrap(() => this.clients.projects.post("/projects/scan_status", {
10209
+ query: { project_id },
10210
+ body: data
10211
+ }))
10520
10212
  },
10521
10213
  history: (project_id) => wrap(() => this.clients.projects.get(`/projects/${project_id}/history`)),
10522
10214
  upsert: (data) => wrap(() => this.clients.projects.patch("/projects", { body: data })),
10523
- specification: (project_id) => wrap(() => this.clients.projects.get("/projects/fetch_spec", { query: { project_id } })),
10524
- deleteProject: (project2) => wrap(() => this.clients.projects.patch("/projects", { body: { ...project2, deleted: true } }))
10215
+ specification: (project_id) => wrap(() => this.clients.projects.get("/projects/fetch_spec", {
10216
+ query: { project_id }
10217
+ })),
10218
+ deleteProject: (project) => wrap(() => this.clients.projects.patch("/projects", {
10219
+ body: { ...project, deleted: true }
10220
+ }))
10525
10221
  };
10526
10222
  this.milestones = {
10527
10223
  list: () => wrap(() => this.clients.milestones.get("/milestones")),
10528
10224
  getByProject: (project_id) => wrap(() => this.clients.milestones.get(`/projects/${project_id}/milestones`)),
10529
- find: (id2) => wrap(async () => {
10225
+ find: (id) => wrap(async () => {
10530
10226
  try {
10531
- return await this.clients.milestones.get(`/milestones/${id2}`);
10227
+ return await this.clients.milestones.get(`/milestones/${id}`);
10532
10228
  } catch (error) {
10533
10229
  return null;
10534
10230
  }
10535
10231
  }),
10536
10232
  create: (data) => wrap(() => this.clients.milestones.post("/milestones", { body: data })),
10537
- update: async (id2, data) => wrap(async () => {
10538
- const result = await this.milestones.find(id2);
10233
+ update: async (id, data) => wrap(async () => {
10234
+ const result = await this.milestones.find(id);
10539
10235
  if (!result.ok)
10540
10236
  throw new Error(result.error.message);
10541
10237
  if (!result.value)
10542
- throw new Error(`Milestone with id ${id2} not found`);
10543
- const milestone2 = result.value;
10238
+ throw new Error(`Milestone with id ${id} not found`);
10239
+ const milestone = result.value;
10544
10240
  const updateData = {
10545
- id: milestone2.id,
10546
- project_id: milestone2.project_id,
10547
- name: data.name ?? milestone2.name,
10548
- description: data.description ?? milestone2.description,
10549
- target_time: data.target_time ?? milestone2.target_time,
10550
- target_version: data.target_version ?? milestone2.target_version
10241
+ id: milestone.id,
10242
+ project_id: milestone.project_id,
10243
+ name: data.name ?? milestone.name,
10244
+ description: data.description ?? milestone.description,
10245
+ target_time: data.target_time ?? milestone.target_time,
10246
+ target_version: data.target_version ?? milestone.target_version
10551
10247
  };
10552
- return this.clients.milestones.patch(`/milestones/${id2}`, { body: updateData });
10248
+ return this.clients.milestones.patch(`/milestones/${id}`, {
10249
+ body: updateData
10250
+ });
10553
10251
  }),
10554
- delete: (id2) => wrap(() => this.clients.milestones.delete(`/milestones/${id2}`)),
10555
- goals: (id2) => wrap(() => this.clients.milestones.get(`/milestones/${id2}/goals`))
10252
+ delete: (id) => wrap(() => this.clients.milestones.delete(`/milestones/${id}`)),
10253
+ goals: (id) => wrap(() => this.clients.milestones.get(`/milestones/${id}/goals`))
10556
10254
  };
10557
10255
  this.goals = {
10558
10256
  list: () => wrap(() => this.clients.goals.get("/goals")),
10559
- find: (id2) => wrap(() => this.clients.goals.get(`/goals/${id2}`)),
10257
+ find: (id) => wrap(() => this.clients.goals.get(`/goals/${id}`)),
10560
10258
  create: (data) => wrap(() => this.clients.goals.post("/goals", { body: data })),
10561
- update: async (id2, data) => wrap(async () => {
10562
- const result = await this.goals.find(id2);
10259
+ update: async (id, data) => wrap(async () => {
10260
+ const result = await this.goals.find(id);
10563
10261
  if (!result.ok)
10564
10262
  throw new Error(result.error.message);
10565
10263
  if (!result.value)
10566
- throw new Error(`Goal with id ${id2} not found`);
10567
- const goal2 = result.value;
10264
+ throw new Error(`Goal with id ${id} not found`);
10265
+ const goal = result.value;
10568
10266
  const updateData = {
10569
- id: goal2.id,
10570
- milestone_id: goal2.milestone_id,
10571
- name: data.name ?? goal2.name,
10572
- description: data.description ?? goal2.description,
10573
- target_time: data.target_time ?? goal2.target_time
10267
+ id: goal.id,
10268
+ milestone_id: goal.milestone_id,
10269
+ name: data.name ?? goal.name,
10270
+ description: data.description ?? goal.description,
10271
+ target_time: data.target_time ?? goal.target_time
10574
10272
  };
10575
- return this.clients.goals.patch(`/goals/${id2}`, { body: updateData });
10273
+ return this.clients.goals.patch(`/goals/${id}`, {
10274
+ body: updateData
10275
+ });
10576
10276
  }),
10577
- delete: (id2) => wrap(() => this.clients.goals.delete(`/goals/${id2}`))
10277
+ delete: (id) => wrap(() => this.clients.goals.delete(`/goals/${id}`))
10578
10278
  };
10579
10279
  this.tasks = {
10580
10280
  list: (filters) => wrap(() => {
@@ -10585,35 +10285,41 @@ var ApiClient2 = class {
10585
10285
  query.tag = filters.tag_id;
10586
10286
  return this.clients.tasks.get("/tasks", Object.keys(query).length > 0 ? { query } : {});
10587
10287
  }),
10588
- find: (id2) => wrap(() => this.clients.tasks.get("/tasks", { query: { id: id2 } })),
10589
- getByProject: (project_id) => wrap(() => this.clients.tasks.get(`/tasks`, { query: { project: project_id } })),
10288
+ find: (id) => wrap(() => this.clients.tasks.get("/tasks", { query: { id } })),
10289
+ getByProject: (project_id) => wrap(() => this.clients.tasks.get(`/tasks`, {
10290
+ query: { project: project_id }
10291
+ })),
10590
10292
  create: (data) => wrap(() => this.clients.tasks.patch("/tasks", { body: data })),
10591
- update: async (id2, changes) => wrap(async () => {
10592
- const result = await this.tasks.find(id2);
10293
+ update: async (id, changes) => wrap(async () => {
10294
+ const result = await this.tasks.find(id);
10593
10295
  if (!result.ok)
10594
10296
  throw new Error(result.error.message);
10595
10297
  if (!result.value)
10596
- throw new Error(`Task with id ${id2} not found`);
10597
- const task2 = result.value;
10298
+ throw new Error(`Task with id ${id} not found`);
10299
+ const task = result.value;
10598
10300
  const updateData = {
10599
- id: id2,
10600
- title: task2.task.title,
10601
- summary: task2.task.summary,
10602
- description: task2.task.description,
10603
- progress: task2.task.progress,
10604
- visibility: task2.task.visibility,
10605
- start_time: task2.task.start_time,
10606
- end_time: task2.task.end_time,
10607
- priority: task2.task.priority,
10608
- owner_id: task2.task.owner_id,
10609
- project_id: task2.task.project_id,
10301
+ id,
10302
+ title: task.task.title,
10303
+ summary: task.task.summary,
10304
+ description: task.task.description,
10305
+ progress: task.task.progress,
10306
+ visibility: task.task.visibility,
10307
+ start_time: task.task.start_time,
10308
+ end_time: task.task.end_time,
10309
+ priority: task.task.priority,
10310
+ owner_id: task.task.owner_id,
10311
+ project_id: task.task.project_id,
10610
10312
  ...changes
10611
10313
  };
10612
- return this.clients.tasks.patch("/tasks", { body: updateData });
10314
+ return this.clients.tasks.patch("/tasks", {
10315
+ body: updateData
10316
+ });
10613
10317
  }),
10614
10318
  upsert: (data) => wrap(() => this.clients.tasks.patch("/tasks", { body: data })),
10615
10319
  saveTags: (data) => wrap(() => this.clients.tasks.patch("/tasks/save_tags", { body: data })),
10616
- deleteTask: (task2) => wrap(() => this.clients.tasks.patch("/tasks", { body: { ...task2.task, deleted: true } })),
10320
+ deleteTask: (task) => wrap(() => this.clients.tasks.patch("/tasks", {
10321
+ body: { ...task.task, deleted: true }
10322
+ })),
10617
10323
  history: {
10618
10324
  get: (task_id) => wrap(() => this.clients.tasks.get(`/tasks/history/${task_id}`))
10619
10325
  }
@@ -10660,19 +10366,23 @@ var ApiClient2 = class {
10660
10366
  getForPost: (uuid) => wrap(() => this.clients.blog.get(`/blog/tags/posts/${uuid}/tags`)),
10661
10367
  setForPost: (uuid, tags) => wrap(() => this.clients.blog.put(`/blog/tags/posts/${uuid}/tags`, { body: { tags } })),
10662
10368
  addToPost: (uuid, tags) => wrap(() => this.clients.blog.post(`/blog/tags/posts/${uuid}/tags`, { body: { tags } })),
10663
- removeFromPost: (uuid, tag2) => wrap(() => this.clients.blog.delete(`/blog/tags/posts/${uuid}/tags/${tag2}`))
10369
+ removeFromPost: (uuid, tag) => wrap(() => this.clients.blog.delete(`/blog/tags/posts/${uuid}/tags/${tag}`))
10664
10370
  },
10665
10371
  categories: {
10666
10372
  tree: () => wrap(() => this.clients.blog.get("/blog/categories")),
10667
10373
  create: (data) => wrap(() => this.clients.blog.post("/blog/categories", { body: data })),
10668
- update: (name, data) => wrap(() => this.clients.blog.put(`/blog/categories/${name}`, { body: data })),
10374
+ update: (name, data) => wrap(() => this.clients.blog.put(`/blog/categories/${name}`, {
10375
+ body: data
10376
+ })),
10669
10377
  delete: (name) => wrap(() => this.clients.blog.delete(`/blog/categories/${name}`))
10670
10378
  },
10671
10379
  tokens: {
10672
10380
  list: () => wrap(() => this.clients.blog.get("/blog/tokens")),
10673
10381
  create: (data) => wrap(() => this.clients.blog.post("/blog/tokens", { body: data })),
10674
- update: (id2, data) => wrap(() => this.clients.blog.put(`/blog/tokens/${id2}`, { body: data })),
10675
- delete: (id2) => wrap(() => this.clients.blog.delete(`/blog/tokens/${id2}`))
10382
+ update: (id, data) => wrap(() => this.clients.blog.put(`/blog/tokens/${id}`, {
10383
+ body: data
10384
+ })),
10385
+ delete: (id) => wrap(() => this.clients.blog.delete(`/blog/tokens/${id}`))
10676
10386
  }
10677
10387
  };
10678
10388
  this.media = {
@@ -10682,9 +10392,9 @@ var ApiClient2 = class {
10682
10392
  return res.profiles;
10683
10393
  }),
10684
10394
  create: (data) => wrap(() => this.clients.media.post("/profiles", { body: data })),
10685
- get: (id2) => wrap(() => this.clients.media.get(`/profiles/${id2}`)),
10686
- update: (id2, data) => wrap(() => this.clients.media.patch(`/profiles/${id2}`, { body: data })),
10687
- delete: (id2) => wrap(() => this.clients.media.delete(`/profiles/${id2}`)),
10395
+ get: (id) => wrap(() => this.clients.media.get(`/profiles/${id}`)),
10396
+ update: (id, data) => wrap(() => this.clients.media.patch(`/profiles/${id}`, { body: data })),
10397
+ delete: (id) => wrap(() => this.clients.media.delete(`/profiles/${id}`)),
10688
10398
  filters: {
10689
10399
  list: (profile_id) => wrap(async () => {
10690
10400
  const res = await this.clients.media.get(`/profiles/${profile_id}/filters`);
@@ -10714,10 +10424,14 @@ var ApiClient2 = class {
10714
10424
  delete: (account_id) => wrap(() => this.clients.media.delete(`/connections/${account_id}`)),
10715
10425
  refresh: (account_id) => wrap(() => this.clients.media.post(`/connections/${account_id}/refresh`)),
10716
10426
  refreshAll: () => wrap(() => this.clients.media.post("/connections/refresh-all")),
10717
- updateStatus: (account_id, is_active) => wrap(() => this.clients.media.patch(`/connections/${account_id}`, { body: { is_active } })),
10427
+ updateStatus: (account_id, is_active) => wrap(() => this.clients.media.patch(`/connections/${account_id}`, {
10428
+ body: { is_active }
10429
+ })),
10718
10430
  settings: {
10719
10431
  get: (account_id) => wrap(() => this.clients.media.get(`/connections/${account_id}/settings`)),
10720
- update: (account_id, settings) => wrap(() => this.clients.media.put(`/connections/${account_id}/settings`, { body: { settings } }))
10432
+ update: (account_id, settings) => wrap(() => this.clients.media.put(`/connections/${account_id}/settings`, {
10433
+ body: { settings }
10434
+ }))
10721
10435
  },
10722
10436
  repos: (account_id) => wrap(async () => {
10723
10437
  const res = await this.clients.media.get(`/connections/${account_id}/repos`);
@@ -10742,9 +10456,21 @@ var ApiClient2 = class {
10742
10456
  query.to = params.to;
10743
10457
  return this.clients.media.get(`/timeline/${user_id}`, Object.keys(query).length ? { query } : {});
10744
10458
  }),
10745
- getRaw: (user_id, platform, account_id) => wrap(() => this.clients.media.get(`/timeline/${user_id}/raw/${platform}`, { query: { account_id } }))
10459
+ getRaw: (user_id, platform, account_id) => wrap(() => this.clients.media.get(`/timeline/${user_id}/raw/${platform}`, {
10460
+ query: { account_id }
10461
+ }))
10746
10462
  }
10747
10463
  };
10464
+ this.activity = {
10465
+ ai: (options2) => wrap(() => {
10466
+ const query = {};
10467
+ if (options2?.limit)
10468
+ query.limit = String(options2.limit);
10469
+ if (options2?.since)
10470
+ query.since = options2.since;
10471
+ return this.clients.projects.get("/activity/ai", Object.keys(query).length ? { query } : {});
10472
+ })
10473
+ };
10748
10474
  this.user = {
10749
10475
  history: () => wrap(() => this.clients.auth.get("/user/history")),
10750
10476
  preferences: (data) => wrap(() => this.clients.auth.patch("/user/preferences", { body: data }))
@@ -10764,7 +10490,11 @@ var ApiClient2 = class {
10764
10490
  const auth_base_url = base_url.replace(/\/v1\/?$/, "");
10765
10491
  this.clients = {
10766
10492
  auth: new ApiClient({ ...clientOptions, category: "auth" }),
10767
- auth_root: new ApiClient({ ...clientOptions, base_url: auth_base_url, category: "auth" }),
10493
+ auth_root: new ApiClient({
10494
+ ...clientOptions,
10495
+ base_url: auth_base_url,
10496
+ category: "auth"
10497
+ }),
10768
10498
  projects: new ApiClient({ ...clientOptions, category: "projects" }),
10769
10499
  tasks: new ApiClient({ ...clientOptions, category: "tasks" }),
10770
10500
  milestones: new ApiClient({ ...clientOptions, category: "milestones" }),
@@ -10834,7 +10564,7 @@ var tools = {
10834
10564
  },
10835
10565
  devpad_projects_upsert: {
10836
10566
  name: "devpad_projects_upsert",
10837
- description: "Create or update a project (set deleted=true to delete)",
10567
+ description: "Create or update a project (set deleted=true to delete). Returns 409 if entity is protected by user - pass force=true to override.",
10838
10568
  inputSchema: upsert_project,
10839
10569
  execute: async (client, input) => unwrap2(await client.projects.upsert(input))
10840
10570
  },
@@ -10861,7 +10591,7 @@ var tools = {
10861
10591
  },
10862
10592
  devpad_tasks_upsert: {
10863
10593
  name: "devpad_tasks_upsert",
10864
- description: "Create or update a task (set deleted=true to delete)",
10594
+ description: "Create or update a task (set deleted=true to delete). Returns 409 if entity is protected by user - pass force=true to override.",
10865
10595
  inputSchema: upsert_todo,
10866
10596
  execute: async (client, input) => unwrap2(await client.tasks.upsert(input))
10867
10597
  },
@@ -10888,7 +10618,7 @@ var tools = {
10888
10618
  },
10889
10619
  devpad_milestones_upsert: {
10890
10620
  name: "devpad_milestones_upsert",
10891
- description: "Create or update a milestone",
10621
+ description: "Create or update a milestone. Returns 409 if entity is protected by user - pass force=true to override.",
10892
10622
  inputSchema: upsert_milestone,
10893
10623
  execute: async (client, input) => unwrap2(input.id ? await client.milestones.update(input.id, {
10894
10624
  name: input.name,
@@ -10917,7 +10647,7 @@ var tools = {
10917
10647
  },
10918
10648
  devpad_goals_upsert: {
10919
10649
  name: "devpad_goals_upsert",
10920
- description: "Create or update a goal",
10650
+ description: "Create or update a goal. Returns 409 if entity is protected by user - pass force=true to override.",
10921
10651
  inputSchema: upsert_goal,
10922
10652
  execute: async (client, input) => unwrap2(input.id ? await client.goals.update(input.id, {
10923
10653
  name: input.name,
@@ -10955,10 +10685,10 @@ var tools = {
10955
10685
  id: exports_external.string().describe("Project ID")
10956
10686
  }),
10957
10687
  execute: async (client, input) => {
10958
- const project2 = unwrap2(await client.projects.find(input.id));
10959
- if (!project2)
10688
+ const project = unwrap2(await client.projects.find(input.id));
10689
+ if (!project)
10960
10690
  throw new Error(`Project ${input.id} not found`);
10961
- unwrap2(await client.projects.deleteProject(project2));
10691
+ unwrap2(await client.projects.deleteProject(project));
10962
10692
  return { success: true };
10963
10693
  }
10964
10694
  },
@@ -11017,10 +10747,10 @@ var tools = {
11017
10747
  id: exports_external.string().describe("Task ID")
11018
10748
  }),
11019
10749
  execute: async (client, input) => {
11020
- const task2 = unwrap2(await client.tasks.find(input.id));
11021
- if (!task2)
10750
+ const task = unwrap2(await client.tasks.find(input.id));
10751
+ if (!task)
11022
10752
  throw new Error(`Task ${input.id} not found`);
11023
- unwrap2(await client.tasks.deleteTask(task2));
10753
+ unwrap2(await client.tasks.deleteTask(task));
11024
10754
  return { success: true };
11025
10755
  }
11026
10756
  },
@@ -11047,6 +10777,15 @@ var tools = {
11047
10777
  }),
11048
10778
  execute: async (client, input) => unwrap2(await client.user.preferences(input))
11049
10779
  },
10780
+ devpad_activity_ai: {
10781
+ name: "devpad_activity_ai",
10782
+ description: "Get AI activity feed - shows recent actions made via API/MCP grouped into sessions by time window",
10783
+ inputSchema: exports_external.object({
10784
+ limit: exports_external.number().optional().describe("Max sessions to return (default 20)"),
10785
+ since: exports_external.string().optional().describe("Only show activity after this ISO date")
10786
+ }),
10787
+ execute: async (client, input) => unwrap2(await client.activity.ai(input))
10788
+ },
11050
10789
  devpad_blog_posts_list: {
11051
10790
  name: "devpad_blog_posts_list",
11052
10791
  description: "List blog posts with optional filters",
@@ -11184,8 +10923,8 @@ var tools = {
11184
10923
  slug: exports_external.string().optional().describe("Profile slug")
11185
10924
  }),
11186
10925
  execute: async (client, input) => {
11187
- const { id: id2, ...data } = input;
11188
- return unwrap2(await client.media.profiles.update(id2, data));
10926
+ const { id, ...data } = input;
10927
+ return unwrap2(await client.media.profiles.update(id, data));
11189
10928
  }
11190
10929
  },
11191
10930
  devpad_media_profiles_delete: {
@@ -12811,7 +12550,7 @@ projects.command("create").description("Create a new project").requiredOption("-
12811
12550
  handleError(error);
12812
12551
  }
12813
12552
  });
12814
- projects.command("delete <id>").description("Delete a project").option("-y, --yes", "Skip confirmation", false).action(async (id2, options) => {
12553
+ projects.command("delete <id>").description("Delete a project").option("-y, --yes", "Skip confirmation", false).action(async (id, options) => {
12815
12554
  if (!options.yes) {
12816
12555
  console.log(source_default.yellow("Are you sure you want to delete this project? Use --yes to confirm"));
12817
12556
  return;
@@ -12822,21 +12561,21 @@ projects.command("delete <id>").description("Delete a project").option("-y, --ye
12822
12561
  if (!tool)
12823
12562
  throw new Error("Tool not found");
12824
12563
  const client = getApiClient();
12825
- await tool.execute(client, { id: id2 });
12564
+ await tool.execute(client, { id });
12826
12565
  spinner.succeed("Project deleted");
12827
12566
  } catch (error) {
12828
12567
  spinner.fail("Failed to delete project");
12829
12568
  handleError(error);
12830
12569
  }
12831
12570
  });
12832
- projects.command("history <id>").description("Get project history").option("-f, --format <format>", "Output format (json|table)", "json").action(async (id2, options) => {
12571
+ projects.command("history <id>").description("Get project history").option("-f, --format <format>", "Output format (json|table)", "json").action(async (id, options) => {
12833
12572
  const spinner = createSpinner("Fetching project history...").start();
12834
12573
  try {
12835
12574
  const tool = getTool("devpad_projects_history");
12836
12575
  if (!tool)
12837
12576
  throw new Error("Tool not found");
12838
12577
  const client = getApiClient();
12839
- const result = await tool.execute(client, { project_id: id2 });
12578
+ const result = await tool.execute(client, { project_id: id });
12840
12579
  spinner.succeed("Project history fetched");
12841
12580
  await formatOutput(result, options.format);
12842
12581
  } catch (error) {
@@ -12863,14 +12602,14 @@ tasks.command("list").description("List tasks").option("-p, --project <id>", "Fi
12863
12602
  handleError(error);
12864
12603
  }
12865
12604
  });
12866
- tasks.command("get <id>").description("Get a task by ID").option("-f, --format <format>", "Output format (json|table)", "json").action(async (id2, options) => {
12605
+ tasks.command("get <id>").description("Get a task by ID").option("-f, --format <format>", "Output format (json|table)", "json").action(async (id, options) => {
12867
12606
  const spinner = createSpinner("Fetching task...").start();
12868
12607
  try {
12869
12608
  const tool = getTool("devpad_tasks_get");
12870
12609
  if (!tool)
12871
12610
  throw new Error("Tool not found");
12872
12611
  const client = getApiClient();
12873
- const result = await tool.execute(client, { id: id2 });
12612
+ const result = await tool.execute(client, { id });
12874
12613
  spinner.succeed("Task fetched");
12875
12614
  await formatOutput(result, options.format);
12876
12615
  } catch (error) {
@@ -12899,7 +12638,7 @@ tasks.command("create").description("Create a new task").requiredOption("-t, --t
12899
12638
  handleError(error);
12900
12639
  }
12901
12640
  });
12902
- tasks.command("done <id>").description("Mark a task as done").action(async (id2) => {
12641
+ tasks.command("done <id>").description("Mark a task as done").action(async (id) => {
12903
12642
  const spinner = createSpinner("Marking task as done...").start();
12904
12643
  try {
12905
12644
  const tool = getTool("devpad_tasks_upsert");
@@ -12907,7 +12646,7 @@ tasks.command("done <id>").description("Mark a task as done").action(async (id2)
12907
12646
  throw new Error("Tool not found");
12908
12647
  const client = getApiClient();
12909
12648
  const result = await tool.execute(client, {
12910
- id: id2,
12649
+ id,
12911
12650
  progress: "DONE"
12912
12651
  });
12913
12652
  spinner.succeed(`Task "${result.title}" marked as done`);
@@ -12916,7 +12655,7 @@ tasks.command("done <id>").description("Mark a task as done").action(async (id2)
12916
12655
  handleError(error);
12917
12656
  }
12918
12657
  });
12919
- tasks.command("todo <id>").description("Mark a task as todo").action(async (id2) => {
12658
+ tasks.command("todo <id>").description("Mark a task as todo").action(async (id) => {
12920
12659
  const spinner = createSpinner("Marking task as todo...").start();
12921
12660
  try {
12922
12661
  const tool = getTool("devpad_tasks_upsert");
@@ -12924,7 +12663,7 @@ tasks.command("todo <id>").description("Mark a task as todo").action(async (id2)
12924
12663
  throw new Error("Tool not found");
12925
12664
  const client = getApiClient();
12926
12665
  const result = await tool.execute(client, {
12927
- id: id2,
12666
+ id,
12928
12667
  progress: "TODO"
12929
12668
  });
12930
12669
  spinner.succeed(`Task "${result.title}" marked as todo`);
@@ -12933,7 +12672,7 @@ tasks.command("todo <id>").description("Mark a task as todo").action(async (id2)
12933
12672
  handleError(error);
12934
12673
  }
12935
12674
  });
12936
- tasks.command("delete <id>").description("Delete a task").option("-y, --yes", "Skip confirmation", false).action(async (id2, options) => {
12675
+ tasks.command("delete <id>").description("Delete a task").option("-y, --yes", "Skip confirmation", false).action(async (id, options) => {
12937
12676
  if (!options.yes) {
12938
12677
  console.log(source_default.yellow("Are you sure you want to delete this task? Use --yes to confirm"));
12939
12678
  return;
@@ -12944,21 +12683,21 @@ tasks.command("delete <id>").description("Delete a task").option("-y, --yes", "S
12944
12683
  if (!tool)
12945
12684
  throw new Error("Tool not found");
12946
12685
  const client = getApiClient();
12947
- await tool.execute(client, { id: id2 });
12686
+ await tool.execute(client, { id });
12948
12687
  spinner.succeed("Task deleted");
12949
12688
  } catch (error) {
12950
12689
  spinner.fail("Failed to delete task");
12951
12690
  handleError(error);
12952
12691
  }
12953
12692
  });
12954
- tasks.command("history <id>").description("Get task history").option("-f, --format <format>", "Output format (json|table)", "json").action(async (id2, options) => {
12693
+ tasks.command("history <id>").description("Get task history").option("-f, --format <format>", "Output format (json|table)", "json").action(async (id, options) => {
12955
12694
  const spinner = createSpinner("Fetching task history...").start();
12956
12695
  try {
12957
12696
  const tool = getTool("devpad_tasks_history");
12958
12697
  if (!tool)
12959
12698
  throw new Error("Tool not found");
12960
12699
  const client = getApiClient();
12961
- const result = await tool.execute(client, { task_id: id2 });
12700
+ const result = await tool.execute(client, { task_id: id });
12962
12701
  spinner.succeed("Task history fetched");
12963
12702
  await formatOutput(result, options.format);
12964
12703
  } catch (error) {
@@ -13088,8 +12827,8 @@ github.command("branches <owner> <repo>").description("List branches for a GitHu
13088
12827
  handleError(error);
13089
12828
  }
13090
12829
  });
13091
- var user2 = program2.command("user").description("User preferences and history");
13092
- user2.command("history").description("Get user activity history").option("-f, --format <format>", "Output format (json|table)", "json").action(async (options) => {
12830
+ var user = program2.command("user").description("User preferences and history");
12831
+ user.command("history").description("Get user activity history").option("-f, --format <format>", "Output format (json|table)", "json").action(async (options) => {
13093
12832
  const spinner = createSpinner("Fetching user history...").start();
13094
12833
  try {
13095
12834
  const tool = getTool("devpad_user_history");
@@ -13104,7 +12843,7 @@ user2.command("history").description("Get user activity history").option("-f, --
13104
12843
  handleError(error);
13105
12844
  }
13106
12845
  });
13107
- user2.command("preferences").description("Update user preferences").requiredOption("-u, --user-id <id>", "User ID").requiredOption("-v, --view <view>", "Task view preference (list|grid)").action(async (options) => {
12846
+ user.command("preferences").description("Update user preferences").requiredOption("-u, --user-id <id>", "User ID").requiredOption("-v, --view <view>", "Task view preference (list|grid)").action(async (options) => {
13108
12847
  const spinner = createSpinner("Updating preferences...").start();
13109
12848
  try {
13110
12849
  const tool = getTool("devpad_user_preferences");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devpad/cli",
3
- "version": "2.0.2",
3
+ "version": "2.0.4",
4
4
  "description": "Command line interface for devpad project management",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -42,19 +42,18 @@
42
42
  "access": "public",
43
43
  "registry": "https://registry.npmjs.org/"
44
44
  },
45
- "dependencies": {
46
- "@devpad/api": "^2.0.2",
47
- "@devpad/schema": "^2.0.2",
48
- "commander": "^12.0.0",
49
- "chalk": "^5.3.0",
50
- "ora": "^8.0.1",
51
- "console-table-printer": "^2.12.1",
52
- "zod": "^3.22.4"
53
- },
45
+ "dependencies": {},
54
46
  "devDependencies": {
47
+ "@devpad/api": "^2.0.4",
48
+ "@devpad/schema": "^2.0.4",
55
49
  "@types/node": "^20.11.24",
56
50
  "bun-types": "latest",
57
- "typescript": "^5.9.2"
51
+ "chalk": "^5.3.0",
52
+ "commander": "^12.0.0",
53
+ "console-table-printer": "^2.12.1",
54
+ "ora": "^8.0.1",
55
+ "typescript": "^5.9.2",
56
+ "zod": "^3.22.4"
58
57
  },
59
58
  "engines": {
60
59
  "node": ">=18.0.0"