@devpad/cli 2.3.3 → 2.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +427 -20
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -12453,9 +12453,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
12453
12453
|
_chainOrCallSubCommandHook(promise, subCommand, event) {
|
|
12454
12454
|
let result = promise;
|
|
12455
12455
|
if (this._lifeCycleHooks[event] !== undefined) {
|
|
12456
|
-
this._lifeCycleHooks[event].forEach((
|
|
12456
|
+
this._lifeCycleHooks[event].forEach((hook2) => {
|
|
12457
12457
|
result = this._chainOrCall(result, () => {
|
|
12458
|
-
return
|
|
12458
|
+
return hook2(this, subCommand);
|
|
12459
12459
|
});
|
|
12460
12460
|
});
|
|
12461
12461
|
}
|
|
@@ -15824,7 +15824,7 @@ var require_emoji_regex = __commonJS(function(exports, module) {
|
|
|
15824
15824
|
};
|
|
15825
15825
|
});
|
|
15826
15826
|
|
|
15827
|
-
// ../api/dist/chunk-
|
|
15827
|
+
// ../api/dist/chunk-A7B2SE7T.js
|
|
15828
15828
|
init_drizzle_orm();
|
|
15829
15829
|
init_sqlite_core();
|
|
15830
15830
|
init_zod();
|
|
@@ -15878,6 +15878,7 @@ var api_keys = sqliteTable("api_keys", {
|
|
|
15878
15878
|
name: text("name"),
|
|
15879
15879
|
note: text("note"),
|
|
15880
15880
|
scope: text("scope", { enum: ["devpad", "blog", "media", "pulse", "all"] }).notNull().default("all"),
|
|
15881
|
+
project_id: text("project_id").references(() => project.id),
|
|
15881
15882
|
enabled: integer("enabled", { mode: "boolean" }).notNull().default(true),
|
|
15882
15883
|
last_used_at: text("last_used_at"),
|
|
15883
15884
|
...timestamps(),
|
|
@@ -15897,7 +15898,8 @@ var project = sqliteTable("project", {
|
|
|
15897
15898
|
link_text: text("link_text"),
|
|
15898
15899
|
visibility: text("visibility", { enum: ["PUBLIC", "PRIVATE", "HIDDEN", "ARCHIVED", "DRAFT", "DELETED"] }).notNull().default("PRIVATE"),
|
|
15899
15900
|
current_version: text("current_version"),
|
|
15900
|
-
scan_branch: text("scan_branch")
|
|
15901
|
+
scan_branch: text("scan_branch"),
|
|
15902
|
+
github_autoclose: integer("github_autoclose", { mode: "boolean" }).notNull().default(false)
|
|
15901
15903
|
});
|
|
15902
15904
|
var ACTIONS = [
|
|
15903
15905
|
"CREATE_TASK",
|
|
@@ -16019,6 +16021,61 @@ var apply_log = sqliteTable("apply_log", {
|
|
|
16019
16021
|
response: text("response", { mode: "json" }).notNull(),
|
|
16020
16022
|
created_at: text("created_at").notNull().default(sql`(CURRENT_TIMESTAMP)`)
|
|
16021
16023
|
});
|
|
16024
|
+
var TASK_EVENT_KINDS = [
|
|
16025
|
+
"task.created",
|
|
16026
|
+
"task.updated",
|
|
16027
|
+
"task.completed",
|
|
16028
|
+
"task.reopened",
|
|
16029
|
+
"task.claimed",
|
|
16030
|
+
"edge.created",
|
|
16031
|
+
"edge.removed",
|
|
16032
|
+
"node.children_all_done",
|
|
16033
|
+
"policy.fired",
|
|
16034
|
+
"node.completion_stale"
|
|
16035
|
+
];
|
|
16036
|
+
var TASK_EVENT_ACTORS = ["user", "api", "policy", "github"];
|
|
16037
|
+
var TASK_EVENT_DISPATCH_STATUSES = ["pending", "dispatched"];
|
|
16038
|
+
var task_event = sqliteTable("task_event", {
|
|
16039
|
+
id: integer("id").primaryKey({ autoIncrement: true }),
|
|
16040
|
+
event_id: text("event_id").notNull().unique().$defaultFn(() => `evt_${crypto.randomUUID()}`),
|
|
16041
|
+
kind: text("kind", { enum: TASK_EVENT_KINDS }).notNull(),
|
|
16042
|
+
subject_id: text("subject_id").notNull(),
|
|
16043
|
+
project_id: text("project_id"),
|
|
16044
|
+
actor: text("actor", { enum: TASK_EVENT_ACTORS }).notNull(),
|
|
16045
|
+
payload: text("payload", { mode: "json" }).notNull(),
|
|
16046
|
+
occurred_at: text("occurred_at").notNull().default(sql`(CURRENT_TIMESTAMP)`),
|
|
16047
|
+
dispatch_status: text("dispatch_status", { enum: TASK_EVENT_DISPATCH_STATUSES }).notNull().default("pending"),
|
|
16048
|
+
dispatched_at: text("dispatched_at")
|
|
16049
|
+
}, (table3) => [
|
|
16050
|
+
index("task_event_subject_id_idx").on(table3.subject_id),
|
|
16051
|
+
index("task_event_dispatch_status_idx").on(table3.dispatch_status)
|
|
16052
|
+
]);
|
|
16053
|
+
var hook = sqliteTable("hook", {
|
|
16054
|
+
...entity2("hook"),
|
|
16055
|
+
project_id: text("project_id").notNull().references(() => project.id),
|
|
16056
|
+
enabled: integer("enabled", { mode: "boolean" }).notNull().default(true),
|
|
16057
|
+
trigger: text("trigger", { mode: "json" }).notNull(),
|
|
16058
|
+
action: text("action", { mode: "json" }).notNull()
|
|
16059
|
+
}, (table3) => [index("hook_project_id_idx").on(table3.project_id)]);
|
|
16060
|
+
var HOOK_DELIVERY_STATUSES = ["pending", "delivered", "failed_transient", "failed_permanent"];
|
|
16061
|
+
var hook_delivery = sqliteTable("hook_delivery", {
|
|
16062
|
+
id: text("id").primaryKey(),
|
|
16063
|
+
hook_id: text("hook_id").notNull().references(() => hook.id),
|
|
16064
|
+
event_id: text("event_id").notNull(),
|
|
16065
|
+
status: text("status", { enum: HOOK_DELIVERY_STATUSES }).notNull().default("pending"),
|
|
16066
|
+
attempts: integer("attempts").notNull().default(0),
|
|
16067
|
+
last_error: text("last_error"),
|
|
16068
|
+
...timestamps()
|
|
16069
|
+
}, (table3) => [
|
|
16070
|
+
index("hook_delivery_hook_id_idx").on(table3.hook_id),
|
|
16071
|
+
index("hook_delivery_status_idx").on(table3.status)
|
|
16072
|
+
]);
|
|
16073
|
+
var github_webhook_event = sqliteTable("github_webhook_event", {
|
|
16074
|
+
id: text("id").primaryKey(),
|
|
16075
|
+
delivery_guid: text("delivery_guid").notNull(),
|
|
16076
|
+
event_type: text("event_type").notNull(),
|
|
16077
|
+
processed_at: text("processed_at").notNull().default(sql`(CURRENT_TIMESTAMP)`)
|
|
16078
|
+
}, (table3) => [index("github_webhook_event_delivery_guid_idx").on(table3.delivery_guid)]);
|
|
16022
16079
|
var checklist = sqliteTable("checklist", {
|
|
16023
16080
|
...entity2("checklist"),
|
|
16024
16081
|
task_id: text("task_id").notNull().references(() => task.id),
|
|
@@ -16209,6 +16266,16 @@ var task_link_relations = relations(task_link, ({ one }) => ({
|
|
|
16209
16266
|
var task_rollup_relations = relations(task_rollup, ({ one }) => ({
|
|
16210
16267
|
task: one(task, { fields: [task_rollup.task_id], references: [task.id] })
|
|
16211
16268
|
}));
|
|
16269
|
+
var task_event_relations = relations(task_event, ({ one }) => ({
|
|
16270
|
+
subject: one(task, { fields: [task_event.subject_id], references: [task.id] })
|
|
16271
|
+
}));
|
|
16272
|
+
var hook_relations = relations(hook, ({ one, many }) => ({
|
|
16273
|
+
project: one(project, { fields: [hook.project_id], references: [project.id] }),
|
|
16274
|
+
deliveries: many(hook_delivery)
|
|
16275
|
+
}));
|
|
16276
|
+
var hook_delivery_relations = relations(hook_delivery, ({ one }) => ({
|
|
16277
|
+
hook: one(hook, { fields: [hook_delivery.hook_id], references: [hook.id] })
|
|
16278
|
+
}));
|
|
16212
16279
|
var checklist_relations = relations(checklist, ({ one, many }) => ({
|
|
16213
16280
|
task: one(task, { fields: [checklist.task_id], references: [task.id] }),
|
|
16214
16281
|
items: many(checklist_item)
|
|
@@ -16569,6 +16636,66 @@ var apply_request = exports_external.object({
|
|
|
16569
16636
|
ops: exports_external.array(apply_op).min(1)
|
|
16570
16637
|
});
|
|
16571
16638
|
var claim_request = exports_external.object({ actor: exports_external.string().min(1), base_rev: exports_external.number().int() });
|
|
16639
|
+
var done_request = exports_external.object({ base_rev: exports_external.number().int() });
|
|
16640
|
+
var task_event_actor = exports_external.enum(TASK_EVENT_ACTORS);
|
|
16641
|
+
var task_event_payload = exports_external.discriminatedUnion("kind", [
|
|
16642
|
+
exports_external.object({ kind: exports_external.literal("task.created"), title: exports_external.string() }),
|
|
16643
|
+
exports_external.object({ kind: exports_external.literal("task.updated"), fields: exports_external.array(exports_external.string()) }),
|
|
16644
|
+
exports_external.object({ kind: exports_external.literal("task.completed"), via: exports_external.enum(COMPLETED_VIA_VALUES) }),
|
|
16645
|
+
exports_external.object({ kind: exports_external.literal("task.reopened"), via: exports_external.enum(COMPLETED_VIA_VALUES) }),
|
|
16646
|
+
exports_external.object({ kind: exports_external.literal("task.claimed"), actor: exports_external.string() }),
|
|
16647
|
+
exports_external.object({ kind: exports_external.literal("edge.created"), link_kind: task_link_kind, dst_id: exports_external.string().nullable() }),
|
|
16648
|
+
exports_external.object({ kind: exports_external.literal("edge.removed"), link_kind: task_link_kind, dst_id: exports_external.string().nullable() }),
|
|
16649
|
+
exports_external.object({ kind: exports_external.literal("node.children_all_done") }),
|
|
16650
|
+
exports_external.object({ kind: exports_external.literal("policy.fired"), policy: exports_external.enum(COMPLETION_POLICIES) }),
|
|
16651
|
+
exports_external.object({ kind: exports_external.literal("node.completion_stale"), child_id: exports_external.string() })
|
|
16652
|
+
]);
|
|
16653
|
+
var hook_selector = exports_external.object({
|
|
16654
|
+
subject_kind: exports_external.enum(TASK_KINDS).optional(),
|
|
16655
|
+
tag: exports_external.string().optional(),
|
|
16656
|
+
ancestor_id: exports_external.string().optional()
|
|
16657
|
+
});
|
|
16658
|
+
var hook_trigger = exports_external.object({
|
|
16659
|
+
kinds: exports_external.array(exports_external.enum(TASK_EVENT_KINDS)).min(1),
|
|
16660
|
+
selector: hook_selector.default({})
|
|
16661
|
+
});
|
|
16662
|
+
var hook_action_input = exports_external.discriminatedUnion("kind", [
|
|
16663
|
+
exports_external.object({ kind: exports_external.literal("webhook"), url: exports_external.string().url(), secret: exports_external.string().min(1).optional() }),
|
|
16664
|
+
exports_external.object({
|
|
16665
|
+
kind: exports_external.literal("vault"),
|
|
16666
|
+
scope: exports_external.string().min(1),
|
|
16667
|
+
op: exports_external.string().min(1),
|
|
16668
|
+
args: exports_external.record(exports_external.string(), exports_external.unknown()).optional()
|
|
16669
|
+
}),
|
|
16670
|
+
exports_external.object({ kind: exports_external.literal("pipeline"), package_id: exports_external.string().min(1) })
|
|
16671
|
+
]);
|
|
16672
|
+
var hook_action_stored = exports_external.discriminatedUnion("kind", [
|
|
16673
|
+
exports_external.object({ kind: exports_external.literal("webhook"), url: exports_external.string().url(), secret_encrypted: exports_external.string().optional() }),
|
|
16674
|
+
exports_external.object({
|
|
16675
|
+
kind: exports_external.literal("vault"),
|
|
16676
|
+
scope: exports_external.string().min(1),
|
|
16677
|
+
op: exports_external.string().min(1),
|
|
16678
|
+
args: exports_external.record(exports_external.string(), exports_external.unknown()).optional()
|
|
16679
|
+
}),
|
|
16680
|
+
exports_external.object({ kind: exports_external.literal("pipeline"), package_id: exports_external.string().min(1) })
|
|
16681
|
+
]);
|
|
16682
|
+
var hook_action_public = exports_external.discriminatedUnion("kind", [
|
|
16683
|
+
exports_external.object({ kind: exports_external.literal("webhook"), url: exports_external.string().url(), has_secret: exports_external.boolean() }),
|
|
16684
|
+
exports_external.object({
|
|
16685
|
+
kind: exports_external.literal("vault"),
|
|
16686
|
+
scope: exports_external.string().min(1),
|
|
16687
|
+
op: exports_external.string().min(1),
|
|
16688
|
+
args: exports_external.record(exports_external.string(), exports_external.unknown()).optional()
|
|
16689
|
+
}),
|
|
16690
|
+
exports_external.object({ kind: exports_external.literal("pipeline"), package_id: exports_external.string().min(1) })
|
|
16691
|
+
]);
|
|
16692
|
+
var upsert_hook = exports_external.object({
|
|
16693
|
+
id: exports_external.string().optional(),
|
|
16694
|
+
project_id: exports_external.string(),
|
|
16695
|
+
enabled: exports_external.boolean().default(true),
|
|
16696
|
+
trigger: hook_trigger,
|
|
16697
|
+
action: hook_action_input
|
|
16698
|
+
});
|
|
16572
16699
|
|
|
16573
16700
|
// ../api/dist/chunk-5L3AUVMM.js
|
|
16574
16701
|
init_dist();
|
|
@@ -17270,6 +17397,12 @@ var ApiClient2 = class {
|
|
|
17270
17397
|
delete: (id2) => wrap(() => this.clients.milestones.delete(`/milestones/${id2}`)),
|
|
17271
17398
|
goals: (id2) => wrap(() => this.clients.milestones.get(`/milestones/${id2}/goals`))
|
|
17272
17399
|
};
|
|
17400
|
+
this.hooks = {
|
|
17401
|
+
list: (project_id) => wrap(() => this.clients.hooks.get("/hooks", { query: { project_id } })),
|
|
17402
|
+
upsert: (data) => wrap(() => data.id ? this.clients.hooks.patch(`/hooks/${data.id}`, { body: data }) : this.clients.hooks.post("/hooks", { body: data })),
|
|
17403
|
+
delete: (id2) => wrap(() => this.clients.hooks.delete(`/hooks/${id2}`)),
|
|
17404
|
+
deliveries: (id2, status) => wrap(() => this.clients.hooks.get(`/hooks/${id2}/deliveries`, status ? { query: { status } } : {}))
|
|
17405
|
+
};
|
|
17273
17406
|
this.goals = {
|
|
17274
17407
|
list: () => wrap(() => this.clients.goals.get("/goals")),
|
|
17275
17408
|
find: (id2) => wrap(() => this.clients.goals.get(`/goals/${id2}`)),
|
|
@@ -17355,6 +17488,7 @@ var ApiClient2 = class {
|
|
|
17355
17488
|
tree: (id2, depth) => wrap(() => this.clients.tasks.get(`/tasks/${id2}/tree`, depth ? { query: { depth: String(depth) } } : {})),
|
|
17356
17489
|
near: (id2) => wrap(() => this.clients.tasks.get(`/tasks/${id2}/near`)),
|
|
17357
17490
|
claim: (id2, data) => wrap(() => this.clients.tasks.post(`/tasks/${id2}/claim`, { body: data })),
|
|
17491
|
+
done: (id2, data) => wrap(() => this.clients.tasks.post(`/tasks/${id2}/done`, { body: data })),
|
|
17358
17492
|
link: (data) => wrap(() => this.clients.tasks.post("/tasks/link", { body: data })),
|
|
17359
17493
|
unlink: (link_id) => wrap(() => this.clients.tasks.delete(`/tasks/link/${link_id}`)),
|
|
17360
17494
|
apply: (data) => wrap(() => this.clients.tasks.post("/tasks/apply", { body: data }))
|
|
@@ -17726,7 +17860,8 @@ var ApiClient2 = class {
|
|
|
17726
17860
|
blog: new ApiClient({ ...clientOptions, category: "blog" }),
|
|
17727
17861
|
media: new ApiClient({ ...clientOptions, category: "media" }),
|
|
17728
17862
|
pulse: new ApiClient({ ...clientOptions, base_url: `${base_url}/pulse`, category: "pulse" }),
|
|
17729
|
-
pipelines: new ApiClient({ ...clientOptions, category: "pipelines" })
|
|
17863
|
+
pipelines: new ApiClient({ ...clientOptions, category: "pipelines" }),
|
|
17864
|
+
hooks: new ApiClient({ ...clientOptions, category: "hooks" })
|
|
17730
17865
|
};
|
|
17731
17866
|
}
|
|
17732
17867
|
history() {
|
|
@@ -17812,6 +17947,16 @@ var milestone_by_id = exports_external.object({
|
|
|
17812
17947
|
var goal_by_id = exports_external.object({
|
|
17813
17948
|
id: exports_external.string().describe("Goal ID")
|
|
17814
17949
|
});
|
|
17950
|
+
var hook_filters = exports_external.object({
|
|
17951
|
+
project_id: exports_external.string().describe("Project ID to list hooks for")
|
|
17952
|
+
});
|
|
17953
|
+
var hook_by_id = exports_external.object({
|
|
17954
|
+
id: exports_external.string().describe("Hook ID")
|
|
17955
|
+
});
|
|
17956
|
+
var hook_deliveries_input = exports_external.object({
|
|
17957
|
+
id: exports_external.string().describe("Hook ID"),
|
|
17958
|
+
status: exports_external.enum(["pending", "delivered", "failed_transient", "failed_permanent"]).optional().describe("Filter by delivery status — use failed_permanent to see the DLQ")
|
|
17959
|
+
});
|
|
17815
17960
|
var github_branches = exports_external.object({
|
|
17816
17961
|
owner: exports_external.string().describe("Repository owner"),
|
|
17817
17962
|
repo: exports_external.string().describe("Repository name")
|
|
@@ -17909,6 +18054,30 @@ var tools = {
|
|
|
17909
18054
|
finished_at: input.finished_at
|
|
17910
18055
|
}))
|
|
17911
18056
|
}),
|
|
18057
|
+
devpad_hooks_list: define_tool({
|
|
18058
|
+
name: "devpad_hooks_list",
|
|
18059
|
+
description: "List hooks configured for a project",
|
|
18060
|
+
inputSchema: hook_filters,
|
|
18061
|
+
execute: async (client, input) => unwrap2(await client.hooks.list(input.project_id))
|
|
18062
|
+
}),
|
|
18063
|
+
devpad_hooks_upsert: define_tool({
|
|
18064
|
+
name: "devpad_hooks_upsert",
|
|
18065
|
+
description: "Create or update a hook (webhook/vault/pipeline action fired on matching task_event kinds). Pass 'id' to update.",
|
|
18066
|
+
inputSchema: upsert_hook,
|
|
18067
|
+
execute: async (client, input) => unwrap2(await client.hooks.upsert(input))
|
|
18068
|
+
}),
|
|
18069
|
+
devpad_hooks_delete: define_tool({
|
|
18070
|
+
name: "devpad_hooks_delete",
|
|
18071
|
+
description: "Delete a hook",
|
|
18072
|
+
inputSchema: hook_by_id,
|
|
18073
|
+
execute: async (client, input) => unwrap2(await client.hooks.delete(input.id))
|
|
18074
|
+
}),
|
|
18075
|
+
devpad_hooks_deliveries: define_tool({
|
|
18076
|
+
name: "devpad_hooks_deliveries",
|
|
18077
|
+
description: "List delivery attempts for a hook, optionally filtered by status (the DLQ is status=failed_permanent)",
|
|
18078
|
+
inputSchema: hook_deliveries_input,
|
|
18079
|
+
execute: async (client, input) => unwrap2(await client.hooks.deliveries(input.id, input.status))
|
|
18080
|
+
}),
|
|
17912
18081
|
devpad_goals_list: define_tool({
|
|
17913
18082
|
name: "devpad_goals_list",
|
|
17914
18083
|
description: "List goals for authenticated user",
|
|
@@ -18077,6 +18246,15 @@ var tools = {
|
|
|
18077
18246
|
}),
|
|
18078
18247
|
execute: async (client, input) => unwrap2(await client.tasks.claim(input.id, { actor: input.actor, base_rev: input.base_rev }))
|
|
18079
18248
|
}),
|
|
18249
|
+
devpad_tasks_done: define_tool({
|
|
18250
|
+
name: "devpad_tasks_done",
|
|
18251
|
+
description: "Complete a task through the single completion entrypoint (CompletionEngine). Returns { completed, bubbled, hooks_fired } — bubbled is the ordered chain of ancestors an auto_children cascade also completed. 409 on stale base_rev or if already completed.",
|
|
18252
|
+
inputSchema: exports_external.object({
|
|
18253
|
+
id: exports_external.string().describe("Task ID"),
|
|
18254
|
+
base_rev: exports_external.number().int().describe("Expected current rev — optimistic concurrency guard")
|
|
18255
|
+
}),
|
|
18256
|
+
execute: async (client, input) => unwrap2(await client.tasks.done(input.id, { base_rev: input.base_rev }))
|
|
18257
|
+
}),
|
|
18080
18258
|
devpad_tasks_link: define_tool({
|
|
18081
18259
|
name: "devpad_tasks_link",
|
|
18082
18260
|
description: "Create a typed edge between two tasks (blocks | relates_to | references | discovered_from | tracks_metric)",
|
|
@@ -19668,6 +19846,12 @@ var ApiClient22 = class {
|
|
|
19668
19846
|
delete: (id2) => wrap2(() => this.clients.milestones.delete(`/milestones/${id2}`)),
|
|
19669
19847
|
goals: (id2) => wrap2(() => this.clients.milestones.get(`/milestones/${id2}/goals`))
|
|
19670
19848
|
};
|
|
19849
|
+
this.hooks = {
|
|
19850
|
+
list: (project_id) => wrap2(() => this.clients.hooks.get("/hooks", { query: { project_id } })),
|
|
19851
|
+
upsert: (data) => wrap2(() => data.id ? this.clients.hooks.patch(`/hooks/${data.id}`, { body: data }) : this.clients.hooks.post("/hooks", { body: data })),
|
|
19852
|
+
delete: (id2) => wrap2(() => this.clients.hooks.delete(`/hooks/${id2}`)),
|
|
19853
|
+
deliveries: (id2, status) => wrap2(() => this.clients.hooks.get(`/hooks/${id2}/deliveries`, status ? { query: { status } } : {}))
|
|
19854
|
+
};
|
|
19671
19855
|
this.goals = {
|
|
19672
19856
|
list: () => wrap2(() => this.clients.goals.get("/goals")),
|
|
19673
19857
|
find: (id2) => wrap2(() => this.clients.goals.get(`/goals/${id2}`)),
|
|
@@ -19753,6 +19937,7 @@ var ApiClient22 = class {
|
|
|
19753
19937
|
tree: (id2, depth) => wrap2(() => this.clients.tasks.get(`/tasks/${id2}/tree`, depth ? { query: { depth: String(depth) } } : {})),
|
|
19754
19938
|
near: (id2) => wrap2(() => this.clients.tasks.get(`/tasks/${id2}/near`)),
|
|
19755
19939
|
claim: (id2, data) => wrap2(() => this.clients.tasks.post(`/tasks/${id2}/claim`, { body: data })),
|
|
19940
|
+
done: (id2, data) => wrap2(() => this.clients.tasks.post(`/tasks/${id2}/done`, { body: data })),
|
|
19756
19941
|
link: (data) => wrap2(() => this.clients.tasks.post("/tasks/link", { body: data })),
|
|
19757
19942
|
unlink: (link_id) => wrap2(() => this.clients.tasks.delete(`/tasks/link/${link_id}`)),
|
|
19758
19943
|
apply: (data) => wrap2(() => this.clients.tasks.post("/tasks/apply", { body: data }))
|
|
@@ -20124,7 +20309,8 @@ var ApiClient22 = class {
|
|
|
20124
20309
|
blog: new ApiClient3({ ...clientOptions, category: "blog" }),
|
|
20125
20310
|
media: new ApiClient3({ ...clientOptions, category: "media" }),
|
|
20126
20311
|
pulse: new ApiClient3({ ...clientOptions, base_url: `${base_url}/pulse`, category: "pulse" }),
|
|
20127
|
-
pipelines: new ApiClient3({ ...clientOptions, category: "pipelines" })
|
|
20312
|
+
pipelines: new ApiClient3({ ...clientOptions, category: "pipelines" }),
|
|
20313
|
+
hooks: new ApiClient3({ ...clientOptions, category: "hooks" })
|
|
20128
20314
|
};
|
|
20129
20315
|
}
|
|
20130
20316
|
history() {
|
|
@@ -20210,6 +20396,16 @@ var milestone_by_id2 = exports_external.object({
|
|
|
20210
20396
|
var goal_by_id2 = exports_external.object({
|
|
20211
20397
|
id: exports_external.string().describe("Goal ID")
|
|
20212
20398
|
});
|
|
20399
|
+
var hook_filters2 = exports_external.object({
|
|
20400
|
+
project_id: exports_external.string().describe("Project ID to list hooks for")
|
|
20401
|
+
});
|
|
20402
|
+
var hook_by_id2 = exports_external.object({
|
|
20403
|
+
id: exports_external.string().describe("Hook ID")
|
|
20404
|
+
});
|
|
20405
|
+
var hook_deliveries_input2 = exports_external.object({
|
|
20406
|
+
id: exports_external.string().describe("Hook ID"),
|
|
20407
|
+
status: exports_external.enum(["pending", "delivered", "failed_transient", "failed_permanent"]).optional().describe("Filter by delivery status — use failed_permanent to see the DLQ")
|
|
20408
|
+
});
|
|
20213
20409
|
var github_branches2 = exports_external.object({
|
|
20214
20410
|
owner: exports_external.string().describe("Repository owner"),
|
|
20215
20411
|
repo: exports_external.string().describe("Repository name")
|
|
@@ -20307,6 +20503,30 @@ var tools2 = {
|
|
|
20307
20503
|
finished_at: input.finished_at
|
|
20308
20504
|
}))
|
|
20309
20505
|
}),
|
|
20506
|
+
devpad_hooks_list: define_tool2({
|
|
20507
|
+
name: "devpad_hooks_list",
|
|
20508
|
+
description: "List hooks configured for a project",
|
|
20509
|
+
inputSchema: hook_filters2,
|
|
20510
|
+
execute: async (client, input) => unwrap3(await client.hooks.list(input.project_id))
|
|
20511
|
+
}),
|
|
20512
|
+
devpad_hooks_upsert: define_tool2({
|
|
20513
|
+
name: "devpad_hooks_upsert",
|
|
20514
|
+
description: "Create or update a hook (webhook/vault/pipeline action fired on matching task_event kinds). Pass 'id' to update.",
|
|
20515
|
+
inputSchema: upsert_hook,
|
|
20516
|
+
execute: async (client, input) => unwrap3(await client.hooks.upsert(input))
|
|
20517
|
+
}),
|
|
20518
|
+
devpad_hooks_delete: define_tool2({
|
|
20519
|
+
name: "devpad_hooks_delete",
|
|
20520
|
+
description: "Delete a hook",
|
|
20521
|
+
inputSchema: hook_by_id2,
|
|
20522
|
+
execute: async (client, input) => unwrap3(await client.hooks.delete(input.id))
|
|
20523
|
+
}),
|
|
20524
|
+
devpad_hooks_deliveries: define_tool2({
|
|
20525
|
+
name: "devpad_hooks_deliveries",
|
|
20526
|
+
description: "List delivery attempts for a hook, optionally filtered by status (the DLQ is status=failed_permanent)",
|
|
20527
|
+
inputSchema: hook_deliveries_input2,
|
|
20528
|
+
execute: async (client, input) => unwrap3(await client.hooks.deliveries(input.id, input.status))
|
|
20529
|
+
}),
|
|
20310
20530
|
devpad_goals_list: define_tool2({
|
|
20311
20531
|
name: "devpad_goals_list",
|
|
20312
20532
|
description: "List goals for authenticated user",
|
|
@@ -20475,6 +20695,15 @@ var tools2 = {
|
|
|
20475
20695
|
}),
|
|
20476
20696
|
execute: async (client, input) => unwrap3(await client.tasks.claim(input.id, { actor: input.actor, base_rev: input.base_rev }))
|
|
20477
20697
|
}),
|
|
20698
|
+
devpad_tasks_done: define_tool2({
|
|
20699
|
+
name: "devpad_tasks_done",
|
|
20700
|
+
description: "Complete a task through the single completion entrypoint (CompletionEngine). Returns { completed, bubbled, hooks_fired } — bubbled is the ordered chain of ancestors an auto_children cascade also completed. 409 on stale base_rev or if already completed.",
|
|
20701
|
+
inputSchema: exports_external.object({
|
|
20702
|
+
id: exports_external.string().describe("Task ID"),
|
|
20703
|
+
base_rev: exports_external.number().int().describe("Expected current rev — optimistic concurrency guard")
|
|
20704
|
+
}),
|
|
20705
|
+
execute: async (client, input) => unwrap3(await client.tasks.done(input.id, { base_rev: input.base_rev }))
|
|
20706
|
+
}),
|
|
20478
20707
|
devpad_tasks_link: define_tool2({
|
|
20479
20708
|
name: "devpad_tasks_link",
|
|
20480
20709
|
description: "Create a typed edge between two tasks (blocks | relates_to | references | discovered_from | tracks_metric)",
|
|
@@ -24159,6 +24388,7 @@ var api_keys2 = sqliteTable("api_keys", {
|
|
|
24159
24388
|
name: text("name"),
|
|
24160
24389
|
note: text("note"),
|
|
24161
24390
|
scope: text("scope", { enum: ["devpad", "blog", "media", "pulse", "all"] }).notNull().default("all"),
|
|
24391
|
+
project_id: text("project_id").references(() => project2.id),
|
|
24162
24392
|
enabled: integer("enabled", { mode: "boolean" }).notNull().default(true),
|
|
24163
24393
|
last_used_at: text("last_used_at"),
|
|
24164
24394
|
...timestamps2(),
|
|
@@ -24178,7 +24408,8 @@ var project2 = sqliteTable("project", {
|
|
|
24178
24408
|
link_text: text("link_text"),
|
|
24179
24409
|
visibility: text("visibility", { enum: ["PUBLIC", "PRIVATE", "HIDDEN", "ARCHIVED", "DRAFT", "DELETED"] }).notNull().default("PRIVATE"),
|
|
24180
24410
|
current_version: text("current_version"),
|
|
24181
|
-
scan_branch: text("scan_branch")
|
|
24411
|
+
scan_branch: text("scan_branch"),
|
|
24412
|
+
github_autoclose: integer("github_autoclose", { mode: "boolean" }).notNull().default(false)
|
|
24182
24413
|
});
|
|
24183
24414
|
var ACTIONS2 = [
|
|
24184
24415
|
"CREATE_TASK",
|
|
@@ -24300,6 +24531,61 @@ var apply_log2 = sqliteTable("apply_log", {
|
|
|
24300
24531
|
response: text("response", { mode: "json" }).notNull(),
|
|
24301
24532
|
created_at: text("created_at").notNull().default(sql`(CURRENT_TIMESTAMP)`)
|
|
24302
24533
|
});
|
|
24534
|
+
var TASK_EVENT_KINDS2 = [
|
|
24535
|
+
"task.created",
|
|
24536
|
+
"task.updated",
|
|
24537
|
+
"task.completed",
|
|
24538
|
+
"task.reopened",
|
|
24539
|
+
"task.claimed",
|
|
24540
|
+
"edge.created",
|
|
24541
|
+
"edge.removed",
|
|
24542
|
+
"node.children_all_done",
|
|
24543
|
+
"policy.fired",
|
|
24544
|
+
"node.completion_stale"
|
|
24545
|
+
];
|
|
24546
|
+
var TASK_EVENT_ACTORS2 = ["user", "api", "policy", "github"];
|
|
24547
|
+
var TASK_EVENT_DISPATCH_STATUSES2 = ["pending", "dispatched"];
|
|
24548
|
+
var task_event2 = sqliteTable("task_event", {
|
|
24549
|
+
id: integer("id").primaryKey({ autoIncrement: true }),
|
|
24550
|
+
event_id: text("event_id").notNull().unique().$defaultFn(() => `evt_${crypto.randomUUID()}`),
|
|
24551
|
+
kind: text("kind", { enum: TASK_EVENT_KINDS2 }).notNull(),
|
|
24552
|
+
subject_id: text("subject_id").notNull(),
|
|
24553
|
+
project_id: text("project_id"),
|
|
24554
|
+
actor: text("actor", { enum: TASK_EVENT_ACTORS2 }).notNull(),
|
|
24555
|
+
payload: text("payload", { mode: "json" }).notNull(),
|
|
24556
|
+
occurred_at: text("occurred_at").notNull().default(sql`(CURRENT_TIMESTAMP)`),
|
|
24557
|
+
dispatch_status: text("dispatch_status", { enum: TASK_EVENT_DISPATCH_STATUSES2 }).notNull().default("pending"),
|
|
24558
|
+
dispatched_at: text("dispatched_at")
|
|
24559
|
+
}, (table3) => [
|
|
24560
|
+
index("task_event_subject_id_idx").on(table3.subject_id),
|
|
24561
|
+
index("task_event_dispatch_status_idx").on(table3.dispatch_status)
|
|
24562
|
+
]);
|
|
24563
|
+
var hook2 = sqliteTable("hook", {
|
|
24564
|
+
...entity3("hook"),
|
|
24565
|
+
project_id: text("project_id").notNull().references(() => project2.id),
|
|
24566
|
+
enabled: integer("enabled", { mode: "boolean" }).notNull().default(true),
|
|
24567
|
+
trigger: text("trigger", { mode: "json" }).notNull(),
|
|
24568
|
+
action: text("action", { mode: "json" }).notNull()
|
|
24569
|
+
}, (table3) => [index("hook_project_id_idx").on(table3.project_id)]);
|
|
24570
|
+
var HOOK_DELIVERY_STATUSES2 = ["pending", "delivered", "failed_transient", "failed_permanent"];
|
|
24571
|
+
var hook_delivery2 = sqliteTable("hook_delivery", {
|
|
24572
|
+
id: text("id").primaryKey(),
|
|
24573
|
+
hook_id: text("hook_id").notNull().references(() => hook2.id),
|
|
24574
|
+
event_id: text("event_id").notNull(),
|
|
24575
|
+
status: text("status", { enum: HOOK_DELIVERY_STATUSES2 }).notNull().default("pending"),
|
|
24576
|
+
attempts: integer("attempts").notNull().default(0),
|
|
24577
|
+
last_error: text("last_error"),
|
|
24578
|
+
...timestamps2()
|
|
24579
|
+
}, (table3) => [
|
|
24580
|
+
index("hook_delivery_hook_id_idx").on(table3.hook_id),
|
|
24581
|
+
index("hook_delivery_status_idx").on(table3.status)
|
|
24582
|
+
]);
|
|
24583
|
+
var github_webhook_event2 = sqliteTable("github_webhook_event", {
|
|
24584
|
+
id: text("id").primaryKey(),
|
|
24585
|
+
delivery_guid: text("delivery_guid").notNull(),
|
|
24586
|
+
event_type: text("event_type").notNull(),
|
|
24587
|
+
processed_at: text("processed_at").notNull().default(sql`(CURRENT_TIMESTAMP)`)
|
|
24588
|
+
}, (table3) => [index("github_webhook_event_delivery_guid_idx").on(table3.delivery_guid)]);
|
|
24303
24589
|
var checklist2 = sqliteTable("checklist", {
|
|
24304
24590
|
...entity3("checklist"),
|
|
24305
24591
|
task_id: text("task_id").notNull().references(() => task2.id),
|
|
@@ -24490,6 +24776,16 @@ var task_link_relations2 = relations(task_link2, ({ one }) => ({
|
|
|
24490
24776
|
var task_rollup_relations2 = relations(task_rollup2, ({ one }) => ({
|
|
24491
24777
|
task: one(task2, { fields: [task_rollup2.task_id], references: [task2.id] })
|
|
24492
24778
|
}));
|
|
24779
|
+
var task_event_relations2 = relations(task_event2, ({ one }) => ({
|
|
24780
|
+
subject: one(task2, { fields: [task_event2.subject_id], references: [task2.id] })
|
|
24781
|
+
}));
|
|
24782
|
+
var hook_relations2 = relations(hook2, ({ one, many }) => ({
|
|
24783
|
+
project: one(project2, { fields: [hook2.project_id], references: [project2.id] }),
|
|
24784
|
+
deliveries: many(hook_delivery2)
|
|
24785
|
+
}));
|
|
24786
|
+
var hook_delivery_relations2 = relations(hook_delivery2, ({ one }) => ({
|
|
24787
|
+
hook: one(hook2, { fields: [hook_delivery2.hook_id], references: [hook2.id] })
|
|
24788
|
+
}));
|
|
24493
24789
|
var checklist_relations2 = relations(checklist2, ({ one, many }) => ({
|
|
24494
24790
|
task: one(task2, { fields: [checklist2.task_id], references: [task2.id] }),
|
|
24495
24791
|
items: many(checklist_item2)
|
|
@@ -24852,6 +25148,66 @@ var apply_request2 = exports_external.object({
|
|
|
24852
25148
|
ops: exports_external.array(apply_op2).min(1)
|
|
24853
25149
|
});
|
|
24854
25150
|
var claim_request2 = exports_external.object({ actor: exports_external.string().min(1), base_rev: exports_external.number().int() });
|
|
25151
|
+
var done_request2 = exports_external.object({ base_rev: exports_external.number().int() });
|
|
25152
|
+
var task_event_actor2 = exports_external.enum(TASK_EVENT_ACTORS2);
|
|
25153
|
+
var task_event_payload2 = exports_external.discriminatedUnion("kind", [
|
|
25154
|
+
exports_external.object({ kind: exports_external.literal("task.created"), title: exports_external.string() }),
|
|
25155
|
+
exports_external.object({ kind: exports_external.literal("task.updated"), fields: exports_external.array(exports_external.string()) }),
|
|
25156
|
+
exports_external.object({ kind: exports_external.literal("task.completed"), via: exports_external.enum(COMPLETED_VIA_VALUES2) }),
|
|
25157
|
+
exports_external.object({ kind: exports_external.literal("task.reopened"), via: exports_external.enum(COMPLETED_VIA_VALUES2) }),
|
|
25158
|
+
exports_external.object({ kind: exports_external.literal("task.claimed"), actor: exports_external.string() }),
|
|
25159
|
+
exports_external.object({ kind: exports_external.literal("edge.created"), link_kind: task_link_kind2, dst_id: exports_external.string().nullable() }),
|
|
25160
|
+
exports_external.object({ kind: exports_external.literal("edge.removed"), link_kind: task_link_kind2, dst_id: exports_external.string().nullable() }),
|
|
25161
|
+
exports_external.object({ kind: exports_external.literal("node.children_all_done") }),
|
|
25162
|
+
exports_external.object({ kind: exports_external.literal("policy.fired"), policy: exports_external.enum(COMPLETION_POLICIES2) }),
|
|
25163
|
+
exports_external.object({ kind: exports_external.literal("node.completion_stale"), child_id: exports_external.string() })
|
|
25164
|
+
]);
|
|
25165
|
+
var hook_selector2 = exports_external.object({
|
|
25166
|
+
subject_kind: exports_external.enum(TASK_KINDS2).optional(),
|
|
25167
|
+
tag: exports_external.string().optional(),
|
|
25168
|
+
ancestor_id: exports_external.string().optional()
|
|
25169
|
+
});
|
|
25170
|
+
var hook_trigger2 = exports_external.object({
|
|
25171
|
+
kinds: exports_external.array(exports_external.enum(TASK_EVENT_KINDS2)).min(1),
|
|
25172
|
+
selector: hook_selector2.default({})
|
|
25173
|
+
});
|
|
25174
|
+
var hook_action_input2 = exports_external.discriminatedUnion("kind", [
|
|
25175
|
+
exports_external.object({ kind: exports_external.literal("webhook"), url: exports_external.string().url(), secret: exports_external.string().min(1).optional() }),
|
|
25176
|
+
exports_external.object({
|
|
25177
|
+
kind: exports_external.literal("vault"),
|
|
25178
|
+
scope: exports_external.string().min(1),
|
|
25179
|
+
op: exports_external.string().min(1),
|
|
25180
|
+
args: exports_external.record(exports_external.string(), exports_external.unknown()).optional()
|
|
25181
|
+
}),
|
|
25182
|
+
exports_external.object({ kind: exports_external.literal("pipeline"), package_id: exports_external.string().min(1) })
|
|
25183
|
+
]);
|
|
25184
|
+
var hook_action_stored2 = exports_external.discriminatedUnion("kind", [
|
|
25185
|
+
exports_external.object({ kind: exports_external.literal("webhook"), url: exports_external.string().url(), secret_encrypted: exports_external.string().optional() }),
|
|
25186
|
+
exports_external.object({
|
|
25187
|
+
kind: exports_external.literal("vault"),
|
|
25188
|
+
scope: exports_external.string().min(1),
|
|
25189
|
+
op: exports_external.string().min(1),
|
|
25190
|
+
args: exports_external.record(exports_external.string(), exports_external.unknown()).optional()
|
|
25191
|
+
}),
|
|
25192
|
+
exports_external.object({ kind: exports_external.literal("pipeline"), package_id: exports_external.string().min(1) })
|
|
25193
|
+
]);
|
|
25194
|
+
var hook_action_public2 = exports_external.discriminatedUnion("kind", [
|
|
25195
|
+
exports_external.object({ kind: exports_external.literal("webhook"), url: exports_external.string().url(), has_secret: exports_external.boolean() }),
|
|
25196
|
+
exports_external.object({
|
|
25197
|
+
kind: exports_external.literal("vault"),
|
|
25198
|
+
scope: exports_external.string().min(1),
|
|
25199
|
+
op: exports_external.string().min(1),
|
|
25200
|
+
args: exports_external.record(exports_external.string(), exports_external.unknown()).optional()
|
|
25201
|
+
}),
|
|
25202
|
+
exports_external.object({ kind: exports_external.literal("pipeline"), package_id: exports_external.string().min(1) })
|
|
25203
|
+
]);
|
|
25204
|
+
var upsert_hook2 = exports_external.object({
|
|
25205
|
+
id: exports_external.string().optional(),
|
|
25206
|
+
project_id: exports_external.string(),
|
|
25207
|
+
enabled: exports_external.boolean().default(true),
|
|
25208
|
+
trigger: hook_trigger2,
|
|
25209
|
+
action: hook_action_input2
|
|
25210
|
+
});
|
|
24855
25211
|
|
|
24856
25212
|
// src/graph-commands.ts
|
|
24857
25213
|
async function print_json(data) {
|
|
@@ -24980,7 +25336,7 @@ async function resolve_owner_id2(client) {
|
|
|
24980
25336
|
// src/task-response.ts
|
|
24981
25337
|
init_zod();
|
|
24982
25338
|
var task_mutation_response = exports_external.object({
|
|
24983
|
-
task: exports_external.object({ id: exports_external.string(), title: exports_external.string() }).passthrough()
|
|
25339
|
+
task: exports_external.object({ id: exports_external.string(), title: exports_external.string(), rev: exports_external.number().int().optional() }).passthrough()
|
|
24984
25340
|
}).passthrough();
|
|
24985
25341
|
function parse_task_response(data) {
|
|
24986
25342
|
const parsed = task_mutation_response.safeParse(data);
|
|
@@ -25211,23 +25567,28 @@ tasks.command("update <id>").description("Update a task (partial \u2014 only pro
|
|
|
25211
25567
|
handleError(error);
|
|
25212
25568
|
}
|
|
25213
25569
|
});
|
|
25214
|
-
tasks.command("done <id>").description("Mark a task as done").action(async (id3) => {
|
|
25570
|
+
tasks.command("done <id>").description("Mark a task as done through the completion engine (bubbles an auto_children cascade up the tree)").option("--json", "Print the raw { completed, bubbled, hooks_fired } response as JSON instead of a summary").action(async (id3, options) => {
|
|
25215
25571
|
const spinner = make_spinner2("Marking task as done...").start();
|
|
25216
25572
|
try {
|
|
25217
|
-
const
|
|
25218
|
-
|
|
25573
|
+
const get_tool = getTool("devpad_tasks_get");
|
|
25574
|
+
const done_tool = getTool("devpad_tasks_done");
|
|
25575
|
+
if (!get_tool || !done_tool)
|
|
25219
25576
|
throw new Error("Tool not found");
|
|
25220
25577
|
const client = getApiClient();
|
|
25221
|
-
const
|
|
25222
|
-
|
|
25223
|
-
|
|
25224
|
-
|
|
25225
|
-
|
|
25226
|
-
|
|
25227
|
-
|
|
25228
|
-
|
|
25578
|
+
const current = parse_task_response(await get_tool.execute(client, { id: id3 }));
|
|
25579
|
+
if (current.task.rev === undefined)
|
|
25580
|
+
throw new Error("Task response is missing rev");
|
|
25581
|
+
const result = await done_tool.execute(client, { id: id3, base_rev: current.task.rev });
|
|
25582
|
+
if (options.json) {
|
|
25583
|
+
spinner.stop();
|
|
25584
|
+
console.log(JSON.stringify(result, null, 2));
|
|
25585
|
+
return;
|
|
25586
|
+
}
|
|
25587
|
+
const bubbled = Array.isArray(result.bubbled) ? result.bubbled : [];
|
|
25588
|
+
const bubbled_note = bubbled.length > 0 ? ` (+${String(bubbled.length)} bubbled: ${bubbled.map((b) => b.task.title).join(", ")})` : "";
|
|
25589
|
+
spinner.succeed(`Task "${current.task.title}" marked as done${bubbled_note}`);
|
|
25229
25590
|
} catch (error) {
|
|
25230
|
-
spinner.fail("Failed to
|
|
25591
|
+
spinner.fail("Failed to mark task as done");
|
|
25231
25592
|
handleError(error);
|
|
25232
25593
|
}
|
|
25233
25594
|
});
|
|
@@ -25406,6 +25767,52 @@ github.command("branches <owner> <repo>").description("List branches for a GitHu
|
|
|
25406
25767
|
handleError(error);
|
|
25407
25768
|
}
|
|
25408
25769
|
});
|
|
25770
|
+
var keysCmd = program2.command("keys").description("Manage API keys");
|
|
25771
|
+
keysCmd.command("list").description("List your API keys").option("-f, --format <format>", "Output format (json|table)", "json").action(async (options) => {
|
|
25772
|
+
const spinner = make_spinner2("Fetching API keys...").start();
|
|
25773
|
+
try {
|
|
25774
|
+
const client = getApiClient();
|
|
25775
|
+
const result = await client.auth.keys.list();
|
|
25776
|
+
if (!result.ok)
|
|
25777
|
+
throw new Error(result.error.message);
|
|
25778
|
+
spinner.succeed("API keys fetched");
|
|
25779
|
+
await formatOutput(result.value, options.format);
|
|
25780
|
+
} catch (error) {
|
|
25781
|
+
spinner.fail("Failed to fetch API keys");
|
|
25782
|
+
handleError(error);
|
|
25783
|
+
}
|
|
25784
|
+
});
|
|
25785
|
+
keysCmd.command("create").description("Create a new API key").option("-n, --name <name>", "Key name").option("-s, --scope <scope>", "Key scope (devpad|blog|media|pulse|all)", "devpad").option("-p, --project <id>", "Scope this key to a single project (least privilege \u2014 omit for an all-projects key)").option("-f, --format <format>", "Output format (json|table)", "json").action(async (options) => {
|
|
25786
|
+
const spinner = make_spinner2("Creating API key...").start();
|
|
25787
|
+
try {
|
|
25788
|
+
const client = getApiClient();
|
|
25789
|
+
const result = await client.auth.keys.create({
|
|
25790
|
+
name: options.name,
|
|
25791
|
+
scope: options.scope,
|
|
25792
|
+
project_id: options.project
|
|
25793
|
+
});
|
|
25794
|
+
if (!result.ok)
|
|
25795
|
+
throw new Error(result.error.message);
|
|
25796
|
+
spinner.succeed("API key created \u2014 save the raw key now, it won't be shown again");
|
|
25797
|
+
await formatOutput(result.value, options.format);
|
|
25798
|
+
} catch (error) {
|
|
25799
|
+
spinner.fail("Failed to create API key");
|
|
25800
|
+
handleError(error);
|
|
25801
|
+
}
|
|
25802
|
+
});
|
|
25803
|
+
keysCmd.command("revoke <id>").description("Revoke an API key").action(async (id3) => {
|
|
25804
|
+
const spinner = make_spinner2("Revoking API key...").start();
|
|
25805
|
+
try {
|
|
25806
|
+
const client = getApiClient();
|
|
25807
|
+
const result = await client.auth.keys.revoke(id3);
|
|
25808
|
+
if (!result.ok)
|
|
25809
|
+
throw new Error(result.error.message);
|
|
25810
|
+
spinner.succeed("API key revoked");
|
|
25811
|
+
} catch (error) {
|
|
25812
|
+
spinner.fail("Failed to revoke API key");
|
|
25813
|
+
handleError(error);
|
|
25814
|
+
}
|
|
25815
|
+
});
|
|
25409
25816
|
var user3 = program2.command("user").description("User preferences and history");
|
|
25410
25817
|
user3.command("history").description("Get user activity history").option("-f, --format <format>", "Output format (json|table)", "json").action(async (options) => {
|
|
25411
25818
|
const spinner = make_spinner2("Fetching user history...").start();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devpad/cli",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.5",
|
|
4
4
|
"description": "Command line interface for devpad project management",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
"mime": "^3.0.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@devpad/api": "^2.3.
|
|
54
|
-
"@devpad/pipeline-fakes": "^2.3.
|
|
55
|
-
"@devpad/pipeline-templates": "^2.3.
|
|
56
|
-
"@devpad/schema": "^2.3.
|
|
53
|
+
"@devpad/api": "^2.3.5",
|
|
54
|
+
"@devpad/pipeline-fakes": "^2.3.5",
|
|
55
|
+
"@devpad/pipeline-templates": "^2.3.5",
|
|
56
|
+
"@devpad/schema": "^2.3.5",
|
|
57
57
|
"@types/node": "^20.11.24",
|
|
58
58
|
"bun-types": "latest",
|
|
59
59
|
"chalk": "^5.3.0",
|