@abyss-project/tools 2.6.0 → 3.0.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 (85) hide show
  1. package/.eslintrc.js +33 -33
  2. package/.prettierrc +5 -5
  3. package/README.md +32 -32
  4. package/dist/api/extraction.api.d.ts +4 -2
  5. package/dist/api/extraction.api.js +13 -2
  6. package/dist/api/extraction.api.js.map +1 -1
  7. package/dist/api/index.d.ts +0 -1
  8. package/dist/api/index.js +0 -1
  9. package/dist/api/index.js.map +1 -1
  10. package/dist/constants/index.d.ts +0 -1
  11. package/dist/constants/index.js +0 -1
  12. package/dist/constants/index.js.map +1 -1
  13. package/dist/index.d.ts +2 -13
  14. package/dist/index.js +2 -13
  15. package/dist/index.js.map +1 -1
  16. package/dist/types/enum/content-share.enum.d.ts +0 -1
  17. package/dist/types/enum/content-share.enum.js +0 -1
  18. package/dist/types/enum/content-share.enum.js.map +1 -1
  19. package/dist/types/enum/extraction-step-status.enum.d.ts +6 -0
  20. package/dist/types/enum/extraction-step-status.enum.js +11 -0
  21. package/dist/types/enum/extraction-step-status.enum.js.map +1 -0
  22. package/dist/types/enum/index.d.ts +1 -0
  23. package/dist/types/enum/index.js +1 -0
  24. package/dist/types/enum/index.js.map +1 -1
  25. package/dist/types/interface/api/requests/extraction.request.d.ts +4 -0
  26. package/dist/types/interface/api/requests/index.d.ts +0 -1
  27. package/dist/types/interface/api/requests/index.js +0 -1
  28. package/dist/types/interface/api/requests/index.js.map +1 -1
  29. package/dist/types/interface/api/responses/abyss.admin.response.d.ts +0 -1
  30. package/dist/types/interface/api/responses/extraction.response.d.ts +15 -0
  31. package/dist/types/interface/api/responses/index.d.ts +0 -1
  32. package/dist/types/interface/api/responses/index.js +0 -1
  33. package/dist/types/interface/api/responses/index.js.map +1 -1
  34. package/dist/types/interface/api/responses/metrics.response.d.ts +0 -1
  35. package/dist/types/interface/api/responses/transfer.response.d.ts +0 -4
  36. package/dist/types/interface/models/extraction-plan.dto.d.ts +30 -1
  37. package/dist/types/interface/models/extraction-plan.dto.js +3 -1
  38. package/dist/types/interface/models/extraction-plan.dto.js.map +1 -1
  39. package/dist/types/interface/models/extraction.dto.d.ts +2 -1
  40. package/dist/types/interface/models/extraction.dto.js.map +1 -1
  41. package/dist/types/interface/models/index.d.ts +0 -1
  42. package/dist/types/interface/models/index.js +0 -1
  43. package/dist/types/interface/models/index.js.map +1 -1
  44. package/dist/types/interface/models/project.dto.d.ts +0 -2
  45. package/dist/types/interface/models/user.dto.d.ts +0 -2
  46. package/package.json +1 -1
  47. package/src/api/extraction.api.ts +35 -0
  48. package/src/api/index.ts +0 -3
  49. package/src/constants/index.ts +0 -1
  50. package/src/index.ts +5 -25
  51. package/src/types/enum/content-share.enum.ts +0 -1
  52. package/src/types/enum/extraction-step-status.enum.ts +7 -0
  53. package/src/types/enum/index.ts +1 -0
  54. package/src/types/interface/api/requests/extraction.request.ts +6 -0
  55. package/src/types/interface/api/requests/index.ts +0 -1
  56. package/src/types/interface/api/responses/abyss.admin.response.ts +0 -1
  57. package/src/types/interface/api/responses/extraction.response.ts +17 -0
  58. package/src/types/interface/api/responses/index.ts +0 -1
  59. package/src/types/interface/api/responses/metrics.response.ts +0 -1
  60. package/src/types/interface/api/responses/transfer.response.ts +0 -2
  61. package/src/types/interface/models/extraction-plan.dto.ts +43 -4
  62. package/src/types/interface/models/extraction.dto.ts +11 -1
  63. package/src/types/interface/models/index.ts +0 -1
  64. package/src/types/interface/models/project.dto.ts +0 -2
  65. package/src/types/interface/models/user.dto.ts +0 -2
  66. package/dist/api/memo.api.d.ts +0 -15
  67. package/dist/api/memo.api.js +0 -49
  68. package/dist/api/memo.api.js.map +0 -1
  69. package/dist/constants/memo.constants.d.ts +0 -3
  70. package/dist/constants/memo.constants.js +0 -7
  71. package/dist/constants/memo.constants.js.map +0 -1
  72. package/dist/types/interface/api/requests/memo.request.d.ts +0 -41
  73. package/dist/types/interface/api/requests/memo.request.js +0 -3
  74. package/dist/types/interface/api/requests/memo.request.js.map +0 -1
  75. package/dist/types/interface/api/responses/memo.response.d.ts +0 -27
  76. package/dist/types/interface/api/responses/memo.response.js +0 -3
  77. package/dist/types/interface/api/responses/memo.response.js.map +0 -1
  78. package/dist/types/interface/models/memo.dto.d.ts +0 -20
  79. package/dist/types/interface/models/memo.dto.js +0 -3
  80. package/dist/types/interface/models/memo.dto.js.map +0 -1
  81. package/src/api/memo.api.ts +0 -97
  82. package/src/constants/memo.constants.ts +0 -3
  83. package/src/types/interface/api/requests/memo.request.ts +0 -49
  84. package/src/types/interface/api/responses/memo.response.ts +0 -32
  85. package/src/types/interface/models/memo.dto.ts +0 -23
