@alisio/sdk 0.1.1 → 0.2.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.
Files changed (2) hide show
  1. package/dist/index.d.ts +65 -0
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1105,6 +1105,71 @@ export interface PlanReview {
1105
1105
  markdown: string;
1106
1106
  /** The published `plan.md` artifact (absent when publishing failed). */
1107
1107
  artifact?: ArtifactRef;
1108
+ /** The diagrams that were accepted for this revision (absent without diagrams). */
1109
+ diagrams?: PlanDiagramInfo[];
1110
+ }
1111
+ /** What a diagram illustrates: a purpose, not a Mermaid syntax. */
1112
+ export type PlanDiagramType = "overview" | "flow" | "components" | "architecture" | "sequence" | "data" | "state" | "other";
1113
+ /** How a diagram differs from the previous plan revision. */
1114
+ export type PlanDiagramStatus = "new" | "updated" | "unchanged";
1115
+ /** One accepted plan diagram (`PlanReview.diagrams`; the same fields as the `plan.json` entries). */
1116
+ export interface PlanDiagramInfo {
1117
+ /** Stable kebab-case id; the file is `diagrams/<id>.mmd`. */
1118
+ id: string;
1119
+ title: string;
1120
+ /** A short sentence: what the diagram shows. */
1121
+ explanation: string;
1122
+ /** Id of the plan heading the diagram illustrates, when it matches one. */
1123
+ section?: string;
1124
+ type: PlanDiagramType;
1125
+ /** The Mermaid diagram keyword (`flowchart`, `sequenceDiagram`, ...). */
1126
+ syntax: string;
1127
+ status: PlanDiagramStatus;
1128
+ /** The Mermaid source (terminals show it as code; the web draws it). */
1129
+ mermaid: string;
1130
+ }
1131
+ /** The `plan.json` manifest of a plan folder. Readers ignore unknown fields. */
1132
+ export interface PlanManifest {
1133
+ version: 1;
1134
+ planId: string;
1135
+ revision: number;
1136
+ title: string;
1137
+ /** `sha256` of the plan and its diagrams (the `PlanReview.hash`). */
1138
+ hash: string;
1139
+ summary: string;
1140
+ goals: string[];
1141
+ stages: Array<{
1142
+ title: string;
1143
+ detail?: string;
1144
+ }>;
1145
+ considerations: Array<{
1146
+ kind: "decision" | "risk" | "verification";
1147
+ text: string;
1148
+ }>;
1149
+ /** The plan headings, in order (`id` is the anchor the diagrams point to). */
1150
+ sections: Array<{
1151
+ id: string;
1152
+ title: string;
1153
+ level: number;
1154
+ }>;
1155
+ diagrams: Array<{
1156
+ id: string;
1157
+ title: string;
1158
+ explanation: string;
1159
+ section?: string;
1160
+ type: PlanDiagramType;
1161
+ syntax: string;
1162
+ /** Path inside the plan folder, `diagrams/<id>.mmd`. */
1163
+ file: string;
1164
+ /** `sha256` of the diagram content (source, title, explanation, section and type). */
1165
+ hash: string;
1166
+ status: PlanDiagramStatus;
1167
+ }>;
1168
+ /** Diagrams of the previous revision that this one no longer has. */
1169
+ removed: Array<{
1170
+ id: string;
1171
+ title: string;
1172
+ }>;
1108
1173
  }
1109
1174
  /** Lifecycle of a background task (`bg_run`); a terminal state is never left. */
1110
1175
  export type BackgroundTaskStatus = "queued" | "running" | "stopping" | "succeeded" | "failed" | "cancelled" | "lost";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alisio/sdk",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "Typed plugin SDK for Alisio: the stable contract for tools, commands, context, compaction and session hooks, model completions and storage. Types only plus tiny helpers; zero runtime dependencies.",
5
5
  "author": "Gustavo Gutiérrez",
6
6
  "license": "MIT",