prism-mcp-server 20.21.21 → 20.21.22

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/README.md CHANGED
@@ -158,6 +158,15 @@ or by re-enabling after each run.
158
158
  <details>
159
159
  <summary>Release history (optional)</summary>
160
160
 
161
+ ## What's New in v20.21.22
162
+
163
+ - Factory pipeline lists for cloud accounts use the authenticated Portal API,
164
+ including exact project and status filters, without direct database credentials.
165
+ - Invalid, incomplete, or oversized reads show an unavailable state. A valid empty
166
+ list remains distinct from a failed read.
167
+ - This release covers pipeline lists. Cloud pipeline creation, controls, and
168
+ execution still need separate validation.
169
+
161
170
  ## What's New in v20.21.21
162
171
 
163
172
  - Prism Dashboard now reports unavailable analytics and factory reads clearly,
@@ -40,6 +40,41 @@ export const ProjectAnalyticsResponseSchema = z.object({
40
40
  project: z.string().min(1).max(100),
41
41
  analytics: ProjectAnalyticsSchema,
42
42
  });
43
+ // Factory reads fail closed: corrupt rows must not become an empty or partial list.
44
+ const PipelineTextSchema = z.string().refine(value => value.trim().length > 0);
45
+ const PipelineTimestampSchema = z.string().refine(value => Number.isFinite(Date.parse(value)));
46
+ const PipelineSpecSchema = z.string().refine(value => {
47
+ try {
48
+ const spec = JSON.parse(value);
49
+ return spec !== null && typeof spec === 'object' && !Array.isArray(spec);
50
+ }
51
+ catch {
52
+ return false;
53
+ }
54
+ });
55
+ export const FactoryPipelineSchema = z.object({
56
+ id: PipelineTextSchema,
57
+ project: PipelineTextSchema,
58
+ user_id: PipelineTextSchema,
59
+ status: z.enum(['PENDING', 'RUNNING', 'PAUSED', 'ABORTED', 'COMPLETED', 'FAILED']),
60
+ current_step: PipelineTextSchema,
61
+ iteration: AnalyticsCountSchema,
62
+ eval_revisions: AnalyticsCountSchema.optional(),
63
+ started_at: PipelineTimestampSchema,
64
+ updated_at: PipelineTimestampSchema,
65
+ spec: PipelineSpecSchema,
66
+ error: z.string().nullable().optional(),
67
+ last_heartbeat: PipelineTimestampSchema.nullable().optional(),
68
+ contract_payload: z.object({
69
+ criteria: z.array(z.object({ id: z.string(), description: z.string() }).passthrough()),
70
+ }).passthrough().nullable().optional(),
71
+ notes: z.string().nullable().optional(),
72
+ }).passthrough();
73
+ export const FactoryPipelinesResponseSchema = z.object({
74
+ status: z.literal('success'),
75
+ pipelines: z.array(FactoryPipelineSchema).max(100)
76
+ .refine(rows => new Set(rows.map(row => row.id)).size === rows.length),
77
+ });
43
78
  // ─── knowledge_search ────────────────────────────────────────────
44
79
  export const KnowledgeSearchRequestSchema = z.object({
45
80
  action: z.literal("knowledge_search"),
@@ -31,6 +31,7 @@
31
31
  * - getEntriesMissingEmbeddings → POST /api/v1/prism/memory action=list_missing_embeddings
32
32
  * - listProjects → POST /api/v1/prism/memory action=list_projects
33
33
  * - getAnalytics → GET /api/v1/prism/analytics view=project
34
+ * - listPipelines → GET /api/v1/prism/factory/pipelines
34
35
  * - exportLedger → POST /api/v1/prism/memory action=export_memory (paginated)
35
36
  *
36
37
  * Methods still falling through to SupabaseStorage (Phase 3 Tier B+):
@@ -52,7 +53,7 @@ import { SupabaseStorage } from "./supabase.js";
52
53
  import { debugLog } from "../utils/logger.js";
53
54
  import { PRISM_SYNALUX_BASE_URL, PRISM_SYNALUX_API_KEY } from "../config.js";
54
55
  import { isSynaluxSignedOut } from "../utils/synaluxCredentialState.js";
55
- import { KnowledgeSearchRequestSchema, KnowledgeSearchResponseSchema, ProjectAnalyticsResponseSchema } from "./portalContracts.js";
56
+ import { KnowledgeSearchRequestSchema, KnowledgeSearchResponseSchema, ProjectAnalyticsResponseSchema, FactoryPipelinesResponseSchema } from "./portalContracts.js";
56
57
  function resolveKnowledgeScope(callerScope) {
57
58
  if (callerScope === "user" || callerScope === "workspace") {
58
59
  return callerScope;
@@ -758,6 +759,19 @@ export class SynaluxStorage extends SupabaseStorage {
758
759
  created_at: v.created_at ?? new Date().toISOString(),
759
760
  }));
760
761
  }
762
+ // ─── Factory read path ────────────────────────────────────────
763
+ async listPipelines(project, status, _userId) {
764
+ const query = new URLSearchParams();
765
+ if (project !== undefined)
766
+ query.set('project', project);
767
+ if (status !== undefined)
768
+ query.set('status', status);
769
+ const result = FactoryPipelinesResponseSchema.safeParse(await this.portalGet('/api/v1/prism/factory/pipelines' + (query.size ? '?' + query : '')));
770
+ if (!result.success || result.data.pipelines.some(row => (project !== undefined && row.project !== project) || (status !== undefined && row.status !== status))) {
771
+ throw new Error('Factory pipelines unavailable');
772
+ }
773
+ return result.data.pipelines;
774
+ }
761
775
  // ─── Health Check ─────────────────────────────────────────────
762
776
  async getAnalytics(project, _userId) {
763
777
  const query = new URLSearchParams({ view: 'project', project });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prism-mcp-server",
3
- "version": "20.21.21",
3
+ "version": "20.21.22",
4
4
  "mcpName": "io.github.dcostenco/prism-coder",
5
5
  "description": "Persistent session memory for AI coding agents that never leaves your machine — including the on-device model that reasons over it. Restores your prior decisions, open TODOs, and changed files across sessions; adds associative recall of related past work, semantic drift detection, and local inference. Local-first by default. Works with Claude Code, Cursor, and Codex.",
6
6
  "module": "index.ts",