@devpad/api 2.4.2 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1083,6 +1083,7 @@ var upsert_hook = z.object({
1083
1083
  trigger: hook_trigger,
1084
1084
  action: hook_action_input
1085
1085
  });
1086
+ var toggle_hook_enabled = z.object({ enabled: z.boolean() });
1086
1087
 
1087
1088
  export {
1088
1089
  GRAPH_DEPTH_CAP,
@@ -1157,5 +1158,6 @@ export {
1157
1158
  hook_action_input,
1158
1159
  hook_action_stored,
1159
1160
  hook_action_public,
1160
- upsert_hook
1161
+ upsert_hook,
1162
+ toggle_hook_enabled
1161
1163
  };
package/dist/index.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  import { G as PostListParams, T as PostsResponse, x as Post, D as PostCreate, Q as PostUpdate, Z as VersionInfo, y as PostContent, C as Category, k as CategoryCreate, A as AccessKey } from './types.d-DbgtG-w1.js';
2
2
  import { ai as Profile, u as CreateProfileInput, aw as UpdateProfileInput, aj as ProfileFilter, c as AddFilterInput, aq as Timeline, A as Account, ae as PlatformSettings } from './types.d-CpUFC2tW.js';
3
3
  import { z } from 'zod';
4
- import { c as ApiKey, O as Project, aB as UpsertProject, G as GetConfigResult, a0 as SaveConfigRequest, am as TodoUpdate, H as HistoryAction, M as Milestone, o as Goal, p as Hook, v as HookTrigger, r as HookActionPublic, at as UpsertHook, t as HookDelivery, ai as TaskWithDetails, aE as UpsertTodo, aC as UpsertTag, ab as Task, ae as TaskLink, C as ClaimRequest, m as DoneRequest, a as AdvanceStageRequest, aD as UpsertTaskLink, f as ApplyRequest, e as ApplyOp, aa as TagWithTypedColor, l as Document, S as PushDocRequest, al as ThreadMarker, i as CreateThreadRequest, b as AnnotationThread, T as PushInterfaceReportRequest, y as InterfaceDiffClass, a4 as Signoff, W as RequestCheckpointRequest, k as DecideCheckpointRequest, X as ReviewItem, D as DashboardResponse, K as PipelineRun, L as PipelineStageEvent, B as PipelineGrant, J as PipelinePackage, P as PipelineAnalysisTemplate, F as PipelineOidcTrust } from './types.d-BIJAwHaZ.js';
5
- export { Q as ProjectConfig, Y as ReviewItemKind } from './types.d-BIJAwHaZ.js';
4
+ import { c as ApiKey, O as Project, aC as UpsertProject, G as GetConfigResult, a0 as SaveConfigRequest, am as TodoUpdate, H as HistoryAction, M as Milestone, ab as Task, o as Goal, p as Hook, v as HookTrigger, r as HookActionPublic, au as UpsertHook, t as HookDelivery, ai as TaskWithDetails, aF as UpsertTodo, aD as UpsertTag, ae as TaskLink, C as ClaimRequest, m as DoneRequest, a as AdvanceStageRequest, aE as UpsertTaskLink, f as ApplyRequest, e as ApplyOp, aa as TagWithTypedColor, l as Document, S as PushDocRequest, al as ThreadMarker, i as CreateThreadRequest, b as AnnotationThread, T as PushInterfaceReportRequest, y as InterfaceDiffClass, a4 as Signoff, W as RequestCheckpointRequest, k as DecideCheckpointRequest, X as ReviewItem, D as DashboardResponse, K as PipelineRun, L as PipelineStageEvent, B as PipelineGrant, J as PipelinePackage, P as PipelineAnalysisTemplate, F as PipelineOidcTrust } from './types.d-DzYEyM4R.js';
5
+ export { Q as ProjectConfig, Y as ReviewItemKind } from './types.d-DzYEyM4R.js';
6
6
  import { Result } from '@f0rbit/corpus';
7
7
  export { Result, err, ok } from '@f0rbit/corpus';
8
- import { H as HookDeliveryStatus, C as CompletedVia, i as StageEventKind } from './schema.d-CaVQ-Ate.js';
8
+ import { b as CompletionPolicy, H as HookDeliveryStatus, C as CompletedVia, i as StageEventKind } from './schema.d-CaVQ-Ate.js';
9
9
  import 'drizzle-orm';
10
10
  import './media.d-R87HGuRp.js';
11
11
  import 'drizzle-orm/sqlite-core';
@@ -733,6 +733,10 @@ type FoldVerifyReport = {
733
733
  diffs: FoldDiff[];
734
734
  clean: boolean;
735
735
  };
736
+ type ReconcileCssReport = {
737
+ scanned: number;
738
+ reconciled: string[];
739
+ };
736
740
  type ReadyResponse = {
737
741
  items: Task[];
738
742
  next_cursor: string | null;
@@ -762,6 +766,21 @@ type NearResponse = {
762
766
  tasks: Task[];
763
767
  rollups: Partial<Record<string, RollupCounts>>;
764
768
  };
769
+ /** v2.4 (B2 critic carry-over) — the milestone lens's one batched read; see `packages/core/src/services/milestones.ts`'s `MilestoneLens`. */
770
+ type MilestoneLensRow = {
771
+ milestone: Milestone;
772
+ completion_policy: CompletionPolicy;
773
+ rollup: RollupCounts | undefined;
774
+ edge: EdgeSummary | undefined;
775
+ descendants: Task[];
776
+ };
777
+ type MilestoneLensResponse = {
778
+ rows: MilestoneLensRow[];
779
+ blocks: {
780
+ src_id: string;
781
+ dst_id: string;
782
+ }[];
783
+ };
765
784
  type ApplyOpResult = {
766
785
  op: ApplyOp["op"];
767
786
  id: string;
@@ -989,6 +1008,13 @@ declare class ApiClient {
989
1008
  * Get milestones by project ID
990
1009
  */
991
1010
  getByProject: (project_id: string) => Promise<ApiResult<Milestone[]>>;
1011
+ /**
1012
+ * v2.4 (B2 critic carry-over) — the milestone lens's one batched read:
1013
+ * rollups/edge-summaries computed once across every milestone's
1014
+ * combined subtree, plus the real `blocks` edges between milestones for
1015
+ * the lens's sequencing arrows. Replaces N `tasks.tree()` calls.
1016
+ */
1017
+ lens: (project_id: string, depth?: number) => Promise<ApiResult<MilestoneLensResponse>>;
992
1018
  /**
993
1019
  * Get milestone by ID
994
1020
  */
@@ -1036,6 +1062,8 @@ declare class ApiClient {
1036
1062
  delete: (id: string) => Promise<ApiResult<{
1037
1063
  success: boolean;
1038
1064
  }>>;
1065
+ /** v2.4 (B3.4) — settings panel enable/disable toggle; never touches trigger/action (see registry.ts's `set_hook_enabled`). */
1066
+ setEnabled: (id: string, enabled: boolean) => Promise<ApiResult<PublicHook>>;
1039
1067
  deliveries: (id: string, status?: HookDeliveryStatus) => Promise<ApiResult<HookDelivery[]>>;
1040
1068
  };
1041
1069
  /**
@@ -1210,6 +1238,14 @@ declare class ApiClient {
1210
1238
  pull: (id: string, version?: string) => Promise<ApiResult<PullDocResponse>>;
1211
1239
  /** Full version history, newest first — the lineage walk. */
1212
1240
  versions: (id: string) => Promise<ApiResult<DocVersionInfo[]>>;
1241
+ /**
1242
+ * v2.4 (B3.1) — the DocViewer's sandboxed-iframe `src`: a standalone
1243
+ * HTML document with its own CSP (defense in depth over
1244
+ * sanitize-on-push), never a JSON payload injected into the main app's
1245
+ * DOM. Not a `fetch` call — the browser navigates the iframe here
1246
+ * directly, carrying the same session cookie as any same-origin nav.
1247
+ */
1248
+ renderUrl: (id: string, version?: string) => string;
1213
1249
  /**
1214
1250
  * Annotation engine (task A4.2) — markers-in-doc threads. Every
1215
1251
  * mutation pushes a new corpus version; the doc itself is the thread
@@ -1250,6 +1286,12 @@ declare class ApiClient {
1250
1286
  task_id: string;
1251
1287
  }>>;
1252
1288
  find: (id: string) => Promise<ApiResult<Signoff>>;
1289
+ /** v2.4 (B3) — the pending (undecided) signoff for a subject+checkpoint, or `null` if none has been requested yet. */
1290
+ findPending: (filters: {
1291
+ subject_kind: "doc_version" | "stage";
1292
+ subject_id: string;
1293
+ checkpoint: "plan" | "types" | "design";
1294
+ }) => Promise<ApiResult<Signoff | null>>;
1253
1295
  decide: (id: string, data: DecideCheckpointRequest) => Promise<ApiResult<Signoff>>;
1254
1296
  };
1255
1297
  /**
@@ -1413,6 +1455,8 @@ declare class ApiClient {
1413
1455
  /** v2.4 (task A5.3) — the fold's dual-read verification verb. */
1414
1456
  readonly admin: {
1415
1457
  verifyFold: () => Promise<ApiResult<FoldVerifyReport>>;
1458
+ /** v2.4 (B3, CSS-exfil fix) — re-scrubs `<style>` blocks in every already-stored doc the caller owns. */
1459
+ reconcileDocsCss: () => Promise<ApiResult<ReconcileCssReport>>;
1416
1460
  };
1417
1461
  readonly user: {
1418
1462
  /**
@@ -1909,4 +1953,4 @@ declare const tools: Record<string, ToolDefinition>;
1909
1953
  declare const toolNames: string[];
1910
1954
  declare function getTool(name: string): ToolDefinition | undefined;
1911
1955
 
1912
- export { AccessKey, Account, AddFilterInput, ApiClient, ApiError, type ApiResult, type ApiResultError, type ApplyResponse, type AuthMode, AuthenticationError, type BubbleStep, Category, CategoryCreate, CreateProfileInput, DecideCheckpointRequest, type DoneResponse, type EdgeSummary, Milestone, NetworkError, PlatformSettings, Post, PostContent, PostCreate, PostListParams, PostUpdate, PostsResponse, Profile, ProfileFilter, Project, type PublicHook, type PulseErrorIssue, type PulseErrorsResult, type PulseEventRow, type PulseEventsPage, type PulseLatencyByMinute, type PulseLatencyResult, type PulseLogsResult, type PulseSummary, type PulseSummaryByDay, type RequestHistoryEntry, type RequestOptions, ReviewItem, type RollupCounts, SaveConfigRequest, Signoff, Task, TaskWithDetails, Timeline, type ToolDefinition, UpdateProfileInput, UpsertProject, UpsertTag, UpsertTodo, ValidationError, VersionInfo, ApiClient as default, getTool, getUserFriendlyErrorMessage, parseZodErrors, pulseSummaryHasData, toolNames, tools, wrap };
1956
+ export { AccessKey, Account, AddFilterInput, ApiClient, ApiError, type ApiResult, type ApiResultError, type ApplyResponse, type AuthMode, AuthenticationError, type BubbleStep, Category, CategoryCreate, CreateProfileInput, DecideCheckpointRequest, type DocContent, type DocVersionInfo, type DoneResponse, type EdgeSummary, Milestone, type MilestoneLensResponse, type MilestoneLensRow, NetworkError, PlatformSettings, Post, PostContent, PostCreate, PostListParams, PostUpdate, PostsResponse, Profile, ProfileFilter, Project, type PublicHook, type PullDocResponse, type PulseErrorIssue, type PulseErrorsResult, type PulseEventRow, type PulseEventsPage, type PulseLatencyByMinute, type PulseLatencyResult, type PulseLogsResult, type PulseSummary, type PulseSummaryByDay, type PushInterfaceReportResult, type RequestHistoryEntry, type RequestOptions, ReviewItem, type RollupCounts, SaveConfigRequest, Signoff, Task, TaskWithDetails, Timeline, type ToolDefinition, UpdateProfileInput, UpsertProject, UpsertTag, UpsertTodo, ValidationError, VersionInfo, ApiClient as default, getTool, getUserFriendlyErrorMessage, parseZodErrors, pulseSummaryHasData, toolNames, tools, wrap };
package/dist/index.js CHANGED
@@ -16,7 +16,7 @@ import {
16
16
  upsert_project,
17
17
  upsert_task_link,
18
18
  upsert_todo
19
- } from "./chunk-HWPYBI52.js";
19
+ } from "./chunk-T36ENKOA.js";
20
20
  import {
21
21
  CategoryCreateSchema,
22
22
  PostCreateSchema,
@@ -701,6 +701,17 @@ var ApiClient2 = class {
701
701
  * Get milestones by project ID
702
702
  */
703
703
  getByProject: (project_id) => wrap(() => this.clients.milestones.get(`/projects/${project_id}/milestones`)),
704
+ /**
705
+ * v2.4 (B2 critic carry-over) — the milestone lens's one batched read:
706
+ * rollups/edge-summaries computed once across every milestone's
707
+ * combined subtree, plus the real `blocks` edges between milestones for
708
+ * the lens's sequencing arrows. Replaces N `tasks.tree()` calls.
709
+ */
710
+ lens: (project_id, depth) => wrap(
711
+ () => this.clients.milestones.get(`/projects/${project_id}/milestones/lens`, {
712
+ query: depth ? { depth: String(depth) } : {}
713
+ })
714
+ ),
704
715
  /**
705
716
  * Get milestone by ID
706
717
  */
@@ -755,6 +766,8 @@ var ApiClient2 = class {
755
766
  () => data.id ? this.clients.hooks.patch(`/hooks/${data.id}`, { body: data }) : this.clients.hooks.post("/hooks", { body: data })
756
767
  ),
757
768
  delete: (id) => wrap(() => this.clients.hooks.delete(`/hooks/${id}`)),
769
+ /** v2.4 (B3.4) — settings panel enable/disable toggle; never touches trigger/action (see registry.ts's `set_hook_enabled`). */
770
+ setEnabled: (id, enabled) => wrap(() => this.clients.hooks.patch(`/hooks/${id}/enabled`, { body: { enabled } })),
758
771
  deliveries: (id, status) => wrap(
759
772
  () => this.clients.hooks.get(`/hooks/${id}/deliveries`, status ? { query: { status } } : {})
760
773
  )
@@ -962,6 +975,17 @@ var ApiClient2 = class {
962
975
  pull: (id, version) => wrap(() => this.clients.docs.get(`/docs/${id}`, version ? { query: { version } } : {})),
963
976
  /** Full version history, newest first — the lineage walk. */
964
977
  versions: (id) => wrap(() => this.clients.docs.get(`/docs/${id}/versions`)),
978
+ /**
979
+ * v2.4 (B3.1) — the DocViewer's sandboxed-iframe `src`: a standalone
980
+ * HTML document with its own CSP (defense in depth over
981
+ * sanitize-on-push), never a JSON payload injected into the main app's
982
+ * DOM. Not a `fetch` call — the browser navigates the iframe here
983
+ * directly, carrying the same session cookie as any same-origin nav.
984
+ */
985
+ renderUrl: (id, version) => {
986
+ const query = version ? `?version=${encodeURIComponent(version)}` : "";
987
+ return `${this.clients.docs.url()}/docs/${id}/render${query}`;
988
+ },
965
989
  /**
966
990
  * Annotation engine (task A4.2) — markers-in-doc threads. Every
967
991
  * mutation pushes a new corpus version; the doc itself is the thread
@@ -1005,6 +1029,8 @@ var ApiClient2 = class {
1005
1029
  this.signoffs = {
1006
1030
  request: (data) => wrap(() => this.clients.signoffs.post("/signoffs", { body: data })),
1007
1031
  find: (id) => wrap(() => this.clients.signoffs.get(`/signoffs/${id}`)),
1032
+ /** v2.4 (B3) — the pending (undecided) signoff for a subject+checkpoint, or `null` if none has been requested yet. */
1033
+ findPending: (filters) => wrap(() => this.clients.signoffs.get("/signoffs", { query: filters })),
1008
1034
  decide: (id, data) => wrap(() => this.clients.signoffs.post(`/signoffs/${id}/decide`, { body: data }))
1009
1035
  };
1010
1036
  /**
@@ -1180,7 +1206,9 @@ var ApiClient2 = class {
1180
1206
  };
1181
1207
  /** v2.4 (task A5.3) — the fold's dual-read verification verb. */
1182
1208
  this.admin = {
1183
- verifyFold: () => wrap(() => this.clients.admin.get("/admin/verify-fold"))
1209
+ verifyFold: () => wrap(() => this.clients.admin.get("/admin/verify-fold")),
1210
+ /** v2.4 (B3, CSS-exfil fix) — re-scrubs `<style>` blocks in every already-stored doc the caller owns. */
1211
+ reconcileDocsCss: () => wrap(() => this.clients.admin.post("/admin/reconcile-docs-css"))
1184
1212
  };
1185
1213
  this.user = {
1186
1214
  /**
@@ -1959,6 +1987,13 @@ var tools = {
1959
1987
  inputSchema: z2.object({}),
1960
1988
  execute: async (client) => unwrap(await client.admin.verifyFold())
1961
1989
  }),
1990
+ // Admin (B3, CSS-exfil fix) — repair docs pushed before the sanitizer scrubbed <style> blocks
1991
+ devpad_admin_reconcile_docs_css: define_tool({
1992
+ name: "devpad_admin_reconcile_docs_css",
1993
+ description: "Re-scrub CSS exfil vectors (@import, url()) out of every already-stored doc's <style> blocks for the authenticated account's own projects",
1994
+ inputSchema: z2.object({}),
1995
+ execute: async (client) => unwrap(await client.admin.reconcileDocsCss())
1996
+ }),
1962
1997
  // Additional project operations
1963
1998
  devpad_projects_delete: define_tool({
1964
1999
  name: "devpad_projects_delete",
@@ -1,5 +1,5 @@
1
1
  export { A as ApiError, a as ApprovalChannelError, b as AuthExpiredError, B as BadRequestError, c as BaseError, C as ConflictError, d as CronError, D as DatabaseError, E as EncryptionError, e as ErrorContext, f as ErrorLogEntry, F as ForbiddenError, G as GithubError, N as NetworkError, g as NotFoundError, P as ParseError, h as ProtectedError, i as ProviderError, R as RateLimitedError, S as ScanError, j as ServiceError, k as StoreError, U as UnauthorizedError, V as ValidationError, l as ValidationFieldError, m as apiError, n as approvalChannel, o as authExpired, p as badRequest, q as configureErrorLogging, r as conflict, s as dbError, t as encryptionError, u as errors, v as forbidden, w as githubError, x as isApiError, y as isApprovalChannelError, z as isAuthExpiredError, H as isBadRequestError, I as isConflictError, J as isDatabaseError, K as isEncryptionError, L as isForbiddenError, M as isGithubError, O as isNetworkError, Q as isNotFoundError, T as isParseError, W as isProtectedError, X as isRateLimitedError, Y as isRetryableError, Z as isScanError, _ as isServiceError, $ as isStoreError, a0 as isUnauthorizedError, a1 as isValidationError, a2 as isValidationFieldError, a3 as networkError, a4 as notFound, a5 as parseError, a6 as protectedEntity, a7 as rateLimited, a8 as scanError, a9 as storeError, aa as unauthorized, ab as validation, ac as validationFieldError } from '../errors.d-BUNZEN7j.js';
2
- export { A as Action, a as AdvanceStageRequest, b as AnnotationThread, c as ApiKey, d as ApplyLog, e as ApplyOp, f as ApplyRequest, C as ClaimRequest, g as CodebaseTask, h as ConfigSchemaType, i as CreateThreadRequest, D as DashboardResponse, j as DashboardWindowQuery, k as DecideCheckpointRequest, l as Document, m as DoneRequest, E as ExternalRef, G as GetConfigResult, n as GithubWebhookEvent, o as Goal, H as HistoryAction, p as Hook, q as HookActionInput, r as HookActionPublic, s as HookActionStored, t as HookDelivery, u as HookSelector, v as HookTrigger, I as INTERFACE_DIFF_CLASSES, w as IgnorePath, x as InsertPipelineStageEvent, y as InterfaceDiffClass, M as Milestone, N as Nullable, P as PipelineAnalysisTemplate, z as PipelineApproval, B as PipelineGrant, F as PipelineOidcTrust, J as PipelinePackage, K as PipelineRun, L as PipelineStageEvent, O as Project, Q as ProjectConfig, R as ProjectWithTasks, S as PushDocRequest, T as PushInterfaceReportRequest, U as REVIEW_ITEM_KINDS, V as ReplyThreadRequest, W as RequestCheckpointRequest, X as ReviewItem, Y as ReviewItemKind, Z as ReviewsPendingResponse, _ as RolloutShapeZ, $ as RunKindZ, a0 as SaveConfigRequest, a1 as ScanDiffProposal, a2 as ScanStatus, a3 as Session, a4 as Signoff, a5 as TAG_COLOURS, a6 as Tag, a7 as TagColor, a8 as TagConfig, a9 as TagWithColor, aa as TagWithTypedColor, ab as Task, ac as TaskEvent, ad as TaskEventPayload, ae as TaskLink, af as TaskRollup, ag as TaskTag, ah as TaskView, ai as TaskWithDetails, aj as ThreadAnchor, ak as ThreadEntry, al as ThreadMarker, am as TodoUpdate, an as ToggleBlockingRequest, ao as TrackerResult, ap as UpdateAction, aq as UpdateData, ar as UpdateUser, as as UpsertGoal, at as UpsertHook, au as UpsertMilestone, av as UpsertPipelineAnalysisTemplate, aw as UpsertPipelineApproval, ax as UpsertPipelineGrant, ay as UpsertPipelineOidcTrust, az as UpsertPipelinePackage, aA as UpsertPipelineRun, aB as UpsertProject, aC as UpsertTag, aD as UpsertTaskLink, aE as UpsertTodo, aF as User, aG as WebhookEventBody, aH as advance_stage_request, aI as apply_op, aJ as apply_request, aK as approval_decision, aL as claim_request, aM as config_schema, aN as create_thread_request, aO as dashboard_response, aP as dashboard_window_query, aQ as decide_checkpoint_request, aR as document_kind, aS as done_request, aT as external_ref, aU as forced_atomic_reason, aV as gate_descriptor, aW as grant_scope, aX as hook_action_input, aY as hook_action_public, aZ as hook_action_stored, a_ as hook_selector, a$ as hook_trigger, b0 as insert_pipeline_stage_event, b1 as pipeline_oidc_provider, b2 as project_config, b3 as push_doc_request, b4 as push_interface_report_request, b5 as reply_thread_request, b6 as request_checkpoint_request, b7 as resolved_gates, b8 as resolved_rollout, b9 as review_item, ba as reviews_pending_response, bb as rollout_shape, bc as rollout_stage, bd as run_kind, be as run_status, bf as save_config_request, bg as save_tags_request, bh as scan_diff_proposal, bi as sdlc_stage, bj as signoff_checkpoint, bk as signoff_subject_kind, bl as stage_event_kind, bm as task_event_actor, bn as task_event_payload, bo as task_link_kind, bp as thread_anchor, bq as thread_entry, br as thread_marker, bs as thread_status, bt as toggle_blocking_request, bu as update_action, bv as update_user, bw as upsert_goal, bx as upsert_hook, by as upsert_milestone, bz as upsert_pipeline_analysis_template, bA as upsert_pipeline_approval, bB as upsert_pipeline_grant, bC as upsert_pipeline_oidc_trust, bD as upsert_pipeline_package, bE as upsert_pipeline_run, bF as upsert_project, bG as upsert_tag, bH as upsert_task_link, bI as upsert_todo, bJ as webhook_event_body } from '../types.d-BIJAwHaZ.js';
2
+ export { A as Action, a as AdvanceStageRequest, b as AnnotationThread, c as ApiKey, d as ApplyLog, e as ApplyOp, f as ApplyRequest, C as ClaimRequest, g as CodebaseTask, h as ConfigSchemaType, i as CreateThreadRequest, D as DashboardResponse, j as DashboardWindowQuery, k as DecideCheckpointRequest, l as Document, m as DoneRequest, E as ExternalRef, G as GetConfigResult, n as GithubWebhookEvent, o as Goal, H as HistoryAction, p as Hook, q as HookActionInput, r as HookActionPublic, s as HookActionStored, t as HookDelivery, u as HookSelector, v as HookTrigger, I as INTERFACE_DIFF_CLASSES, w as IgnorePath, x as InsertPipelineStageEvent, y as InterfaceDiffClass, M as Milestone, N as Nullable, P as PipelineAnalysisTemplate, z as PipelineApproval, B as PipelineGrant, F as PipelineOidcTrust, J as PipelinePackage, K as PipelineRun, L as PipelineStageEvent, O as Project, Q as ProjectConfig, R as ProjectWithTasks, S as PushDocRequest, T as PushInterfaceReportRequest, U as REVIEW_ITEM_KINDS, V as ReplyThreadRequest, W as RequestCheckpointRequest, X as ReviewItem, Y as ReviewItemKind, Z as ReviewsPendingResponse, _ as RolloutShapeZ, $ as RunKindZ, a0 as SaveConfigRequest, a1 as ScanDiffProposal, a2 as ScanStatus, a3 as Session, a4 as Signoff, a5 as TAG_COLOURS, a6 as Tag, a7 as TagColor, a8 as TagConfig, a9 as TagWithColor, aa as TagWithTypedColor, ab as Task, ac as TaskEvent, ad as TaskEventPayload, ae as TaskLink, af as TaskRollup, ag as TaskTag, ah as TaskView, ai as TaskWithDetails, aj as ThreadAnchor, ak as ThreadEntry, al as ThreadMarker, am as TodoUpdate, an as ToggleBlockingRequest, ao as ToggleHookEnabled, ap as TrackerResult, aq as UpdateAction, ar as UpdateData, as as UpdateUser, at as UpsertGoal, au as UpsertHook, av as UpsertMilestone, aw as UpsertPipelineAnalysisTemplate, ax as UpsertPipelineApproval, ay as UpsertPipelineGrant, az as UpsertPipelineOidcTrust, aA as UpsertPipelinePackage, aB as UpsertPipelineRun, aC as UpsertProject, aD as UpsertTag, aE as UpsertTaskLink, aF as UpsertTodo, aG as User, aH as WebhookEventBody, aI as advance_stage_request, aJ as apply_op, aK as apply_request, aL as approval_decision, aM as claim_request, aN as config_schema, aO as create_thread_request, aP as dashboard_response, aQ as dashboard_window_query, aR as decide_checkpoint_request, aS as document_kind, aT as done_request, aU as external_ref, aV as forced_atomic_reason, aW as gate_descriptor, aX as grant_scope, aY as hook_action_input, aZ as hook_action_public, a_ as hook_action_stored, a$ as hook_selector, b0 as hook_trigger, b1 as insert_pipeline_stage_event, b2 as pipeline_oidc_provider, b3 as project_config, b4 as push_doc_request, b5 as push_interface_report_request, b6 as reply_thread_request, b7 as request_checkpoint_request, b8 as resolved_gates, b9 as resolved_rollout, ba as review_item, bb as reviews_pending_response, bc as rollout_shape, bd as rollout_stage, be as run_kind, bf as run_status, bg as save_config_request, bh as save_tags_request, bi as scan_diff_proposal, bj as sdlc_stage, bk as signoff_checkpoint, bl as signoff_subject_kind, bm as stage_event_kind, bn as task_event_actor, bo as task_event_payload, bp as task_link_kind, bq as thread_anchor, br as thread_entry, bs as thread_marker, bt as thread_status, bu as toggle_blocking_request, bv as toggle_hook_enabled, bw as update_action, bx as update_user, by as upsert_goal, bz as upsert_hook, bA as upsert_milestone, bB as upsert_pipeline_analysis_template, bC as upsert_pipeline_approval, bD as upsert_pipeline_grant, bE as upsert_pipeline_oidc_trust, bF as upsert_pipeline_package, bG as upsert_pipeline_run, bH as upsert_project, bI as upsert_tag, bJ as upsert_task_link, bK as upsert_todo, bL as webhook_event_body } from '../types.d-DzYEyM4R.js';
3
3
  export { a as ApprovalDecision, C as CompletedVia, b as CompletionPolicy, D as DocumentKind, c as DocumentStatus, F as ForcedAtomicReason, G as GRAPH_CHILDREN_CAP, d as GRAPH_DEPTH_CAP, H as HookDeliveryStatus, P as PipelineOidcProvider, R as RolloutShape, e as RunStatus, S as SdlcStage, f as SignoffCheckpoint, g as SignoffDecision, h as SignoffSubjectKind, i as StageEventKind, T as TaskEventActor, j as TaskEventDispatchStatus, k as TaskEventKind, l as TaskKind, m as TaskLinkKind, n as ThreadStatus } from '../schema.d-CaVQ-Ate.js';
4
4
  import '@f0rbit/corpus';
5
5
  import 'drizzle-orm';
@@ -54,6 +54,7 @@ import {
54
54
  thread_marker,
55
55
  thread_status,
56
56
  toggle_blocking_request,
57
+ toggle_hook_enabled,
57
58
  update_action,
58
59
  update_user,
59
60
  upsert_goal,
@@ -70,7 +71,7 @@ import {
70
71
  upsert_task_link,
71
72
  upsert_todo,
72
73
  webhook_event_body
73
- } from "../chunk-HWPYBI52.js";
74
+ } from "../chunk-T36ENKOA.js";
74
75
  import {
75
76
  apiError,
76
77
  approvalChannel,
@@ -226,6 +227,7 @@ export {
226
227
  thread_marker,
227
228
  thread_status,
228
229
  toggle_blocking_request,
230
+ toggle_hook_enabled,
229
231
  unauthorized,
230
232
  update_action,
231
233
  update_user,
@@ -1,6 +1,6 @@
1
1
  import { InferSelectModel } from 'drizzle-orm';
2
2
  import { z } from 'zod';
3
- import { q as api_keys, N as project, $ as todo_updates, o as action, A as ActionType, z as milestone, v as goal, w as hook, x as hook_delivery, W as task, s as codebase_tasks, Y as task_link, U as tag, t as document, p as annotation_thread, Q as signoff, L as pipeline_run, M as pipeline_stage_event, I as pipeline_grant, K as pipeline_package, B as pipeline_analysis_template, J as pipeline_oidc_trust, r as apply_log, u as github_webhook_event, y as ignore_path, E as pipeline_approval, O as session, V as tag_config, X as task_event, Z as task_rollup, _ as task_tag, a0 as tracker_result, a1 as user } from './schema.d-CaVQ-Ate.js';
3
+ import { q as api_keys, N as project, $ as todo_updates, o as action, A as ActionType, z as milestone, W as task, v as goal, w as hook, x as hook_delivery, s as codebase_tasks, Y as task_link, U as tag, t as document, p as annotation_thread, Q as signoff, L as pipeline_run, M as pipeline_stage_event, I as pipeline_grant, K as pipeline_package, B as pipeline_analysis_template, J as pipeline_oidc_trust, r as apply_log, u as github_webhook_event, y as ignore_path, E as pipeline_approval, O as session, V as tag_config, X as task_event, Z as task_rollup, _ as task_tag, a0 as tracker_result, a1 as user } from './schema.d-CaVQ-Ate.js';
4
4
 
5
5
  declare const upsert_project: z.ZodObject<{
6
6
  id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
@@ -2936,6 +2936,15 @@ declare const upsert_hook: z.ZodObject<{
2936
2936
  enabled?: boolean | undefined;
2937
2937
  }>;
2938
2938
  type UpsertHook = z.infer<typeof upsert_hook>;
2939
+ /** v2.4 (B3.4) — the settings panel's enable/disable toggle; deliberately NOT `upsert_hook` (see `registry.ts`'s `set_hook_enabled`). */
2940
+ declare const toggle_hook_enabled: z.ZodObject<{
2941
+ enabled: z.ZodBoolean;
2942
+ }, "strip", z.ZodTypeAny, {
2943
+ enabled: boolean;
2944
+ }, {
2945
+ enabled: boolean;
2946
+ }>;
2947
+ type ToggleHookEnabled = z.infer<typeof toggle_hook_enabled>;
2939
2948
 
2940
2949
  type User = InferSelectModel<typeof user>;
2941
2950
  type Session = InferSelectModel<typeof session>;
@@ -3099,4 +3108,4 @@ type UpdateData = {
3099
3108
  type UpdateUser = z.infer<typeof update_user>;
3100
3109
  type ConfigSchemaType = z.infer<typeof config_schema>;
3101
3110
 
3102
- export { type RunKindZ as $, type Action as A, type PipelineGrant as B, type ClaimRequest as C, type DashboardResponse as D, type ExternalRef as E, type PipelineOidcTrust as F, type GetConfigResult as G, type HistoryAction as H, INTERFACE_DIFF_CLASSES as I, type PipelinePackage as J, type PipelineRun as K, type PipelineStageEvent as L, type Milestone as M, type Nullable as N, type Project as O, type PipelineAnalysisTemplate as P, type ProjectConfig as Q, type ProjectWithTasks as R, type PushDocRequest as S, type PushInterfaceReportRequest as T, REVIEW_ITEM_KINDS as U, type ReplyThreadRequest as V, type RequestCheckpointRequest as W, type ReviewItem as X, type ReviewItemKind as Y, type ReviewsPendingResponse as Z, type RolloutShapeZ as _, type AdvanceStageRequest as a, hook_trigger as a$, type SaveConfigRequest as a0, type ScanDiffProposal as a1, type ScanStatus as a2, type Session as a3, type Signoff as a4, TAG_COLOURS as a5, type Tag as a6, type TagColor as a7, type TagConfig as a8, type TagWithColor as a9, type UpsertPipelineRun as aA, type UpsertProject as aB, type UpsertTag as aC, type UpsertTaskLink as aD, type UpsertTodo as aE, type User as aF, type WebhookEventBody as aG, advance_stage_request as aH, apply_op as aI, apply_request as aJ, approval_decision as aK, claim_request as aL, config_schema as aM, create_thread_request as aN, dashboard_response as aO, dashboard_window_query as aP, decide_checkpoint_request as aQ, document_kind as aR, done_request as aS, external_ref as aT, forced_atomic_reason as aU, gate_descriptor as aV, grant_scope as aW, hook_action_input as aX, hook_action_public as aY, hook_action_stored as aZ, hook_selector as a_, type TagWithTypedColor as aa, type Task as ab, type TaskEvent as ac, type TaskEventPayload as ad, type TaskLink as ae, type TaskRollup as af, type TaskTag as ag, type TaskView as ah, type TaskWithDetails as ai, type ThreadAnchor as aj, type ThreadEntry as ak, type ThreadMarker as al, type TodoUpdate as am, type ToggleBlockingRequest as an, type TrackerResult as ao, type UpdateAction as ap, type UpdateData as aq, type UpdateUser as ar, type UpsertGoal as as, type UpsertHook as at, type UpsertMilestone as au, type UpsertPipelineAnalysisTemplate as av, type UpsertPipelineApproval as aw, type UpsertPipelineGrant as ax, type UpsertPipelineOidcTrust as ay, type UpsertPipelinePackage as az, type AnnotationThread as b, insert_pipeline_stage_event as b0, pipeline_oidc_provider as b1, project_config as b2, push_doc_request as b3, push_interface_report_request as b4, reply_thread_request as b5, request_checkpoint_request as b6, resolved_gates as b7, resolved_rollout as b8, review_item as b9, upsert_pipeline_approval as bA, upsert_pipeline_grant as bB, upsert_pipeline_oidc_trust as bC, upsert_pipeline_package as bD, upsert_pipeline_run as bE, upsert_project as bF, upsert_tag as bG, upsert_task_link as bH, upsert_todo as bI, webhook_event_body as bJ, reviews_pending_response as ba, rollout_shape as bb, rollout_stage as bc, run_kind as bd, run_status as be, save_config_request as bf, save_tags_request as bg, scan_diff_proposal as bh, sdlc_stage as bi, signoff_checkpoint as bj, signoff_subject_kind as bk, stage_event_kind as bl, task_event_actor as bm, task_event_payload as bn, task_link_kind as bo, thread_anchor as bp, thread_entry as bq, thread_marker as br, thread_status as bs, toggle_blocking_request as bt, update_action as bu, update_user as bv, upsert_goal as bw, upsert_hook as bx, upsert_milestone as by, upsert_pipeline_analysis_template as bz, type ApiKey as c, type ApplyLog as d, type ApplyOp as e, type ApplyRequest as f, type CodebaseTask as g, type ConfigSchemaType as h, type CreateThreadRequest as i, type DashboardWindowQuery as j, type DecideCheckpointRequest as k, type Document as l, type DoneRequest as m, type GithubWebhookEvent as n, type Goal as o, type Hook as p, type HookActionInput as q, type HookActionPublic as r, type HookActionStored as s, type HookDelivery as t, type HookSelector as u, type HookTrigger as v, type IgnorePath as w, type InsertPipelineStageEvent as x, type InterfaceDiffClass as y, type PipelineApproval as z };
3111
+ export { type RunKindZ as $, type Action as A, type PipelineGrant as B, type ClaimRequest as C, type DashboardResponse as D, type ExternalRef as E, type PipelineOidcTrust as F, type GetConfigResult as G, type HistoryAction as H, INTERFACE_DIFF_CLASSES as I, type PipelinePackage as J, type PipelineRun as K, type PipelineStageEvent as L, type Milestone as M, type Nullable as N, type Project as O, type PipelineAnalysisTemplate as P, type ProjectConfig as Q, type ProjectWithTasks as R, type PushDocRequest as S, type PushInterfaceReportRequest as T, REVIEW_ITEM_KINDS as U, type ReplyThreadRequest as V, type RequestCheckpointRequest as W, type ReviewItem as X, type ReviewItemKind as Y, type ReviewsPendingResponse as Z, type RolloutShapeZ as _, type AdvanceStageRequest as a, hook_selector as a$, type SaveConfigRequest as a0, type ScanDiffProposal as a1, type ScanStatus as a2, type Session as a3, type Signoff as a4, TAG_COLOURS as a5, type Tag as a6, type TagColor as a7, type TagConfig as a8, type TagWithColor as a9, type UpsertPipelinePackage as aA, type UpsertPipelineRun as aB, type UpsertProject as aC, type UpsertTag as aD, type UpsertTaskLink as aE, type UpsertTodo as aF, type User as aG, type WebhookEventBody as aH, advance_stage_request as aI, apply_op as aJ, apply_request as aK, approval_decision as aL, claim_request as aM, config_schema as aN, create_thread_request as aO, dashboard_response as aP, dashboard_window_query as aQ, decide_checkpoint_request as aR, document_kind as aS, done_request as aT, external_ref as aU, forced_atomic_reason as aV, gate_descriptor as aW, grant_scope as aX, hook_action_input as aY, hook_action_public as aZ, hook_action_stored as a_, type TagWithTypedColor as aa, type Task as ab, type TaskEvent as ac, type TaskEventPayload as ad, type TaskLink as ae, type TaskRollup as af, type TaskTag as ag, type TaskView as ah, type TaskWithDetails as ai, type ThreadAnchor as aj, type ThreadEntry as ak, type ThreadMarker as al, type TodoUpdate as am, type ToggleBlockingRequest as an, type ToggleHookEnabled as ao, type TrackerResult as ap, type UpdateAction as aq, type UpdateData as ar, type UpdateUser as as, type UpsertGoal as at, type UpsertHook as au, type UpsertMilestone as av, type UpsertPipelineAnalysisTemplate as aw, type UpsertPipelineApproval as ax, type UpsertPipelineGrant as ay, type UpsertPipelineOidcTrust as az, type AnnotationThread as b, hook_trigger as b0, insert_pipeline_stage_event as b1, pipeline_oidc_provider as b2, project_config as b3, push_doc_request as b4, push_interface_report_request as b5, reply_thread_request as b6, request_checkpoint_request as b7, resolved_gates as b8, resolved_rollout as b9, upsert_milestone as bA, upsert_pipeline_analysis_template as bB, upsert_pipeline_approval as bC, upsert_pipeline_grant as bD, upsert_pipeline_oidc_trust as bE, upsert_pipeline_package as bF, upsert_pipeline_run as bG, upsert_project as bH, upsert_tag as bI, upsert_task_link as bJ, upsert_todo as bK, webhook_event_body as bL, review_item as ba, reviews_pending_response as bb, rollout_shape as bc, rollout_stage as bd, run_kind as be, run_status as bf, save_config_request as bg, save_tags_request as bh, scan_diff_proposal as bi, sdlc_stage as bj, signoff_checkpoint as bk, signoff_subject_kind as bl, stage_event_kind as bm, task_event_actor as bn, task_event_payload as bo, task_link_kind as bp, thread_anchor as bq, thread_entry as br, thread_marker as bs, thread_status as bt, toggle_blocking_request as bu, toggle_hook_enabled as bv, update_action as bw, update_user as bx, upsert_goal as by, upsert_hook as bz, type ApiKey as c, type ApplyLog as d, type ApplyOp as e, type ApplyRequest as f, type CodebaseTask as g, type ConfigSchemaType as h, type CreateThreadRequest as i, type DashboardWindowQuery as j, type DecideCheckpointRequest as k, type Document as l, type DoneRequest as m, type GithubWebhookEvent as n, type Goal as o, type Hook as p, type HookActionInput as q, type HookActionPublic as r, type HookActionStored as s, type HookDelivery as t, type HookSelector as u, type HookTrigger as v, type IgnorePath as w, type InsertPipelineStageEvent as x, type InterfaceDiffClass as y, type PipelineApproval as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devpad/api",
3
- "version": "2.4.2",
3
+ "version": "2.5.0",
4
4
  "description": "TypeScript client library for the devpad API - project and task management made simple",
5
5
  "keywords": [
6
6
  "api",
@@ -68,7 +68,7 @@
68
68
  "zod": "^3.22.4"
69
69
  },
70
70
  "devDependencies": {
71
- "@devpad/schema": "^2.4.2",
71
+ "@devpad/schema": "^2.5.0",
72
72
  "@types/node": "^20.11.24",
73
73
  "bun-types": "latest",
74
74
  "tsup": "^8.0.0",