@@ -15,7 +15,6 @@ export type ISyncProjectAbyssAdminResponse = IResponse<ISyncProjectAbyssAdminDat
15
15
  export type IProjectContentSummaryData = {
16
16
  draws: number;
17
17
  boards: number;
18
- memos: number;
19
18
  retrospectives: number;
20
19
  shortLinks: number;
21
20
  atlas: number;
@@ -258,6 +258,21 @@ export interface IExtractionUsageSummary {
258
258
  byBank: Record<string, number>;
259
259
  }
260
260
  export type ISummaryUsageResponse = IResponse<IExtractionUsageSummary>;
261
+ export interface IUsageByConfigRow {
262
+ planPresetId: string;
263
+ providerId: string | null;
264
+ interpreterId: string | null;
265
+ count: number;
266
+ successCount: number;
267
+ successRate: number;
268
+ avgDurationMs: number;
269
+ avgRecords: number;
270
+ ocrPagesConsumed: number;
271
+ }
272
+ export interface IUsageByConfig {
273
+ rows: IUsageByConfigRow[];
274
+ }
275
+ export type IUsageByConfigResponse = IResponse<IUsageByConfig>;
261
276
  export interface IListWebhookDeliveriesResponse {
262
277
  data: IExtractionWebhookDelivery[];
263
278
  total?: number;
@@ -13,7 +13,6 @@ export * from './board-column.response';
13
13
  export * from './board-label.response';
14
14
  export * from './draw.response';
15
15
  export * from './draw.public.response';
16
- export * from './memo.response';
17
16
  export * from './retrospective.response';
18
17
  export * from './retrospective.public.response';
19
18
  export * from './retrospective-card.response';
@@ -29,7 +29,6 @@ __exportStar(require("./board-column.response"), exports);
29
29
  __exportStar(require("./board-label.response"), exports);
30
30
  __exportStar(require("./draw.response"), exports);
31
31
  __exportStar(require("./draw.public.response"), exports);
32
- __exportStar(require("./memo.response"), exports);
33
32
  __exportStar(require("./retrospective.response"), exports);
34
33
  __exportStar(require("./retrospective.public.response"), exports);
35
34
  __exportStar(require("./retrospective-card.response"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/responses/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,mDAAiC;AACjC,0DAAwC;AACxC,4DAA0C;AAC1C,yDAAuC;AACvC,wDAAsC;AACtC,mDAAiC;AACjC,wDAAsC;AACtC,kEAAgD;AAChD,gEAA8C;AAC9C,iEAA+C;AAC/C,0DAAwC;AACxC,yDAAuC;AACvC,kDAAgC;AAChC,yDAAuC;AACvC,kDAAgC;AAChC,2DAAyC;AACzC,kEAAgD;AAChD,gEAA8C;AAC9C,kEAAgD;AAChD,mEAAiD;AACjD,wDAAsC;AACtC,+DAA6C;AAC7C,8DAA4C;AAC5C,kDAAgC;AAChC,qDAAmC;AACnC,iDAA+B;AAC/B,+DAA6C;AAC7C,mDAAiC;AACjC,oDAAkC;AAClC,sDAAoC;AACpC,wDAAsC;AACtC,qDAAmC;AACnC,wDAAsC;AACtC,2DAAyC;AACzC,yDAAuC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/responses/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,mDAAiC;AACjC,0DAAwC;AACxC,4DAA0C;AAC1C,yDAAuC;AACvC,wDAAsC;AACtC,mDAAiC;AACjC,wDAAsC;AACtC,kEAAgD;AAChD,gEAA8C;AAC9C,iEAA+C;AAC/C,0DAAwC;AACxC,yDAAuC;AACvC,kDAAgC;AAChC,yDAAuC;AACvC,2DAAyC;AACzC,kEAAgD;AAChD,gEAA8C;AAC9C,kEAAgD;AAChD,mEAAiD;AACjD,wDAAsC;AACtC,+DAA6C;AAC7C,8DAA4C;AAC5C,kDAAgC;AAChC,qDAAmC;AACnC,iDAA+B;AAC/B,+DAA6C;AAC7C,mDAAiC;AACjC,oDAAkC;AAClC,sDAAoC;AACpC,wDAAsC;AACtC,qDAAmC;AACnC,wDAAsC;AACtC,2DAAyC;AACzC,yDAAuC"}
@@ -2,7 +2,6 @@ import { IResponse } from '../type-message/response';
2
2
  export interface IToolsMetrics {
3
3
  boardCount: number;
4
4
  drawCount: number;
5
- memoCount: number;
6
5
  atlasCount: number;
7
6
  retrospectiveCount: number;
8
7
  shortLinkCount: number;
@@ -1,7 +1,6 @@
1
1
  import { IResponse } from '../type-message/response';
2
2
  import { IDraw } from '../../models/draw.dto';
3
3
  import { IBoard } from '../../models/board.dto';
4
- import { IMemo } from '../../models/memo.dto';
5
4
  import { IAtlas } from '../../models/atlas.dto';
6
5
  import { IRetrospective } from '../../models/retrospective.dto';
7
6
  import { IShortLink } from '../../models/short-link.dto';
@@ -11,9 +10,6 @@ export type ITransferDrawResponse = IResponse<{
11
10
  export type ITransferBoardResponse = IResponse<{
12
11
  board: IBoard;
13
12
  }>;
14
- export type ITransferMemoResponse = IResponse<{
15
- memo: IMemo;
16
- }>;
17
13
  export type ITransferAtlasResponse = IResponse<{
18
14
  atlas: IAtlas;
19
15
  }>;
@@ -1,7 +1,8 @@
1
1
  import { ProviderKind, CostTier } from '../../enum/provider-kind.enum';
2
2
  import { InterpreterKind } from '../../enum/interpreter-kind.enum';
3
3
  import { CombineStrategy } from '../../enum/combine-strategy.enum';
4
- export { ProviderKind, CostTier, InterpreterKind, CombineStrategy };
4
+ import { ExtractionStepStatus } from '../../enum/extraction-step-status.enum';
5
+ export { ProviderKind, CostTier, InterpreterKind, CombineStrategy, ExtractionStepStatus };
5
6
  export interface IModeRef {
6
7
  provider: ProviderKind;
7
8
  interpreter: InterpreterKind;
@@ -114,6 +115,34 @@ export interface IExecutionManifest {
114
115
  passes: IManifestPass[];
115
116
  createdAt: string;
116
117
  }
118
+ export interface IStepIo {
119
+ slot: 'providerOutput' | 'interpreterOutput';
120
+ bytes: number;
121
+ sha256: string;
122
+ preview: string;
123
+ status: 'pending' | 'ready' | 'skipped';
124
+ applicationFileId: string | null;
125
+ }
126
+ export interface IStepTrace {
127
+ index: number;
128
+ providerId: string;
129
+ providerVersion: string;
130
+ interpreterId: string;
131
+ interpreterVersion: string;
132
+ documentType: string | null;
133
+ status: ExtractionStepStatus;
134
+ startedAtMs: number;
135
+ durationMs: number;
136
+ ocrPageCount: number;
137
+ fieldsContributed: number;
138
+ errorMessage: string | null;
139
+ io: IStepIo[];
140
+ }
141
+ export interface IExecutionTrace {
142
+ steps: IStepTrace[];
143
+ totalDurationMs: number;
144
+ artifactStatus: 'pending' | 'ready';
145
+ }
117
146
  export interface IExtractionPlanPreset {
118
147
  id: string;
119
148
  name: string;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CombineStrategy = exports.InterpreterKind = exports.CostTier = exports.ProviderKind = void 0;
3
+ exports.ExtractionStepStatus = exports.CombineStrategy = exports.InterpreterKind = exports.CostTier = exports.ProviderKind = void 0;
4
4
  const provider_kind_enum_1 = require("../../enum/provider-kind.enum");
5
5
  Object.defineProperty(exports, "ProviderKind", { enumerable: true, get: function () { return provider_kind_enum_1.ProviderKind; } });
6
6
  Object.defineProperty(exports, "CostTier", { enumerable: true, get: function () { return provider_kind_enum_1.CostTier; } });
@@ -8,4 +8,6 @@ const interpreter_kind_enum_1 = require("../../enum/interpreter-kind.enum");
8
8
  Object.defineProperty(exports, "InterpreterKind", { enumerable: true, get: function () { return interpreter_kind_enum_1.InterpreterKind; } });
9
9
  const combine_strategy_enum_1 = require("../../enum/combine-strategy.enum");
10
10
  Object.defineProperty(exports, "CombineStrategy", { enumerable: true, get: function () { return combine_strategy_enum_1.CombineStrategy; } });
11
+ const extraction_step_status_enum_1 = require("../../enum/extraction-step-status.enum");
12
+ Object.defineProperty(exports, "ExtractionStepStatus", { enumerable: true, get: function () { return extraction_step_status_enum_1.ExtractionStepStatus; } });
11
13
  //# sourceMappingURL=extraction-plan.dto.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"extraction-plan.dto.js","sourceRoot":"","sources":["../../../../src/types/interface/models/extraction-plan.dto.ts"],"names":[],"mappings":";;;AAOA,sEAAuE;AAK9D,6FALA,iCAAY,OAKA;AAAE,yFALA,6BAAQ,OAKA;AAJ/B,4EAAmE;AAIlC,gGAJxB,uCAAe,OAIwB;AAHhD,4EAAmE;AAGjB,gGAHzC,uCAAe,OAGyC"}
1
+ {"version":3,"file":"extraction-plan.dto.js","sourceRoot":"","sources":["../../../../src/types/interface/models/extraction-plan.dto.ts"],"names":[],"mappings":";;;AAOA,sEAAuE;AAM9D,6FANA,iCAAY,OAMA;AAAE,yFANA,6BAAQ,OAMA;AAL/B,4EAAmE;AAKlC,gGALxB,uCAAe,OAKwB;AAJhD,4EAAmE;AAIjB,gGAJzC,uCAAe,OAIyC;AAHjE,wFAA8E;AAGX,qGAH1D,kDAAoB,OAG0D"}
@@ -2,7 +2,7 @@ import { ExtractionWarningCode } from '../../../types/enum/extraction-warning.en
2
2
  import { ExtractionFeedbackIssueType } from '../../../types/enum/extraction-feedback-issue-type.enum';
3
3
  import { DocumentType } from '../../../types/enum/document-type.enum';
4
4
  import { FileScanStatus } from '../../enum/file-scan-status.enum';
5
- import type { IFieldValue, IExecutionManifest, IGlobalConfidence } from './extraction-plan.dto';
5
+ import type { IFieldValue, IExecutionManifest, IGlobalConfidence, IExecutionTrace } from './extraction-plan.dto';
6
6
  export { ExtractionFeedbackIssueType };
7
7
  export type ExtractionMode = 'auto' | 'hint' | 'template';
8
8
  export type ProcessingMode = 'sync' | 'queue';
@@ -100,6 +100,7 @@ export interface IExtraction {
100
100
  ocrPageCount: number;
101
101
  executionManifest?: IExecutionManifest | null;
102
102
  globalConfidence?: IGlobalConfidence | null;
103
+ executionTrace?: IExecutionTrace | null;
103
104
  createdAt: string;
104
105
  }
105
106
  export interface IExtractionTemplate {
@@ -1 +1 @@
1
- {"version":3,"file":"extraction.dto.js","sourceRoot":"","sources":["../../../../src/types/interface/models/extraction.dto.ts"],"names":[],"mappings":";;;AAKA,yFAAoF;AAwF3E,sGAxFA,+CAAqB,OAwFA;AAvF9B,iHAAsG;AAM7F,4GANA,iEAA2B,OAMA;AA+QpC,IAAY,sBAYX;AAZD,WAAY,sBAAsB;IAChC,qEAA2C,CAAA;IAC3C,+DAAqC,CAAA;IACrC,+EAAqD,CAAA;IACrD,uEAA6C,CAAA;IAC7C,6DAAmC,CAAA;IACnC,2DAAiC,CAAA;IACjC,6DAAmC,CAAA;IACnC,uEAA6C,CAAA;IAC7C,uDAA6B,CAAA;IAC7B,mEAAyC,CAAA;IACzC,6DAAmC,CAAA;AACrC,CAAC,EAZW,sBAAsB,sCAAtB,sBAAsB,QAYjC;AAEY,QAAA,yBAAyB,GACpC,MAAM,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC;AAuCxC,IAAY,2BAGX;AAHD,WAAY,2BAA2B;IACrC,4CAAa,CAAA;IACb,0CAAW,CAAA;AACb,CAAC,EAHW,2BAA2B,2CAA3B,2BAA2B,QAGtC"}
1
+ {"version":3,"file":"extraction.dto.js","sourceRoot":"","sources":["../../../../src/types/interface/models/extraction.dto.ts"],"names":[],"mappings":";;;AAKA,yFAAoF;AA6F3E,sGA7FA,+CAAqB,OA6FA;AA5F9B,iHAAsG;AAW7F,4GAXA,iEAA2B,OAWA;AAoRpC,IAAY,sBAYX;AAZD,WAAY,sBAAsB;IAChC,qEAA2C,CAAA;IAC3C,+DAAqC,CAAA;IACrC,+EAAqD,CAAA;IACrD,uEAA6C,CAAA;IAC7C,6DAAmC,CAAA;IACnC,2DAAiC,CAAA;IACjC,6DAAmC,CAAA;IACnC,uEAA6C,CAAA;IAC7C,uDAA6B,CAAA;IAC7B,mEAAyC,CAAA;IACzC,6DAAmC,CAAA;AACrC,CAAC,EAZW,sBAAsB,sCAAtB,sBAAsB,QAYjC;AAEY,QAAA,yBAAyB,GACpC,MAAM,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC;AAuCxC,IAAY,2BAGX;AAHD,WAAY,2BAA2B;IACrC,4CAAa,CAAA;IACb,0CAAW,CAAA;AACb,CAAC,EAHW,2BAA2B,2CAA3B,2BAA2B,QAGtC"}
@@ -7,7 +7,6 @@ export * from './atlas-group.dto';
7
7
  export * from './atlas-page.dto';
8
8
  export * from './atlas-page-content.dto';
9
9
  export * from './draw.dto';
10
- export * from './memo.dto';
11
10
  export * from './retrospective.dto';
12
11
  export * from './retrospective-section.dto';
13
12
  export * from './retrospective-card.dto';
@@ -23,7 +23,6 @@ __exportStar(require("./atlas-group.dto"), exports);
23
23
  __exportStar(require("./atlas-page.dto"), exports);
24
24
  __exportStar(require("./atlas-page-content.dto"), exports);
25
25
  __exportStar(require("./draw.dto"), exports);
26
- __exportStar(require("./memo.dto"), exports);
27
26
  __exportStar(require("./retrospective.dto"), exports);
28
27
  __exportStar(require("./retrospective-section.dto"), exports);
29
28
  __exportStar(require("./retrospective-card.dto"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/interface/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,qDAAmC;AACnC,gDAA8B;AAC9B,8CAA4B;AAC5B,uDAAqC;AACrC,oDAAkC;AAClC,mDAAiC;AACjC,2DAAyC;AACzC,6CAA2B;AAC3B,6CAA2B;AAC3B,sDAAoC;AACpC,8DAA4C;AAC5C,2DAAyC;AACzC,6DAA2C;AAC3C,mDAAiC;AACjC,yDAAuC;AACvC,6CAA2B;AAC3B,8CAA4B;AAC5B,uDAAqC;AACrC,mDAAiC;AACjC,6DAA2C;AAC3C,iEAA+C;AAC/C,2DAAyC;AACzC,4DAA0C;AAC1C,yDAAuC;AACvC,0DAAwC;AACxC,qDAAmC;AACnC,oDAAkC;AAClC,6CAA2B;AAC3B,4CAA0B;AAC1B,sDAAoC;AACpC,mDAAiC;AACjC,wDAAsC;AACtC,oEAAkD;AAClD,mDAAiC;AACjC,sDAAoC;AACpC,+DAA6C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/interface/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,qDAAmC;AACnC,gDAA8B;AAC9B,8CAA4B;AAC5B,uDAAqC;AACrC,oDAAkC;AAClC,mDAAiC;AACjC,2DAAyC;AACzC,6CAA2B;AAC3B,sDAAoC;AACpC,8DAA4C;AAC5C,2DAAyC;AACzC,6DAA2C;AAC3C,mDAAiC;AACjC,yDAAuC;AACvC,6CAA2B;AAC3B,8CAA4B;AAC5B,uDAAqC;AACrC,mDAAiC;AACjC,6DAA2C;AAC3C,iEAA+C;AAC/C,2DAAyC;AACzC,4DAA0C;AAC1C,yDAAuC;AACvC,0DAAwC;AACxC,qDAAmC;AACnC,oDAAkC;AAClC,6CAA2B;AAC3B,4CAA0B;AAC1B,sDAAoC;AACpC,mDAAiC;AACjC,wDAAsC;AACtC,oEAAkD;AAClD,mDAAiC;AACjC,sDAAoC;AACpC,+DAA6C"}
@@ -1,6 +1,5 @@
1
1
  import { IAtlas } from './atlas.dto';
2
2
  import { IDraw } from './draw.dto';
3
- import { IMemo } from './memo.dto';
4
3
  import { IOrganization } from './organization.dto';
5
4
  import { IRetrospective } from './retrospective.dto';
6
5
  import { IShortLink } from './short-link.dto';
@@ -17,6 +16,5 @@ export interface IProject {
17
16
  draws?: IDraw[];
18
17
  retrospectives?: IRetrospective[];
19
18
  atlases?: IAtlas[];
20
- memos?: IMemo[];
21
19
  shortLinks?: IShortLink[];
22
20
  }
@@ -2,7 +2,6 @@ import { IAtlas } from './atlas.dto';
2
2
  import { IBoard } from './board.dto';
3
3
  import { IBoardCardComment } from './board-card-comment.dto';
4
4
  import { IDraw } from './draw.dto';
5
- import { IMemo } from './memo.dto';
6
5
  import { IProject } from './project.dto';
7
6
  import { IRetrospective } from './retrospective.dto';
8
7
  import { IShortLink } from './short-link.dto';
@@ -18,7 +17,6 @@ export interface IUser {
18
17
  draws?: IDraw[];
19
18
  retrospectives?: IRetrospective[];
20
19
  atlases?: IAtlas[];
21
- memos?: IMemo[];
22
20
  shortLinks?: IShortLink[];
23
21
  boardCardComments?: IBoardCardComment[];
24
22
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abyss-project/tools",
3
- "version": "2.6.0",
3
+ "version": "3.0.0",
4
4
  "description": "Core package to interact with Abyss-Project Tools",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -18,6 +18,7 @@ import {
18
18
  IAsyncExportExtractionBody,
19
19
  IListUsageQuery,
20
20
  ISummaryUsageQuery,
21
+ IUsageByConfigQuery,
21
22
  IListWebhookDeliveriesQuery,
22
23
  IReplayWebhookDeliveryBody,
23
24
  IMintShareExtractionBody,
@@ -52,6 +53,7 @@ import {
52
53
  IHealthResponse,
53
54
  IStatsResponse,
54
55
  ISummaryUsageResponse,
56
+ IUsageByConfigResponse,
55
57
  IListWebhookDeliveriesResponse,
56
58
  IGetWebhookDeliveryResponse,
57
59
  IGetSharedExtractionResponse,
@@ -779,6 +781,39 @@ export const summaryUsage = async (
779
781
  ).data;
780
782
  };
781
783
 
784
+ /** Per-config performance metrics (P2) — compare which config works best. */
785
+ export const usageByConfig = async (
786
+ query: IUsageByConfigQuery = {},
787
+ apiKey?: string,
788
+ ): Promise<IUsageByConfigResponse> => {
789
+ return (
790
+ await AbyssToolsCore.axios.get<IUsageByConfigResponse>(`extract/usage/by-config`, {
791
+ params: serializeParams(query),
792
+ headers: authHeader(apiKey),
793
+ })
794
+ ).data;
795
+ };
796
+
797
+ /**
798
+ * Lazy fetch of ONE trace step's full IO payload (P3). Returns the raw text
799
+ * (gunzipped server-side). The skeleton + previews already ship on getExtraction;
800
+ * call this only when the user expands a step.
801
+ */
802
+ export const getStepIo = async (
803
+ extractionId: string,
804
+ stepIndex: number,
805
+ slot: string,
806
+ scope: IExtractionContentScopeQuery = {},
807
+ apiKey?: string,
808
+ ): Promise<string> => {
809
+ return (
810
+ await AbyssToolsCore.axios.get<string>(
811
+ `extract/extractions/${extractionId}/steps/${stepIndex}/io/${slot}`,
812
+ { params: serializeParams(scope), headers: authHeader(apiKey), responseType: 'text' },
813
+ )
814
+ ).data;
815
+ };
816
+
782
817
  // ─── SHARED FILES (content_share-backed) ────
783
818
  //
784
819
  // Types live in `../types/interface/api/requests/extraction.request.ts` so they
package/src/api/index.ts CHANGED
@@ -20,9 +20,6 @@ export * from './board-label.api';
20
20
  export * from './draw.api';
21
21
  export * from './draw.public.api';
22
22
 
23
- // Memo
24
- export * from './memo.api';
25
-
26
23
  // Retrospective
27
24
  export * from './retrospective.api';
28
25
  export * from './retrospective.public.api';
@@ -1,4 +1,3 @@
1
- export * from './memo.constants';
2
1
  export * from './atlas.constants';
3
2
  export * from './board.constants';
4
3
  export * from './short-link.constants';
package/src/index.ts CHANGED
@@ -20,7 +20,6 @@ import * as atlasGroupApi from './api/atlas-group.api';
20
20
  import * as atlasPageApi from './api/atlas-page.api';
21
21
  import * as atlasDocumentApi from './api/atlas-document.api';
22
22
  import * as atlasPublicApi from './api/atlas.public.api';
23
- import * as memoApi from './api/memo.api';
24
23
  import * as shortLinkApiModule from './api/short-link.api';
25
24
  import * as shortLinkAdminApiModule from './api/short-link.admin.api';
26
25
  import * as shortLinkPublicApiModule from './api/short-link.public.api';
@@ -256,18 +255,6 @@ type AbyssToolsCoreSDK = {
256
255
  paginate: typeof atlasDocumentApi.paginateAtlasDocument;
257
256
  list: typeof atlasDocumentApi.listAtlasDocument;
258
257
  };
259
- memo: {
260
- paginate: typeof memoApi.paginateMemo;
261
- paginateProject: typeof memoApi.paginateProjectMemo;
262
- paginateOrganization: typeof memoApi.paginateOrganizationMemo;
263
- get: typeof memoApi.getMemo;
264
- delete: typeof memoApi.deleteMemo;
265
- update: typeof memoApi.updateMemo;
266
- create: typeof memoApi.createMemo;
267
- createForOrganization: typeof memoApi.createForOrganizationMemo;
268
- transfer: typeof memoApi.transferMemo;
269
- countOrganization: typeof memoApi.countOrganizationMemo;
270
- };
271
258
  shortLink: {
272
259
  get: typeof shortLinkApiModule.shortLinkApi.get;
273
260
  paginate: typeof shortLinkApiModule.shortLinkApi.paginate;
@@ -438,6 +425,8 @@ type AbyssToolsCoreSDK = {
438
425
  diff: typeof extractionApi.diffExtractions;
439
426
  /** Opt a specific extraction in/out of the improvement-training dataset. */
440
427
  toggleTraining: typeof extractionApi.toggleExtractionTraining;
428
+ /** Lazy fetch of one trace step's full IO payload (P3). */
429
+ stepIo: typeof extractionApi.getStepIo;
441
430
  };
442
431
  templates: {
443
432
  list: typeof extractionApi.listTemplates;
@@ -469,6 +458,7 @@ type AbyssToolsCoreSDK = {
469
458
  usage: {
470
459
  list: typeof extractionApi.listUsage;
471
460
  summary: typeof extractionApi.summaryUsage;
461
+ byConfig: typeof extractionApi.usageByConfig;
472
462
  };
473
463
  share: {
474
464
  mint: typeof extractionApi.mintShareExtraction;
@@ -707,18 +697,6 @@ export class AbyssToolsCore {
707
697
  paginate: atlasDocumentApi.paginateAtlasDocument,
708
698
  list: atlasDocumentApi.listAtlasDocument,
709
699
  },
710
- memo: {
711
- paginate: memoApi.paginateMemo,
712
- paginateProject: memoApi.paginateProjectMemo,
713
- paginateOrganization: memoApi.paginateOrganizationMemo,
714
- get: memoApi.getMemo,
715
- delete: memoApi.deleteMemo,
716
- update: memoApi.updateMemo,
717
- create: memoApi.createMemo,
718
- createForOrganization: memoApi.createForOrganizationMemo,
719
- transfer: memoApi.transferMemo,
720
- countOrganization: memoApi.countOrganizationMemo,
721
- },
722
700
  shortLink: {
723
701
  get: shortLinkApiModule.shortLinkApi.get,
724
702
  paginate: shortLinkApiModule.shortLinkApi.paginate,
@@ -863,6 +841,7 @@ export class AbyssToolsCore {
863
841
  getExportJob: extractionApi.getExportJob,
864
842
  diff: extractionApi.diffExtractions,
865
843
  toggleTraining: extractionApi.toggleExtractionTraining,
844
+ stepIo: extractionApi.getStepIo,
866
845
  },
867
846
  templates: {
868
847
  list: extractionApi.listTemplates,
@@ -891,6 +870,7 @@ export class AbyssToolsCore {
891
870
  usage: {
892
871
  list: extractionApi.listUsage,
893
872
  summary: extractionApi.summaryUsage,
873
+ byConfig: extractionApi.usageByConfig,
894
874
  },
895
875
  share: {
896
876
  mint: extractionApi.mintShareExtraction,
@@ -1,7 +1,6 @@
1
1
  export enum ShareableContentType {
2
2
  DRAW = 'draw',
3
3
  BOARD = 'board',
4
- MEMO = 'memo',
5
4
  ATLAS = 'atlas',
6
5
  RETROSPECTIVE = 'retrospective',
7
6
  SHORT_LINK = 'short_link',
@@ -0,0 +1,7 @@
1
+ /** Terminal disposition of a single plan pass in the execution trace (P1). Mirrors server. */
2
+ export enum ExtractionStepStatus {
3
+ RAN = 'ran',
4
+ SKIPPED_BY_GATE = 'skippedByGate',
5
+ TIMEOUT = 'timeout',
6
+ FAILED = 'failed',
7
+ }
@@ -11,5 +11,6 @@ export * from './extraction-feedback-issue-type.enum';
11
11
  export * from './provider-kind.enum';
12
12
  export * from './interpreter-kind.enum';
13
13
  export * from './combine-strategy.enum';
14
+ export * from './extraction-step-status.enum';
14
15
  export * from './probe-scan.enum';
15
16
  export * from './file-scan-status.enum';
@@ -246,6 +246,12 @@ export interface ISummaryUsageQuery {
246
246
  to?: string;
247
247
  }
248
248
 
249
+ /** Per-config usage window (P2). */
250
+ export interface IUsageByConfigQuery {
251
+ from?: string;
252
+ to?: string;
253
+ }
254
+
249
255
  // ─── WEBHOOK DELIVERIES ─────────────────────
250
256
 
251
257
  export interface IListWebhookDeliveriesQuery {
@@ -13,7 +13,6 @@ export * from './board-column.request';
13
13
  export * from './board-label.request';
14
14
  export * from './draw.request';
15
15
  export * from './draw.public.request';
16
- export * from './memo.request';
17
16
  export * from './retrospective.request';
18
17
  export * from './retrospective.public.request';
19
18
  export * from './retrospective-card.request';
@@ -19,7 +19,6 @@ export type ISyncProjectAbyssAdminResponse = IResponse<ISyncProjectAbyssAdminDat
19
19
  export type IProjectContentSummaryData = {
20
20
  draws: number;
21
21
  boards: number;
22
- memos: number;
23
22
  retrospectives: number;
24
23
  shortLinks: number;
25
24
  atlas: number;
@@ -300,6 +300,23 @@ export interface IExtractionUsageSummary {
300
300
  }
301
301
  export type ISummaryUsageResponse = IResponse<IExtractionUsageSummary>;
302
302
 
303
+ /** One config's aggregate performance (P2) — for "which config works best". */
304
+ export interface IUsageByConfigRow {
305
+ planPresetId: string; // 'factory-default' | 'inline' | 'system:x' | <uuid> | 'unknown'
306
+ providerId: string | null;
307
+ interpreterId: string | null;
308
+ count: number;
309
+ successCount: number;
310
+ successRate: number; // 0..1
311
+ avgDurationMs: number;
312
+ avgRecords: number;
313
+ ocrPagesConsumed: number;
314
+ }
315
+ export interface IUsageByConfig {
316
+ rows: IUsageByConfigRow[];
317
+ }
318
+ export type IUsageByConfigResponse = IResponse<IUsageByConfig>;
319
+
303
320
  // ─── WEBHOOK DELIVERIES ─────────────────────
304
321
 
305
322
  export interface IListWebhookDeliveriesResponse {
@@ -13,7 +13,6 @@ export * from './board-column.response';
13
13
  export * from './board-label.response';
14
14
  export * from './draw.response';
15
15
  export * from './draw.public.response';
16
- export * from './memo.response';
17
16
  export * from './retrospective.response';
18
17
  export * from './retrospective.public.response';
19
18
  export * from './retrospective-card.response';
@@ -3,7 +3,6 @@ import { IResponse } from '../type-message/response';
3
3
  export interface IToolsMetrics {
4
4
  boardCount: number;
5
5
  drawCount: number;
6
- memoCount: number;
7
6
  atlasCount: number;
8
7
  retrospectiveCount: number;
9
8
  shortLinkCount: number;
@@ -1,14 +1,12 @@
1
1
  import { IResponse } from '../type-message/response';
2
2
  import { IDraw } from '../../models/draw.dto';
3
3
  import { IBoard } from '../../models/board.dto';
4
- import { IMemo } from '../../models/memo.dto';
5
4
  import { IAtlas } from '../../models/atlas.dto';
6
5
  import { IRetrospective } from '../../models/retrospective.dto';
7
6
  import { IShortLink } from '../../models/short-link.dto';
8
7
 
9
8
  export type ITransferDrawResponse = IResponse<{ draw: IDraw }>;
10
9
  export type ITransferBoardResponse = IResponse<{ board: IBoard }>;
11
- export type ITransferMemoResponse = IResponse<{ memo: IMemo }>;
12
10
  export type ITransferAtlasResponse = IResponse<{ atlas: IAtlas }>;
13
11
  export type ITransferRetrospectiveResponse = IResponse<{ retrospective: IRetrospective }>;
14
12
  export type ITransferShortLinkResponse = IResponse<{ shortLink: IShortLink }>;
@@ -8,9 +8,10 @@
8
8
  import { ProviderKind, CostTier } from '../../enum/provider-kind.enum';
9
9
  import { InterpreterKind } from '../../enum/interpreter-kind.enum';
10
10
  import { CombineStrategy } from '../../enum/combine-strategy.enum';
11
+ import { ExtractionStepStatus } from '../../enum/extraction-step-status.enum';
11
12
 
12
13
  // Re-export for consumers that import from this barrel.
13
- export { ProviderKind, CostTier, InterpreterKind, CombineStrategy };
14
+ export { ProviderKind, CostTier, InterpreterKind, CombineStrategy, ExtractionStepStatus };
14
15
 
15
16
  // ─── Plan building blocks ──────────────────────────────────────────────────
16
17
 
@@ -180,15 +181,53 @@ export interface IExecutionManifest {
180
181
  createdAt: string;
181
182
  }
182
183
 
184
+ // ─── Execution trace (P1) ──────────────────────────────────────────────────
185
+
186
+ /** Per-IO metadata in the persisted trace skeleton. The full payload is fetched lazily. */
187
+ export interface IStepIo {
188
+ slot: 'providerOutput' | 'interpreterOutput';
189
+ bytes: number;
190
+ sha256: string;
191
+ preview: string;
192
+ status: 'pending' | 'ready' | 'skipped';
193
+ applicationFileId: string | null;
194
+ }
195
+
196
+ /** One executed / gate-skipped / failed pass, with timing, status and IO refs. */
197
+ export interface IStepTrace {
198
+ index: number;
199
+ providerId: string;
200
+ providerVersion: string;
201
+ interpreterId: string;
202
+ interpreterVersion: string;
203
+ documentType: string | null;
204
+ status: ExtractionStepStatus;
205
+ startedAtMs: number;
206
+ durationMs: number;
207
+ ocrPageCount: number;
208
+ fieldsContributed: number;
209
+ errorMessage: string | null;
210
+ io: IStepIo[];
211
+ }
212
+
213
+ /**
214
+ * Per-pass execution trace skeleton persisted in extractions.executionTrace and
215
+ * surfaced by GET /extractions/:id. Full IO payloads are fetched lazily via
216
+ * sdk.extract.extractions.stepIo.
217
+ */
218
+ export interface IExecutionTrace {
219
+ steps: IStepTrace[];
220
+ totalDurationMs: number;
221
+ artifactStatus: 'pending' | 'ready';
222
+ }
223
+
183
224
  // ─── Plan presets ──────────────────────────────────────────────────────────
184
225
 
185
226
  /** A saved extraction plan preset (DB row + virtual system presets). */
186
227
  export interface IExtractionPlanPreset {
187
228
  id: string;
188
229
  name: string;
189
- scope:
190
- | { kind: 'user'; userId: string }
191
- | { kind: 'org'; organizationId: string };
230
+ scope: { kind: 'user'; userId: string } | { kind: 'org'; organizationId: string };
192
231
  plan: IExtractionPlan;
193
232
  isDefault: boolean;
194
233
  system: boolean;
@@ -7,7 +7,12 @@ import { ExtractionWarningCode } from '../../../types/enum/extraction-warning.en
7
7
  import { ExtractionFeedbackIssueType } from '../../../types/enum/extraction-feedback-issue-type.enum';
8
8
  import { DocumentType } from '../../../types/enum/document-type.enum';
9
9
  import { FileScanStatus } from '../../enum/file-scan-status.enum';
10
- import type { IFieldValue, IExecutionManifest, IGlobalConfidence } from './extraction-plan.dto';
10
+ import type {
11
+ IFieldValue,
12
+ IExecutionManifest,
13
+ IGlobalConfidence,
14
+ IExecutionTrace,
15
+ } from './extraction-plan.dto';
11
16
 
12
17
  // Re-export so consumers can import ExtractionFeedbackIssueType from the DTO barrel.
13
18
  export { ExtractionFeedbackIssueType };
@@ -163,6 +168,11 @@ export interface IExtraction {
163
168
  * Surfaced where available; optional/absent otherwise. ADDITIVE, optional.
164
169
  */
165
170
  globalConfidence?: IGlobalConfidence | null;
171
+ /**
172
+ * Per-pass execution trace skeleton (timing/status/impl + lazy IO refs) — P1.
173
+ * Present on plan-path rows; absent on legacy paths. ADDITIVE, optional.
174
+ */
175
+ executionTrace?: IExecutionTrace | null;
166
176
  createdAt: string;
167
177
  }
168
178
 
@@ -7,7 +7,6 @@ export * from './atlas-group.dto';
7
7
  export * from './atlas-page.dto';
8
8
  export * from './atlas-page-content.dto';
9
9
  export * from './draw.dto';
10
- export * from './memo.dto';
11
10
  export * from './retrospective.dto';
12
11
  export * from './retrospective-section.dto';
13
12
  export * from './retrospective-card.dto';
@@ -1,6 +1,5 @@
1
1
  import { IAtlas } from './atlas.dto';
2
2
  import { IDraw } from './draw.dto';
3
- import { IMemo } from './memo.dto';
4
3
  import { IOrganization } from './organization.dto';
5
4
  import { IRetrospective } from './retrospective.dto';
6
5
  import { IShortLink } from './short-link.dto';
@@ -20,6 +19,5 @@ export interface IProject {
20
19
  draws?: IDraw[];
21
20
  retrospectives?: IRetrospective[];
22
21
  atlases?: IAtlas[];
23
- memos?: IMemo[];
24
22
  shortLinks?: IShortLink[];
25
23
  }
@@ -2,7 +2,6 @@ import { IAtlas } from './atlas.dto';
2
2
  import { IBoard } from './board.dto';
3
3
  import { IBoardCardComment } from './board-card-comment.dto';
4
4
  import { IDraw } from './draw.dto';
5
- import { IMemo } from './memo.dto';
6
5
  import { IProject } from './project.dto';
7
6
  import { IRetrospective } from './retrospective.dto';
8
7
  import { IShortLink } from './short-link.dto';
@@ -24,7 +23,6 @@ export interface IUser {
24
23
  draws?: IDraw[];
25
24
  retrospectives?: IRetrospective[];
26
25
  atlases?: IAtlas[];
27
- memos?: IMemo[];
28
26
  shortLinks?: IShortLink[];
29
27
  boardCardComments?: IBoardCardComment[];
30
28
  }