@devpad/mcp 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 +221 -482
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1423,8 +1423,8 @@ var require_resolve = __commonJS((exports, module) => {
1423
1423
  function resolveSchema(root, ref) {
1424
1424
  var p = URI.parse(ref), refPath = _getFullPath(p), baseId = getFullPath(this._getId(root.schema));
1425
1425
  if (Object.keys(root.schema).length === 0 || refPath !== baseId) {
1426
- var id2 = normalizeId(refPath);
1427
- var refVal = this._refs[id2];
1426
+ var id = normalizeId(refPath);
1427
+ var refVal = this._refs[id];
1428
1428
  if (typeof refVal == "string") {
1429
1429
  return resolveRecursive.call(this, root, refVal, p);
1430
1430
  } else if (refVal instanceof SchemaObject) {
@@ -1432,11 +1432,11 @@ var require_resolve = __commonJS((exports, module) => {
1432
1432
  this._compile(refVal);
1433
1433
  root = refVal;
1434
1434
  } else {
1435
- refVal = this._schemas[id2];
1435
+ refVal = this._schemas[id];
1436
1436
  if (refVal instanceof SchemaObject) {
1437
1437
  if (!refVal.validate)
1438
1438
  this._compile(refVal);
1439
- if (id2 == normalizeId(ref))
1439
+ if (id == normalizeId(ref))
1440
1440
  return { schema: refVal, root, baseId };
1441
1441
  root = refVal;
1442
1442
  } else {
@@ -1455,9 +1455,9 @@ var require_resolve = __commonJS((exports, module) => {
1455
1455
  var schema = res.schema;
1456
1456
  var baseId = res.baseId;
1457
1457
  root = res.root;
1458
- var id2 = this._getId(schema);
1459
- if (id2)
1460
- baseId = resolveUrl(baseId, id2);
1458
+ var id = this._getId(schema);
1459
+ if (id)
1460
+ baseId = resolveUrl(baseId, id);
1461
1461
  return getJsonPointer.call(this, parsedRef, baseId, schema, root);
1462
1462
  }
1463
1463
  }
@@ -1474,11 +1474,11 @@ var require_resolve = __commonJS((exports, module) => {
1474
1474
  schema = schema[part];
1475
1475
  if (schema === undefined)
1476
1476
  break;
1477
- var id2;
1477
+ var id;
1478
1478
  if (!PREVENT_SCOPE_CHANGE[part]) {
1479
- id2 = this._getId(schema);
1480
- if (id2)
1481
- baseId = resolveUrl(baseId, id2);
1479
+ id = this._getId(schema);
1480
+ if (id)
1481
+ baseId = resolveUrl(baseId, id);
1482
1482
  if (schema.$ref) {
1483
1483
  var $ref = resolveUrl(baseId, schema.$ref);
1484
1484
  var res = resolveSchema.call(this, root, $ref);
@@ -1565,22 +1565,22 @@ var require_resolve = __commonJS((exports, module) => {
1565
1565
  }
1566
1566
  return count;
1567
1567
  }
1568
- function getFullPath(id2, normalize) {
1568
+ function getFullPath(id, normalize) {
1569
1569
  if (normalize !== false)
1570
- id2 = normalizeId(id2);
1571
- var p = URI.parse(id2);
1570
+ id = normalizeId(id);
1571
+ var p = URI.parse(id);
1572
1572
  return _getFullPath(p);
1573
1573
  }
1574
1574
  function _getFullPath(p) {
1575
1575
  return URI.serialize(p).split("#")[0] + "#";
1576
1576
  }
1577
1577
  var TRAILING_SLASH_HASH = /#\/?$/;
1578
- function normalizeId(id2) {
1579
- return id2 ? id2.replace(TRAILING_SLASH_HASH, "") : "";
1578
+ function normalizeId(id) {
1579
+ return id ? id.replace(TRAILING_SLASH_HASH, "") : "";
1580
1580
  }
1581
- function resolveUrl(baseId, id2) {
1582
- id2 = normalizeId(id2);
1583
- return URI.resolve(baseId, id2);
1581
+ function resolveUrl(baseId, id) {
1582
+ id = normalizeId(id);
1583
+ return URI.resolve(baseId, id);
1584
1584
  }
1585
1585
  function resolveIds(schema) {
1586
1586
  var schemaId = normalizeId(this._getId(schema));
@@ -1591,26 +1591,26 @@ var require_resolve = __commonJS((exports, module) => {
1591
1591
  traverse(schema, { allKeys: true }, function(sch, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {
1592
1592
  if (jsonPtr === "")
1593
1593
  return;
1594
- var id2 = self._getId(sch);
1594
+ var id = self._getId(sch);
1595
1595
  var baseId = baseIds[parentJsonPtr];
1596
1596
  var fullPath = fullPaths[parentJsonPtr] + "/" + parentKeyword;
1597
1597
  if (keyIndex !== undefined)
1598
1598
  fullPath += "/" + (typeof keyIndex == "number" ? keyIndex : util3.escapeFragment(keyIndex));
1599
- if (typeof id2 == "string") {
1600
- id2 = baseId = normalizeId(baseId ? URI.resolve(baseId, id2) : id2);
1601
- var refVal = self._refs[id2];
1599
+ if (typeof id == "string") {
1600
+ id = baseId = normalizeId(baseId ? URI.resolve(baseId, id) : id);
1601
+ var refVal = self._refs[id];
1602
1602
  if (typeof refVal == "string")
1603
1603
  refVal = self._refs[refVal];
1604
1604
  if (refVal && refVal.schema) {
1605
1605
  if (!equal(sch, refVal.schema))
1606
- throw new Error('id "' + id2 + '" resolves to more than one schema');
1607
- } else if (id2 != normalizeId(fullPath)) {
1608
- if (id2[0] == "#") {
1609
- if (localRefs[id2] && !equal(sch, localRefs[id2]))
1610
- throw new Error('id "' + id2 + '" resolves to more than one schema');
1611
- localRefs[id2] = sch;
1606
+ throw new Error('id "' + id + '" resolves to more than one schema');
1607
+ } else if (id != normalizeId(fullPath)) {
1608
+ if (id[0] == "#") {
1609
+ if (localRefs[id] && !equal(sch, localRefs[id]))
1610
+ throw new Error('id "' + id + '" resolves to more than one schema');
1611
+ localRefs[id] = sch;
1612
1612
  } else {
1613
- self._refs[id2] = fullPath;
1613
+ self._refs[id] = fullPath;
1614
1614
  }
1615
1615
  }
1616
1616
  }
@@ -5907,10 +5907,10 @@ var require_ajv = __commonJS((exports, module) => {
5907
5907
  this.addSchema(schema[i], undefined, _skipValidation, _meta);
5908
5908
  return this;
5909
5909
  }
5910
- var id2 = this._getId(schema);
5911
- if (id2 !== undefined && typeof id2 != "string")
5910
+ var id = this._getId(schema);
5911
+ if (id !== undefined && typeof id != "string")
5912
5912
  throw new Error("schema id must be string");
5913
- key = resolve.normalizeId(key || id2);
5913
+ key = resolve.normalizeId(key || id);
5914
5914
  checkUnique(this, key);
5915
5915
  this._schemas[key] = this._addSchema(schema, _skipValidation, _meta, true);
5916
5916
  return this;
@@ -5998,11 +5998,11 @@ var require_ajv = __commonJS((exports, module) => {
5998
5998
  var serialize = this._opts.serialize;
5999
5999
  var cacheKey = serialize ? serialize(schemaKeyRef) : schemaKeyRef;
6000
6000
  this._cache.del(cacheKey);
6001
- var id2 = this._getId(schemaKeyRef);
6002
- if (id2) {
6003
- id2 = resolve.normalizeId(id2);
6004
- delete this._schemas[id2];
6005
- delete this._refs[id2];
6001
+ var id = this._getId(schemaKeyRef);
6002
+ if (id) {
6003
+ id = resolve.normalizeId(id);
6004
+ delete this._schemas[id];
6005
+ delete this._refs[id];
6006
6006
  }
6007
6007
  }
6008
6008
  return this;
@@ -6025,23 +6025,23 @@ var require_ajv = __commonJS((exports, module) => {
6025
6025
  if (cached)
6026
6026
  return cached;
6027
6027
  shouldAddSchema = shouldAddSchema || this._opts.addUsedSchema !== false;
6028
- var id2 = resolve.normalizeId(this._getId(schema));
6029
- if (id2 && shouldAddSchema)
6030
- checkUnique(this, id2);
6028
+ var id = resolve.normalizeId(this._getId(schema));
6029
+ if (id && shouldAddSchema)
6030
+ checkUnique(this, id);
6031
6031
  var willValidate = this._opts.validateSchema !== false && !skipValidation;
6032
6032
  var recursiveMeta;
6033
- if (willValidate && !(recursiveMeta = id2 && id2 == resolve.normalizeId(schema.$schema)))
6033
+ if (willValidate && !(recursiveMeta = id && id == resolve.normalizeId(schema.$schema)))
6034
6034
  this.validateSchema(schema, true);
6035
6035
  var localRefs = resolve.ids.call(this, schema);
6036
6036
  var schemaObj = new SchemaObject({
6037
- id: id2,
6037
+ id,
6038
6038
  schema,
6039
6039
  localRefs,
6040
6040
  cacheKey,
6041
6041
  meta
6042
6042
  });
6043
- if (id2[0] != "#" && shouldAddSchema)
6044
- this._refs[id2] = schemaObj;
6043
+ if (id[0] != "#" && shouldAddSchema)
6044
+ this._refs[id] = schemaObj;
6045
6045
  this._cache.put(cacheKey, schemaObj);
6046
6046
  if (willValidate && recursiveMeta)
6047
6047
  this.validateSchema(schema, true);
@@ -6168,9 +6168,9 @@ var require_ajv = __commonJS((exports, module) => {
6168
6168
  self.addKeyword(name, keyword);
6169
6169
  }
6170
6170
  }
6171
- function checkUnique(self, id2) {
6172
- if (self._schemas[id2] || self._refs[id2])
6173
- throw new Error('schema with key or id "' + id2 + '" already exists');
6171
+ function checkUnique(self, id) {
6172
+ if (self._schemas[id] || self._refs[id])
6173
+ throw new Error('schema with key or id "' + id + '" already exists');
6174
6174
  }
6175
6175
  function getMetaSchemaOptions(self) {
6176
6176
  var metaOpts = util3.copy(self._opts);
@@ -10166,7 +10166,7 @@ var coerce = {
10166
10166
  date: (arg) => ZodDate.create({ ...arg, coerce: true })
10167
10167
  };
10168
10168
  var NEVER = INVALID;
10169
- // ../api/dist/chunk-WTGVONUB.js
10169
+ // ../api/dist/chunk-XGQQPYSB.js
10170
10170
  var ArrayBufferedQueue = class {
10171
10171
  constructor(_capacity) {
10172
10172
  this._capacity = _capacity;
@@ -10222,7 +10222,8 @@ var upsert_project = exports_external.object({
10222
10222
  link_url: exports_external.string().nullable(),
10223
10223
  link_text: exports_external.string().nullable(),
10224
10224
  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(),
10225
- current_version: exports_external.string().nullable()
10225
+ current_version: exports_external.string().nullable(),
10226
+ force: exports_external.boolean().optional().describe("Override protection on user-modified entities")
10226
10227
  });
10227
10228
  var upsert_todo = exports_external.object({
10228
10229
  id: exports_external.string().optional().nullable(),
@@ -10236,7 +10237,8 @@ var upsert_todo = exports_external.object({
10236
10237
  priority: exports_external.union([exports_external.literal("LOW"), exports_external.literal("MEDIUM"), exports_external.literal("HIGH")]).optional(),
10237
10238
  owner_id: exports_external.string(),
10238
10239
  project_id: exports_external.string().optional().nullable(),
10239
- goal_id: exports_external.string().optional().nullable()
10240
+ goal_id: exports_external.string().optional().nullable(),
10241
+ force: exports_external.boolean().optional().describe("Override protection on user-modified entities")
10240
10242
  });
10241
10243
  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")]);
10242
10244
  var ConfigSchema = exports_external.object({
@@ -10289,7 +10291,8 @@ var upsert_milestone = exports_external.object({
10289
10291
  target_time: exports_external.string().nullable().optional(),
10290
10292
  target_version: exports_external.string().nullable().optional(),
10291
10293
  finished_at: exports_external.string().nullable().optional(),
10292
- after_id: exports_external.string().nullable().optional()
10294
+ after_id: exports_external.string().nullable().optional(),
10295
+ force: exports_external.boolean().optional().describe("Override protection on user-modified entities")
10293
10296
  });
10294
10297
  var upsert_goal = exports_external.object({
10295
10298
  id: exports_external.string().optional().nullable(),
@@ -10297,7 +10300,8 @@ var upsert_goal = exports_external.object({
10297
10300
  name: exports_external.string().min(1).max(200),
10298
10301
  description: exports_external.string().nullable().optional(),
10299
10302
  target_time: exports_external.string().nullable().optional(),
10300
- finished_at: exports_external.string().nullable().optional()
10303
+ finished_at: exports_external.string().nullable().optional(),
10304
+ force: exports_external.boolean().optional().describe("Override protection on user-modified entities")
10301
10305
  });
10302
10306
 
10303
10307
  // ../../node_modules/@f0rbit/corpus/dist/types.js
@@ -11124,46 +11128,6 @@ class ForeignKey {
11124
11128
  function uniqueKeyName2(table, columns) {
11125
11129
  return `${table[TableName]}_${columns.join("_")}_unique`;
11126
11130
  }
11127
- function unique(name) {
11128
- return new UniqueOnConstraintBuilder(name);
11129
- }
11130
-
11131
- class UniqueConstraintBuilder {
11132
- constructor(columns, name) {
11133
- this.name = name;
11134
- this.columns = columns;
11135
- }
11136
- static [entityKind] = "SQLiteUniqueConstraintBuilder";
11137
- columns;
11138
- build(table) {
11139
- return new UniqueConstraint(table, this.columns, this.name);
11140
- }
11141
- }
11142
-
11143
- class UniqueOnConstraintBuilder {
11144
- static [entityKind] = "SQLiteUniqueOnConstraintBuilder";
11145
- name;
11146
- constructor(name) {
11147
- this.name = name;
11148
- }
11149
- on(...columns) {
11150
- return new UniqueConstraintBuilder(columns, this.name);
11151
- }
11152
- }
11153
-
11154
- class UniqueConstraint {
11155
- constructor(table, columns, name) {
11156
- this.table = table;
11157
- this.columns = columns;
11158
- this.name = name ?? uniqueKeyName2(this.table, this.columns.map((column) => column.name));
11159
- }
11160
- static [entityKind] = "SQLiteUniqueConstraint";
11161
- columns;
11162
- name;
11163
- getName() {
11164
- return this.name;
11165
- }
11166
- }
11167
11131
 
11168
11132
  // ../../node_modules/drizzle-orm/sqlite-core/columns/common.js
11169
11133
  class SQLiteColumnBuilder extends ColumnBuilder {
@@ -11446,7 +11410,6 @@ function integer(a, b) {
11446
11410
  }
11447
11411
  return new SQLiteIntegerBuilder(name);
11448
11412
  }
11449
- var int = integer;
11450
11413
 
11451
11414
  // ../../node_modules/drizzle-orm/sqlite-core/columns/numeric.js
11452
11415
  class SQLiteNumericBuilder extends SQLiteColumnBuilder {
@@ -11642,9 +11605,9 @@ var sqliteTable = (name, columns, extraConfig) => {
11642
11605
 
11643
11606
  // ../../node_modules/drizzle-orm/sqlite-core/indexes.js
11644
11607
  class IndexBuilderOn {
11645
- constructor(name, unique2) {
11608
+ constructor(name, unique) {
11646
11609
  this.name = name;
11647
- this.unique = unique2;
11610
+ this.unique = unique;
11648
11611
  }
11649
11612
  static [entityKind] = "SQLiteIndexBuilderOn";
11650
11613
  on(...columns) {
@@ -11655,11 +11618,11 @@ class IndexBuilderOn {
11655
11618
  class IndexBuilder {
11656
11619
  static [entityKind] = "SQLiteIndexBuilder";
11657
11620
  config;
11658
- constructor(name, columns, unique2) {
11621
+ constructor(name, columns, unique) {
11659
11622
  this.config = {
11660
11623
  name,
11661
11624
  columns,
11662
- unique: unique2,
11625
+ unique,
11663
11626
  where: undefined
11664
11627
  };
11665
11628
  }
@@ -11718,21 +11681,6 @@ class PrimaryKey {
11718
11681
  }
11719
11682
  }
11720
11683
 
11721
- // ../../node_modules/drizzle-orm/relations.js
11722
- class Relations {
11723
- constructor(table, config) {
11724
- this.table = table;
11725
- this.config = config;
11726
- }
11727
- static [entityKind] = "Relations";
11728
- }
11729
- function relations(table, relations2) {
11730
- return new Relations(table, (helpers) => Object.fromEntries(Object.entries(relations2(helpers)).map(([key, value]) => [
11731
- key,
11732
- value.withFieldName(key)
11733
- ])));
11734
- }
11735
-
11736
11684
  // ../../node_modules/@f0rbit/corpus/dist/observations/schema.js
11737
11685
  var corpus_observations = sqliteTable("corpus_observations", {
11738
11686
  id: text("id").primaryKey(),
@@ -11791,275 +11739,6 @@ var corpus_snapshots = sqliteTable("corpus_snapshots", {
11791
11739
  hash_idx: index("idx_content_hash").on(table.store_id, table.content_hash),
11792
11740
  data_key_idx: index("idx_data_key").on(table.data_key)
11793
11741
  }));
11794
- // ../api/dist/chunk-FOO5XXY5.js
11795
- var timestamps = () => ({
11796
- created_at: text("created_at").notNull().default(sql`(CURRENT_TIMESTAMP)`),
11797
- updated_at: text("updated_at").notNull().default(sql`(CURRENT_TIMESTAMP)`)
11798
- });
11799
- var deleted = () => ({
11800
- deleted: int("deleted", { mode: "boolean" }).notNull().default(false)
11801
- });
11802
- var owner_id = () => ({
11803
- owner_id: text("owner_id").notNull().references(() => user.id)
11804
- });
11805
- var id = (prefix) => ({
11806
- id: text("id").primaryKey().$defaultFn(() => `${prefix}_${crypto.randomUUID()}`)
11807
- });
11808
- var entity = (prefix) => ({
11809
- ...id(prefix),
11810
- ...timestamps(),
11811
- ...deleted()
11812
- });
11813
- var owned_entity = (prefix) => ({
11814
- ...entity(prefix),
11815
- ...owner_id()
11816
- });
11817
- var user = sqliteTable("user", {
11818
- id: text("id").primaryKey().$defaultFn(() => `user_${crypto.randomUUID()}`),
11819
- github_id: integer("github_id"),
11820
- name: text("name"),
11821
- email: text("email").unique(),
11822
- email_verified: text("email_verified"),
11823
- image_url: text("image_url"),
11824
- task_view: text("task_view", { enum: ["list", "grid"] }).notNull().default("list")
11825
- });
11826
- var session = sqliteTable("session", {
11827
- id: text("id").notNull().primaryKey(),
11828
- userId: text("user_id").notNull().references(() => user.id),
11829
- expiresAt: integer("expires_at").notNull(),
11830
- access_token: text("access_token")
11831
- });
11832
- var api_keys = sqliteTable("api_keys", {
11833
- ...id("apikey"),
11834
- user_id: text("user_id").notNull().references(() => user.id),
11835
- key_hash: text("key_hash").notNull().unique(),
11836
- name: text("name"),
11837
- note: text("note"),
11838
- scope: text("scope", { enum: ["devpad", "blog", "media", "all"] }).notNull().default("all"),
11839
- enabled: integer("enabled", { mode: "boolean" }).notNull().default(true),
11840
- last_used_at: text("last_used_at"),
11841
- ...timestamps(),
11842
- deleted: integer("deleted", { mode: "boolean" }).notNull().default(false)
11843
- });
11844
- var project = sqliteTable("project", {
11845
- ...owned_entity("project"),
11846
- project_id: text("project_id").notNull(),
11847
- name: text("name").notNull(),
11848
- description: text("description"),
11849
- specification: text("specification"),
11850
- repo_url: text("repo_url"),
11851
- repo_id: integer("repo_id"),
11852
- icon_url: text("icon_url"),
11853
- status: text("status", { enum: ["DEVELOPMENT", "PAUSED", "RELEASED", "LIVE", "FINISHED", "ABANDONED", "STOPPED"] }).notNull().default("DEVELOPMENT"),
11854
- link_url: text("link_url"),
11855
- link_text: text("link_text"),
11856
- visibility: text("visibility", { enum: ["PUBLIC", "PRIVATE", "HIDDEN", "ARCHIVED", "DRAFT", "DELETED"] }).notNull().default("PRIVATE"),
11857
- current_version: text("current_version"),
11858
- scan_branch: text("scan_branch")
11859
- });
11860
- var ACTIONS = [
11861
- "CREATE_TASK",
11862
- "UPDATE_TASK",
11863
- "DELETE_TASK",
11864
- "CREATE_PROJECT",
11865
- "UPDATE_PROJECT",
11866
- "DELETE_PROJECT",
11867
- "CREATE_TAG",
11868
- "UPDATE_TAG",
11869
- "DELETE_TAG",
11870
- "CREATE_GOAL",
11871
- "UPDATE_GOAL",
11872
- "DELETE_GOAL",
11873
- "CREATE_MILESTONE",
11874
- "UPDATE_MILESTONE",
11875
- "DELETE_MILESTONE",
11876
- "CREATE_CHECKLIST",
11877
- "UPDATE_CHECKLIST",
11878
- "DELETE_CHECKLIST"
11879
- ];
11880
- var action = sqliteTable("action", {
11881
- ...owned_entity("action"),
11882
- type: text("type", { enum: ACTIONS }).notNull(),
11883
- description: text("description").notNull(),
11884
- data: text("data", { mode: "json" })
11885
- });
11886
- var tracker_result = sqliteTable("tracker_result", {
11887
- id: integer("id").primaryKey({ autoIncrement: true }),
11888
- project_id: text("project_id").notNull().references(() => project.id),
11889
- created_at: text("created_at").notNull().default(sql`(CURRENT_TIMESTAMP)`),
11890
- data: text("data", { mode: "json" }).notNull(),
11891
- accepted: integer("accepted", { mode: "boolean" }).notNull().default(false)
11892
- });
11893
- var todo_updates = sqliteTable("todo_updates", {
11894
- id: integer("id").primaryKey({ autoIncrement: true }),
11895
- project_id: text("project_id").notNull().references(() => project.id),
11896
- created_at: text("created_at").notNull().default(sql`(CURRENT_TIMESTAMP)`),
11897
- old_id: integer("old_id").references(() => tracker_result.id),
11898
- new_id: integer("new_id").notNull().references(() => tracker_result.id),
11899
- data: text("data", { mode: "json" }).notNull(),
11900
- status: text("status", { enum: ["PENDING", "ACCEPTED", "REJECTED", "IGNORED"] }).notNull().default("PENDING"),
11901
- branch: text("branch"),
11902
- commit_sha: text("commit_sha"),
11903
- commit_msg: text("commit_msg"),
11904
- commit_url: text("commit_url")
11905
- });
11906
- var update_tracker_relations = relations(todo_updates, ({ one }) => ({
11907
- old: one(tracker_result, { fields: [todo_updates.old_id], references: [tracker_result.id] }),
11908
- new: one(tracker_result, { fields: [todo_updates.new_id], references: [tracker_result.id] })
11909
- }));
11910
- var milestone = sqliteTable("milestone", {
11911
- ...entity("milestone"),
11912
- project_id: text("project_id").notNull().references(() => project.id),
11913
- name: text("name").notNull(),
11914
- description: text("description"),
11915
- target_time: text("target_time"),
11916
- target_version: text("target_version"),
11917
- finished_at: text("finished_at"),
11918
- after_id: text("after_id")
11919
- });
11920
- var goal = sqliteTable("goal", {
11921
- ...entity("goal"),
11922
- milestone_id: text("milestone_id").notNull().references(() => milestone.id),
11923
- name: text("name").notNull(),
11924
- description: text("description"),
11925
- target_time: text("target_time"),
11926
- finished_at: text("finished_at")
11927
- });
11928
- var task = sqliteTable("task", {
11929
- ...owned_entity("task"),
11930
- title: text("title").notNull(),
11931
- progress: text("progress", { enum: ["UNSTARTED", "IN_PROGRESS", "COMPLETED"] }).notNull().default("UNSTARTED"),
11932
- visibility: text("visibility", { enum: ["PUBLIC", "PRIVATE", "HIDDEN", "ARCHIVED", "DRAFT", "DELETED"] }).notNull().default("PRIVATE"),
11933
- goal_id: text("goal_id").references(() => goal.id),
11934
- project_id: text("project_id").references(() => project.id),
11935
- description: text("description"),
11936
- start_time: text("start_time"),
11937
- end_time: text("end_time"),
11938
- summary: text("summary"),
11939
- codebase_task_id: text("codebase_task_id").references(() => codebase_tasks.id),
11940
- priority: text("priority", { enum: ["LOW", "MEDIUM", "HIGH"] }).notNull().default("LOW")
11941
- });
11942
- var checklist = sqliteTable("checklist", {
11943
- ...entity("checklist"),
11944
- task_id: text("task_id").notNull().references(() => task.id),
11945
- name: text("name").notNull()
11946
- });
11947
- var checklist_item = sqliteTable("checklist_item", {
11948
- ...entity("checklist-item"),
11949
- checklist_id: text("checklist_id").notNull().references(() => checklist.id),
11950
- parent_id: text("parent_id"),
11951
- name: text("name").notNull(),
11952
- checked: int("checked", { mode: "boolean" }).notNull().default(false)
11953
- });
11954
- var codebase_tasks = sqliteTable("codebase_tasks", {
11955
- ...entity("codebase-task"),
11956
- branch: text("branch"),
11957
- commit_sha: text("commit_sha"),
11958
- commit_msg: text("commit_msg"),
11959
- commit_url: text("commit_url"),
11960
- type: text("type"),
11961
- text: text("text"),
11962
- file: text("file"),
11963
- line: integer("line"),
11964
- context: text("context", { mode: "json" }),
11965
- recent_scan_id: integer("recent_scan_id").references(() => tracker_result.id)
11966
- });
11967
- var tag = sqliteTable("tag", {
11968
- ...owned_entity("tag"),
11969
- title: text("title").notNull(),
11970
- color: text("color"),
11971
- render: int("render", { mode: "boolean" }).notNull().default(true)
11972
- }, (table) => ({
11973
- tag_unique: unique("tag_unique").on(table.owner_id, table.title)
11974
- }));
11975
- var task_tag = sqliteTable("task_tag", {
11976
- task_id: text("task_id").notNull().references(() => task.id),
11977
- tag_id: text("tag_id").notNull().references(() => tag.id),
11978
- ...timestamps()
11979
- }, (table) => ({
11980
- task_tag_unique: primaryKey({ columns: [table.task_id, table.tag_id] })
11981
- }));
11982
- var commit_detail = sqliteTable("commit_detail", {
11983
- sha: text("sha").primaryKey(),
11984
- message: text("message").notNull(),
11985
- url: text("url").notNull(),
11986
- avatar_url: text("avatar_url"),
11987
- author_user: text("author_user").notNull(),
11988
- author_name: text("author_name"),
11989
- author_email: text("author_email").notNull(),
11990
- date: text("date").notNull()
11991
- });
11992
- var tag_config = sqliteTable("tag_config", {
11993
- ...id("tag_config"),
11994
- project_id: text("project_id").notNull().references(() => project.id),
11995
- tag_id: text("tag_id").notNull().references(() => tag.id),
11996
- match: text("match").notNull(),
11997
- ...timestamps()
11998
- });
11999
- var ignore_path = sqliteTable("ignore_path", {
12000
- ...id("ignore_path"),
12001
- project_id: text("project_id").notNull().references(() => project.id),
12002
- path: text("path").notNull(),
12003
- ...timestamps()
12004
- });
12005
- var user_relations = relations(user, ({ many }) => ({
12006
- sessions: many(session),
12007
- api_keys: many(api_keys),
12008
- actions: many(action),
12009
- tasks: many(task),
12010
- tags: many(tag)
12011
- }));
12012
- var session_relations = relations(session, ({ one }) => ({
12013
- user: one(user, { fields: [session.userId], references: [user.id] })
12014
- }));
12015
- var api_keys_relations = relations(api_keys, ({ one }) => ({
12016
- owner: one(user, { fields: [api_keys.user_id], references: [user.id] })
12017
- }));
12018
- var project_relations = relations(project, ({ one, many }) => ({
12019
- owner: one(user, { fields: [project.owner_id], references: [user.id] }),
12020
- tracker_results: many(tracker_result),
12021
- milestones: many(milestone),
12022
- todo_updates: many(todo_updates)
12023
- }));
12024
- var action_relations = relations(action, ({ one }) => ({
12025
- owner: one(user, { fields: [action.owner_id], references: [user.id] })
12026
- }));
12027
- var tracker_result_relations = relations(tracker_result, ({ one }) => ({
12028
- project: one(project, { fields: [tracker_result.project_id], references: [project.id] })
12029
- }));
12030
- var todoUpdatesRelations = relations(todo_updates, ({ one }) => ({
12031
- project: one(project, { fields: [todo_updates.project_id], references: [project.id] }),
12032
- oldTrackerResult: one(tracker_result, { fields: [todo_updates.old_id], references: [tracker_result.id] }),
12033
- newTrackerResult: one(tracker_result, { fields: [todo_updates.new_id], references: [tracker_result.id] })
12034
- }));
12035
- var milestone_relations = relations(milestone, ({ one, many }) => ({
12036
- project: one(project, { fields: [milestone.project_id], references: [project.id] }),
12037
- goals: many(goal)
12038
- }));
12039
- var goal_relations = relations(goal, ({ one }) => ({
12040
- milestone: one(milestone, { fields: [goal.milestone_id], references: [milestone.id] })
12041
- }));
12042
- var task_relations = relations(task, ({ one, many }) => ({
12043
- owner: one(user, { fields: [task.owner_id], references: [user.id] }),
12044
- goal: one(goal, { fields: [task.goal_id], references: [goal.id] }),
12045
- codebase_task: one(codebase_tasks, { fields: [task.codebase_task_id], references: [codebase_tasks.id] }),
12046
- checklists: many(checklist)
12047
- }));
12048
- var checklist_relations = relations(checklist, ({ one, many }) => ({
12049
- task: one(task, { fields: [checklist.task_id], references: [task.id] }),
12050
- items: many(checklist_item)
12051
- }));
12052
- var checklist_item_relations = relations(checklist_item, ({ one }) => ({
12053
- checklist: one(checklist, { fields: [checklist_item.checklist_id], references: [checklist.id] })
12054
- }));
12055
- var tag_relations = relations(tag, ({ one }) => ({
12056
- owner: one(user, { fields: [tag.owner_id], references: [user.id] })
12057
- }));
12058
- var task_tag_relations = relations(task_tag, ({ one }) => ({
12059
- task: one(task, { fields: [task_tag.task_id], references: [task.id] }),
12060
- tag: one(tag, { fields: [task_tag.tag_id], references: [tag.id] })
12061
- }));
12062
-
12063
11742
  // ../api/dist/index.js
12064
11743
  var ApiError = class _ApiError extends Error {
12065
11744
  constructor(message, options = {}) {
@@ -12320,7 +11999,9 @@ var ApiClient2 = class {
12320
11999
  session: () => wrap(() => this.clients.auth_root.get("/auth/session")),
12321
12000
  keys: {
12322
12001
  list: () => wrap(() => this.clients.auth.get("/keys")),
12323
- create: (name) => wrap(() => this.clients.auth.post("/keys", { body: name ? { name } : {} })),
12002
+ create: (name) => wrap(() => this.clients.auth.post("/keys", {
12003
+ body: name ? { name } : {}
12004
+ })),
12324
12005
  revoke: (key_id) => wrap(() => this.clients.auth.delete(`/keys/${key_id}`)),
12325
12006
  remove: (key_id) => wrap(() => this.clients.auth.delete(`/keys/${key_id}`))
12326
12007
  }
@@ -12331,52 +12012,60 @@ var ApiClient2 = class {
12331
12012
  const result = await this.projects.list(filters);
12332
12013
  if (!result.ok)
12333
12014
  throw new Error(result.error.message);
12334
- return result.value.reduce((acc, project2) => {
12335
- acc[project2.id] = project2;
12015
+ return result.value.reduce((acc, project) => {
12016
+ acc[project.id] = project;
12336
12017
  return acc;
12337
12018
  }, {});
12338
12019
  }),
12339
- find: (id2) => wrap(() => this.clients.projects.get("/projects", { query: { id: id2 } })),
12020
+ find: (id) => wrap(() => this.clients.projects.get("/projects", { query: { id } })),
12340
12021
  getByName: (name) => wrap(() => this.clients.projects.get("/projects", { query: { name } })),
12341
- getById: (id2) => wrap(() => this.clients.projects.get("/projects", { query: { id: id2 } })),
12022
+ getById: (id) => wrap(() => this.clients.projects.get("/projects", { query: { id } })),
12342
12023
  create: (data) => wrap(() => this.clients.projects.patch("/projects", { body: data })),
12343
12024
  update: async (idOrData, changes) => wrap(async () => {
12344
12025
  if (typeof idOrData === "object" && idOrData.id) {
12345
- return this.clients.projects.patch("/projects", { body: idOrData });
12026
+ return this.clients.projects.patch("/projects", {
12027
+ body: idOrData
12028
+ });
12346
12029
  }
12347
- const id2 = idOrData;
12030
+ const id = idOrData;
12348
12031
  if (!changes) {
12349
12032
  throw new Error("Changes parameter required for update");
12350
12033
  }
12351
- const result = await this.projects.find(id2);
12034
+ const result = await this.projects.find(id);
12352
12035
  if (!result.ok)
12353
12036
  throw new Error(result.error.message);
12354
12037
  if (!result.value)
12355
- throw new Error(`Project with id ${id2} not found`);
12356
- const project2 = result.value;
12038
+ throw new Error(`Project with id ${id} not found`);
12039
+ const project = result.value;
12357
12040
  const updateData = {
12358
- id: project2.id,
12359
- project_id: project2.project_id,
12360
- owner_id: project2.owner_id,
12361
- name: project2.name,
12362
- description: project2.description,
12363
- specification: project2.specification,
12364
- repo_url: project2.repo_url,
12365
- repo_id: project2.repo_id,
12366
- icon_url: project2.icon_url,
12367
- status: project2.status,
12368
- deleted: project2.deleted,
12369
- link_url: project2.link_url,
12370
- link_text: project2.link_text,
12371
- visibility: project2.visibility,
12372
- current_version: project2.current_version,
12041
+ id: project.id,
12042
+ project_id: project.project_id,
12043
+ owner_id: project.owner_id,
12044
+ name: project.name,
12045
+ description: project.description,
12046
+ specification: project.specification,
12047
+ repo_url: project.repo_url,
12048
+ repo_id: project.repo_id,
12049
+ icon_url: project.icon_url,
12050
+ status: project.status,
12051
+ deleted: project.deleted,
12052
+ link_url: project.link_url,
12053
+ link_text: project.link_text,
12054
+ visibility: project.visibility,
12055
+ current_version: project.current_version,
12373
12056
  ...changes
12374
12057
  };
12375
- return this.clients.projects.patch("/projects", { body: updateData });
12058
+ return this.clients.projects.patch("/projects", {
12059
+ body: updateData
12060
+ });
12376
12061
  }),
12377
12062
  config: {
12378
- load: (project_id) => wrap(() => this.clients.projects.get("/projects/config", { query: { project_id } })),
12379
- save: (request) => wrap(() => this.clients.projects.patch("/projects/save_config", { body: request }))
12063
+ load: (project_id) => wrap(() => this.clients.projects.get("/projects/config", {
12064
+ query: { project_id }
12065
+ })),
12066
+ save: (request) => wrap(() => this.clients.projects.patch("/projects/save_config", {
12067
+ body: request
12068
+ }))
12380
12069
  },
12381
12070
  scan: {
12382
12071
  initiate: async (project_id) => {
@@ -12391,65 +12080,76 @@ var ApiClient2 = class {
12391
12080
  return stream;
12392
12081
  },
12393
12082
  updates: (project_id) => wrap(() => this.clients.projects.get("/projects/updates", { query: { project_id } }).then((response) => response.updates)),
12394
- update: (project_id, data) => wrap(() => this.clients.projects.post("/projects/scan_status", { query: { project_id }, body: data }))
12083
+ update: (project_id, data) => wrap(() => this.clients.projects.post("/projects/scan_status", {
12084
+ query: { project_id },
12085
+ body: data
12086
+ }))
12395
12087
  },
12396
12088
  history: (project_id) => wrap(() => this.clients.projects.get(`/projects/${project_id}/history`)),
12397
12089
  upsert: (data) => wrap(() => this.clients.projects.patch("/projects", { body: data })),
12398
- specification: (project_id) => wrap(() => this.clients.projects.get("/projects/fetch_spec", { query: { project_id } })),
12399
- deleteProject: (project2) => wrap(() => this.clients.projects.patch("/projects", { body: { ...project2, deleted: true } }))
12090
+ specification: (project_id) => wrap(() => this.clients.projects.get("/projects/fetch_spec", {
12091
+ query: { project_id }
12092
+ })),
12093
+ deleteProject: (project) => wrap(() => this.clients.projects.patch("/projects", {
12094
+ body: { ...project, deleted: true }
12095
+ }))
12400
12096
  };
12401
12097
  this.milestones = {
12402
12098
  list: () => wrap(() => this.clients.milestones.get("/milestones")),
12403
12099
  getByProject: (project_id) => wrap(() => this.clients.milestones.get(`/projects/${project_id}/milestones`)),
12404
- find: (id2) => wrap(async () => {
12100
+ find: (id) => wrap(async () => {
12405
12101
  try {
12406
- return await this.clients.milestones.get(`/milestones/${id2}`);
12102
+ return await this.clients.milestones.get(`/milestones/${id}`);
12407
12103
  } catch (error) {
12408
12104
  return null;
12409
12105
  }
12410
12106
  }),
12411
12107
  create: (data) => wrap(() => this.clients.milestones.post("/milestones", { body: data })),
12412
- update: async (id2, data) => wrap(async () => {
12413
- const result = await this.milestones.find(id2);
12108
+ update: async (id, data) => wrap(async () => {
12109
+ const result = await this.milestones.find(id);
12414
12110
  if (!result.ok)
12415
12111
  throw new Error(result.error.message);
12416
12112
  if (!result.value)
12417
- throw new Error(`Milestone with id ${id2} not found`);
12418
- const milestone2 = result.value;
12113
+ throw new Error(`Milestone with id ${id} not found`);
12114
+ const milestone = result.value;
12419
12115
  const updateData = {
12420
- id: milestone2.id,
12421
- project_id: milestone2.project_id,
12422
- name: data.name ?? milestone2.name,
12423
- description: data.description ?? milestone2.description,
12424
- target_time: data.target_time ?? milestone2.target_time,
12425
- target_version: data.target_version ?? milestone2.target_version
12116
+ id: milestone.id,
12117
+ project_id: milestone.project_id,
12118
+ name: data.name ?? milestone.name,
12119
+ description: data.description ?? milestone.description,
12120
+ target_time: data.target_time ?? milestone.target_time,
12121
+ target_version: data.target_version ?? milestone.target_version
12426
12122
  };
12427
- return this.clients.milestones.patch(`/milestones/${id2}`, { body: updateData });
12123
+ return this.clients.milestones.patch(`/milestones/${id}`, {
12124
+ body: updateData
12125
+ });
12428
12126
  }),
12429
- delete: (id2) => wrap(() => this.clients.milestones.delete(`/milestones/${id2}`)),
12430
- goals: (id2) => wrap(() => this.clients.milestones.get(`/milestones/${id2}/goals`))
12127
+ delete: (id) => wrap(() => this.clients.milestones.delete(`/milestones/${id}`)),
12128
+ goals: (id) => wrap(() => this.clients.milestones.get(`/milestones/${id}/goals`))
12431
12129
  };
12432
12130
  this.goals = {
12433
12131
  list: () => wrap(() => this.clients.goals.get("/goals")),
12434
- find: (id2) => wrap(() => this.clients.goals.get(`/goals/${id2}`)),
12132
+ find: (id) => wrap(() => this.clients.goals.get(`/goals/${id}`)),
12435
12133
  create: (data) => wrap(() => this.clients.goals.post("/goals", { body: data })),
12436
- update: async (id2, data) => wrap(async () => {
12437
- const result = await this.goals.find(id2);
12134
+ update: async (id, data) => wrap(async () => {
12135
+ const result = await this.goals.find(id);
12438
12136
  if (!result.ok)
12439
12137
  throw new Error(result.error.message);
12440
12138
  if (!result.value)
12441
- throw new Error(`Goal with id ${id2} not found`);
12442
- const goal2 = result.value;
12139
+ throw new Error(`Goal with id ${id} not found`);
12140
+ const goal = result.value;
12443
12141
  const updateData = {
12444
- id: goal2.id,
12445
- milestone_id: goal2.milestone_id,
12446
- name: data.name ?? goal2.name,
12447
- description: data.description ?? goal2.description,
12448
- target_time: data.target_time ?? goal2.target_time
12142
+ id: goal.id,
12143
+ milestone_id: goal.milestone_id,
12144
+ name: data.name ?? goal.name,
12145
+ description: data.description ?? goal.description,
12146
+ target_time: data.target_time ?? goal.target_time
12449
12147
  };
12450
- return this.clients.goals.patch(`/goals/${id2}`, { body: updateData });
12148
+ return this.clients.goals.patch(`/goals/${id}`, {
12149
+ body: updateData
12150
+ });
12451
12151
  }),
12452
- delete: (id2) => wrap(() => this.clients.goals.delete(`/goals/${id2}`))
12152
+ delete: (id) => wrap(() => this.clients.goals.delete(`/goals/${id}`))
12453
12153
  };
12454
12154
  this.tasks = {
12455
12155
  list: (filters) => wrap(() => {
@@ -12460,35 +12160,41 @@ var ApiClient2 = class {
12460
12160
  query.tag = filters.tag_id;
12461
12161
  return this.clients.tasks.get("/tasks", Object.keys(query).length > 0 ? { query } : {});
12462
12162
  }),
12463
- find: (id2) => wrap(() => this.clients.tasks.get("/tasks", { query: { id: id2 } })),
12464
- getByProject: (project_id) => wrap(() => this.clients.tasks.get(`/tasks`, { query: { project: project_id } })),
12163
+ find: (id) => wrap(() => this.clients.tasks.get("/tasks", { query: { id } })),
12164
+ getByProject: (project_id) => wrap(() => this.clients.tasks.get(`/tasks`, {
12165
+ query: { project: project_id }
12166
+ })),
12465
12167
  create: (data) => wrap(() => this.clients.tasks.patch("/tasks", { body: data })),
12466
- update: async (id2, changes) => wrap(async () => {
12467
- const result = await this.tasks.find(id2);
12168
+ update: async (id, changes) => wrap(async () => {
12169
+ const result = await this.tasks.find(id);
12468
12170
  if (!result.ok)
12469
12171
  throw new Error(result.error.message);
12470
12172
  if (!result.value)
12471
- throw new Error(`Task with id ${id2} not found`);
12472
- const task2 = result.value;
12173
+ throw new Error(`Task with id ${id} not found`);
12174
+ const task = result.value;
12473
12175
  const updateData = {
12474
- id: id2,
12475
- title: task2.task.title,
12476
- summary: task2.task.summary,
12477
- description: task2.task.description,
12478
- progress: task2.task.progress,
12479
- visibility: task2.task.visibility,
12480
- start_time: task2.task.start_time,
12481
- end_time: task2.task.end_time,
12482
- priority: task2.task.priority,
12483
- owner_id: task2.task.owner_id,
12484
- project_id: task2.task.project_id,
12176
+ id,
12177
+ title: task.task.title,
12178
+ summary: task.task.summary,
12179
+ description: task.task.description,
12180
+ progress: task.task.progress,
12181
+ visibility: task.task.visibility,
12182
+ start_time: task.task.start_time,
12183
+ end_time: task.task.end_time,
12184
+ priority: task.task.priority,
12185
+ owner_id: task.task.owner_id,
12186
+ project_id: task.task.project_id,
12485
12187
  ...changes
12486
12188
  };
12487
- return this.clients.tasks.patch("/tasks", { body: updateData });
12189
+ return this.clients.tasks.patch("/tasks", {
12190
+ body: updateData
12191
+ });
12488
12192
  }),
12489
12193
  upsert: (data) => wrap(() => this.clients.tasks.patch("/tasks", { body: data })),
12490
12194
  saveTags: (data) => wrap(() => this.clients.tasks.patch("/tasks/save_tags", { body: data })),
12491
- deleteTask: (task2) => wrap(() => this.clients.tasks.patch("/tasks", { body: { ...task2.task, deleted: true } })),
12195
+ deleteTask: (task) => wrap(() => this.clients.tasks.patch("/tasks", {
12196
+ body: { ...task.task, deleted: true }
12197
+ })),
12492
12198
  history: {
12493
12199
  get: (task_id) => wrap(() => this.clients.tasks.get(`/tasks/history/${task_id}`))
12494
12200
  }
@@ -12535,19 +12241,23 @@ var ApiClient2 = class {
12535
12241
  getForPost: (uuid) => wrap(() => this.clients.blog.get(`/blog/tags/posts/${uuid}/tags`)),
12536
12242
  setForPost: (uuid, tags) => wrap(() => this.clients.blog.put(`/blog/tags/posts/${uuid}/tags`, { body: { tags } })),
12537
12243
  addToPost: (uuid, tags) => wrap(() => this.clients.blog.post(`/blog/tags/posts/${uuid}/tags`, { body: { tags } })),
12538
- removeFromPost: (uuid, tag2) => wrap(() => this.clients.blog.delete(`/blog/tags/posts/${uuid}/tags/${tag2}`))
12244
+ removeFromPost: (uuid, tag) => wrap(() => this.clients.blog.delete(`/blog/tags/posts/${uuid}/tags/${tag}`))
12539
12245
  },
12540
12246
  categories: {
12541
12247
  tree: () => wrap(() => this.clients.blog.get("/blog/categories")),
12542
12248
  create: (data) => wrap(() => this.clients.blog.post("/blog/categories", { body: data })),
12543
- update: (name, data) => wrap(() => this.clients.blog.put(`/blog/categories/${name}`, { body: data })),
12249
+ update: (name, data) => wrap(() => this.clients.blog.put(`/blog/categories/${name}`, {
12250
+ body: data
12251
+ })),
12544
12252
  delete: (name) => wrap(() => this.clients.blog.delete(`/blog/categories/${name}`))
12545
12253
  },
12546
12254
  tokens: {
12547
12255
  list: () => wrap(() => this.clients.blog.get("/blog/tokens")),
12548
12256
  create: (data) => wrap(() => this.clients.blog.post("/blog/tokens", { body: data })),
12549
- update: (id2, data) => wrap(() => this.clients.blog.put(`/blog/tokens/${id2}`, { body: data })),
12550
- delete: (id2) => wrap(() => this.clients.blog.delete(`/blog/tokens/${id2}`))
12257
+ update: (id, data) => wrap(() => this.clients.blog.put(`/blog/tokens/${id}`, {
12258
+ body: data
12259
+ })),
12260
+ delete: (id) => wrap(() => this.clients.blog.delete(`/blog/tokens/${id}`))
12551
12261
  }
12552
12262
  };
12553
12263
  this.media = {
@@ -12557,9 +12267,9 @@ var ApiClient2 = class {
12557
12267
  return res.profiles;
12558
12268
  }),
12559
12269
  create: (data) => wrap(() => this.clients.media.post("/profiles", { body: data })),
12560
- get: (id2) => wrap(() => this.clients.media.get(`/profiles/${id2}`)),
12561
- update: (id2, data) => wrap(() => this.clients.media.patch(`/profiles/${id2}`, { body: data })),
12562
- delete: (id2) => wrap(() => this.clients.media.delete(`/profiles/${id2}`)),
12270
+ get: (id) => wrap(() => this.clients.media.get(`/profiles/${id}`)),
12271
+ update: (id, data) => wrap(() => this.clients.media.patch(`/profiles/${id}`, { body: data })),
12272
+ delete: (id) => wrap(() => this.clients.media.delete(`/profiles/${id}`)),
12563
12273
  filters: {
12564
12274
  list: (profile_id) => wrap(async () => {
12565
12275
  const res = await this.clients.media.get(`/profiles/${profile_id}/filters`);
@@ -12589,10 +12299,14 @@ var ApiClient2 = class {
12589
12299
  delete: (account_id) => wrap(() => this.clients.media.delete(`/connections/${account_id}`)),
12590
12300
  refresh: (account_id) => wrap(() => this.clients.media.post(`/connections/${account_id}/refresh`)),
12591
12301
  refreshAll: () => wrap(() => this.clients.media.post("/connections/refresh-all")),
12592
- updateStatus: (account_id, is_active) => wrap(() => this.clients.media.patch(`/connections/${account_id}`, { body: { is_active } })),
12302
+ updateStatus: (account_id, is_active) => wrap(() => this.clients.media.patch(`/connections/${account_id}`, {
12303
+ body: { is_active }
12304
+ })),
12593
12305
  settings: {
12594
12306
  get: (account_id) => wrap(() => this.clients.media.get(`/connections/${account_id}/settings`)),
12595
- update: (account_id, settings) => wrap(() => this.clients.media.put(`/connections/${account_id}/settings`, { body: { settings } }))
12307
+ update: (account_id, settings) => wrap(() => this.clients.media.put(`/connections/${account_id}/settings`, {
12308
+ body: { settings }
12309
+ }))
12596
12310
  },
12597
12311
  repos: (account_id) => wrap(async () => {
12598
12312
  const res = await this.clients.media.get(`/connections/${account_id}/repos`);
@@ -12617,9 +12331,21 @@ var ApiClient2 = class {
12617
12331
  query.to = params.to;
12618
12332
  return this.clients.media.get(`/timeline/${user_id}`, Object.keys(query).length ? { query } : {});
12619
12333
  }),
12620
- getRaw: (user_id, platform, account_id) => wrap(() => this.clients.media.get(`/timeline/${user_id}/raw/${platform}`, { query: { account_id } }))
12334
+ getRaw: (user_id, platform, account_id) => wrap(() => this.clients.media.get(`/timeline/${user_id}/raw/${platform}`, {
12335
+ query: { account_id }
12336
+ }))
12621
12337
  }
12622
12338
  };
12339
+ this.activity = {
12340
+ ai: (options2) => wrap(() => {
12341
+ const query = {};
12342
+ if (options2?.limit)
12343
+ query.limit = String(options2.limit);
12344
+ if (options2?.since)
12345
+ query.since = options2.since;
12346
+ return this.clients.projects.get("/activity/ai", Object.keys(query).length ? { query } : {});
12347
+ })
12348
+ };
12623
12349
  this.user = {
12624
12350
  history: () => wrap(() => this.clients.auth.get("/user/history")),
12625
12351
  preferences: (data) => wrap(() => this.clients.auth.patch("/user/preferences", { body: data }))
@@ -12639,7 +12365,11 @@ var ApiClient2 = class {
12639
12365
  const auth_base_url = base_url.replace(/\/v1\/?$/, "");
12640
12366
  this.clients = {
12641
12367
  auth: new ApiClient({ ...clientOptions, category: "auth" }),
12642
- auth_root: new ApiClient({ ...clientOptions, base_url: auth_base_url, category: "auth" }),
12368
+ auth_root: new ApiClient({
12369
+ ...clientOptions,
12370
+ base_url: auth_base_url,
12371
+ category: "auth"
12372
+ }),
12643
12373
  projects: new ApiClient({ ...clientOptions, category: "projects" }),
12644
12374
  tasks: new ApiClient({ ...clientOptions, category: "tasks" }),
12645
12375
  milestones: new ApiClient({ ...clientOptions, category: "milestones" }),
@@ -12709,7 +12439,7 @@ var tools = {
12709
12439
  },
12710
12440
  devpad_projects_upsert: {
12711
12441
  name: "devpad_projects_upsert",
12712
- description: "Create or update a project (set deleted=true to delete)",
12442
+ description: "Create or update a project (set deleted=true to delete). Returns 409 if entity is protected by user - pass force=true to override.",
12713
12443
  inputSchema: upsert_project,
12714
12444
  execute: async (client, input) => unwrap2(await client.projects.upsert(input))
12715
12445
  },
@@ -12736,7 +12466,7 @@ var tools = {
12736
12466
  },
12737
12467
  devpad_tasks_upsert: {
12738
12468
  name: "devpad_tasks_upsert",
12739
- description: "Create or update a task (set deleted=true to delete)",
12469
+ description: "Create or update a task (set deleted=true to delete). Returns 409 if entity is protected by user - pass force=true to override.",
12740
12470
  inputSchema: upsert_todo,
12741
12471
  execute: async (client, input) => unwrap2(await client.tasks.upsert(input))
12742
12472
  },
@@ -12763,7 +12493,7 @@ var tools = {
12763
12493
  },
12764
12494
  devpad_milestones_upsert: {
12765
12495
  name: "devpad_milestones_upsert",
12766
- description: "Create or update a milestone",
12496
+ description: "Create or update a milestone. Returns 409 if entity is protected by user - pass force=true to override.",
12767
12497
  inputSchema: upsert_milestone,
12768
12498
  execute: async (client, input) => unwrap2(input.id ? await client.milestones.update(input.id, {
12769
12499
  name: input.name,
@@ -12792,7 +12522,7 @@ var tools = {
12792
12522
  },
12793
12523
  devpad_goals_upsert: {
12794
12524
  name: "devpad_goals_upsert",
12795
- description: "Create or update a goal",
12525
+ description: "Create or update a goal. Returns 409 if entity is protected by user - pass force=true to override.",
12796
12526
  inputSchema: upsert_goal,
12797
12527
  execute: async (client, input) => unwrap2(input.id ? await client.goals.update(input.id, {
12798
12528
  name: input.name,
@@ -12830,10 +12560,10 @@ var tools = {
12830
12560
  id: exports_external.string().describe("Project ID")
12831
12561
  }),
12832
12562
  execute: async (client, input) => {
12833
- const project2 = unwrap2(await client.projects.find(input.id));
12834
- if (!project2)
12563
+ const project = unwrap2(await client.projects.find(input.id));
12564
+ if (!project)
12835
12565
  throw new Error(`Project ${input.id} not found`);
12836
- unwrap2(await client.projects.deleteProject(project2));
12566
+ unwrap2(await client.projects.deleteProject(project));
12837
12567
  return { success: true };
12838
12568
  }
12839
12569
  },
@@ -12892,10 +12622,10 @@ var tools = {
12892
12622
  id: exports_external.string().describe("Task ID")
12893
12623
  }),
12894
12624
  execute: async (client, input) => {
12895
- const task2 = unwrap2(await client.tasks.find(input.id));
12896
- if (!task2)
12625
+ const task = unwrap2(await client.tasks.find(input.id));
12626
+ if (!task)
12897
12627
  throw new Error(`Task ${input.id} not found`);
12898
- unwrap2(await client.tasks.deleteTask(task2));
12628
+ unwrap2(await client.tasks.deleteTask(task));
12899
12629
  return { success: true };
12900
12630
  }
12901
12631
  },
@@ -12922,6 +12652,15 @@ var tools = {
12922
12652
  }),
12923
12653
  execute: async (client, input) => unwrap2(await client.user.preferences(input))
12924
12654
  },
12655
+ devpad_activity_ai: {
12656
+ name: "devpad_activity_ai",
12657
+ description: "Get AI activity feed - shows recent actions made via API/MCP grouped into sessions by time window",
12658
+ inputSchema: exports_external.object({
12659
+ limit: exports_external.number().optional().describe("Max sessions to return (default 20)"),
12660
+ since: exports_external.string().optional().describe("Only show activity after this ISO date")
12661
+ }),
12662
+ execute: async (client, input) => unwrap2(await client.activity.ai(input))
12663
+ },
12925
12664
  devpad_blog_posts_list: {
12926
12665
  name: "devpad_blog_posts_list",
12927
12666
  description: "List blog posts with optional filters",
@@ -13059,8 +12798,8 @@ var tools = {
13059
12798
  slug: exports_external.string().optional().describe("Profile slug")
13060
12799
  }),
13061
12800
  execute: async (client, input) => {
13062
- const { id: id2, ...data } = input;
13063
- return unwrap2(await client.media.profiles.update(id2, data));
12801
+ const { id, ...data } = input;
12802
+ return unwrap2(await client.media.profiles.update(id, data));
13064
12803
  }
13065
12804
  },
13066
12805
  devpad_media_profiles_delete: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devpad/mcp",
3
- "version": "2.0.2",
3
+ "version": "2.0.4",
4
4
  "description": "MCP server for devpad - exposes devpad API functionality via Model Context Protocol",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",