Sign In

@papi-ai/adapter-pg

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@papi-ai/adapter-pg - npm Package Compare versions

Comparing version
0.2.7
to
0.2.8
+23
-1
dist/index.d.ts
import * as _papi_ai_adapter_md from '@papi-ai/adapter-md';
import { AcknowledgementStatus, ConflictAlertStatus, ConflictType, ConflictRaisedBy, SharedDecisionConfidence, Project, SharedDecision, SharedDecisionStatus, Acknowledgement, SharedMilestone, SharedMilestoneStatus, MilestoneDependency, ProjectContribution, ProjectContributionStatus, NorthStar, ConflictAlert, PapiAdapter, PlanningLog, CycleHealth, ActiveDecision, SiblingRepoTask, CycleLogEntry, StrategyReviewEntry, DocRegistryEntry, DocSearchInput, DogfoodEntry, HarnessInventoryEntry, HarnessState, BoardQueryOptions, CycleTask, UpdateTaskOptions, MoveTaskResult, TaskStatus, BuildReport, CycleLearning, CycleLearningPattern, DecisionScorePattern, HumanReview, Phase, ToolCallMetric, CostSummary, CostSnapshot, CycleMetricsSnapshot, Cycle, Horizon, Stage, Registries, StrategyRecommendation, AgendaTopic, DecisionEvent, DecisionScore, PlanContextSummary, ContributorEntry, ContributorReleasePr, ProjectSummary, ProjectLifecycleResult, PlanRunEntry, BugReport, ResolvedFeedbackNotice, EntityReference, DecisionUsageSummary, ContextUtilisationSummary, PlanWriteBackPayload, PlanWriteBackResult, OwnerActionInput, OwnerActionRow, ProgressStepInput } from '@papi-ai/adapter-md';
import { AcknowledgementStatus, ConflictAlertStatus, ConflictType, ConflictRaisedBy, SharedDecisionConfidence, Project, SharedDecision, SharedDecisionStatus, Acknowledgement, SharedMilestone, SharedMilestoneStatus, MilestoneDependency, ProjectContribution, ProjectContributionStatus, NorthStar, ConflictAlert, PapiAdapter, PlanningLog, CycleHealth, ActiveDecision, SiblingRepoTask, CycleLogEntry, StrategyReviewEntry, DocRegistryEntry, DocSearchInput, DocDeletionResult, DogfoodEntry, HarnessInventoryEntry, HarnessState, BoardQueryOptions, CycleTask, UpdateTaskOptions, MoveTaskResult, TaskStatus, BuildReport, CycleLearning, CycleLearningPattern, DecisionScorePattern, HumanReview, Phase, ToolCallMetric, CostSummary, CostSnapshot, CycleMetricsSnapshot, Cycle, Horizon, Stage, Registries, StrategyRecommendation, AgendaTopic, DecisionEvent, DecisionScore, PlanContextSummary, ContributorEntry, ContributorReleasePr, ProjectSummary, ProjectLifecycleResult, PlanRunEntry, BugReport, ResolvedFeedbackNotice, MyBugReport, EntityReference, DecisionUsageSummary, ContextUtilisationSummary, PlanWriteBackPayload, PlanWriteBackResult, OwnerActionInput, OwnerActionRow, ProgressStepInput } from '@papi-ai/adapter-md';
import postgres from 'postgres';

@@ -387,2 +387,18 @@

updateDocStatus(id: string, status: string, supersededBy?: string): Promise<void>;
/**
* Guarded hard-delete (task-2893). Closes the latent data-loss hole: the
* direct DELETE grant to anon/authenticated is revoked at the DB, so deletes
* MUST route through here. Provenance is decided by the shared
* `evaluateDocDeletion` guard — ALLOWED only for the doc's creator
* (owner_user_id) or the project owner (projects.user_id), and only when NO
* supersession or reference dependents exist. The guard BLOCKS; it never
* cascade-deletes dependents. All lookups are project-scoped.
*/
deleteDoc(docId: string, requesterUserId?: string | null): Promise<DocDeletionResult>;
/**
* Persist a new display order (task-2893). Each id's sort_order is set to its
* position in `orderedDocIds` (0-based). Rows not in this project are ignored.
* A single UPDATE ... FROM (VALUES ...) keeps it atomic and scoped by project_id.
*/
reorderDocs(orderedDocIds: string[]): Promise<void>;
updateDocAction(docId: string, actionIndex: number, update: {

@@ -707,4 +723,10 @@ status?: 'pending' | 'resolved';

insertPlanRun(entry: PlanRunEntry): Promise<void>;
/** task-2860: count plan_runs for a cycle, scoped to this project. The
* auto-release guard uses this to refuse to auto-close a cycle nobody planned
* (0 = all-injected-adhoc). SECURITY: multi-tenant table — always scope by
* project_id (CLAUDE.md raw-SQL rule). */
countPlanRunsForCycle(cycleNumber: number): Promise<number>;
submitBugReport(report: Omit<BugReport, 'id' | 'createdAt'>): Promise<BugReport>;
getUnnotifiedResolvedFeedback(userId?: string): Promise<ResolvedFeedbackNotice[]>;
listMyBugReports(userId?: string): Promise<MyBugReport[]>;
markFeedbackNotified(ids: string[], userId?: string): Promise<void>;

@@ -711,0 +733,0 @@ getRecentTaskComments(limit?: number): Promise<{

+2
-1
{
"name": "@papi-ai/adapter-pg",
"version": "0.2.7",
"version": "0.2.8",
"description": "PAPI PostgreSQL adapter — read/write shared layer entities in PostgreSQL",

@@ -42,2 +42,3 @@ "license": "Elastic-2.0",

"@papi-ai/adapter-md": "^0.2.0",
"@papi-ai/shared": "^0.1.0",
"postgres": "^3.4.7"

@@ -44,0 +45,0 @@ },

Sorry, the diff of this file is too big to display