@tsantosfp_2026/piece-coach-migration-ai 2.0.0 → 2.1.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/package.json +1 -1
  2. package/src/index.js +83 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsantosfp_2026/piece-coach-migration-ai",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "main": "./src/index.js",
5
5
  "dependencies": {},
6
6
  "files": [
package/src/index.js CHANGED
@@ -52772,7 +52772,7 @@ var require_output_schemas = __commonJS({
52772
52772
  "dist/src/lib/output-schemas.js"(exports2) {
52773
52773
  "use strict";
52774
52774
  Object.defineProperty(exports2, "__esModule", { value: true });
52775
- exports2.transformNarrativeJobOutputSchema = exports2.extractPreAiPackageOutputSchema = void 0;
52775
+ exports2.transformHomeNarrativeOutputSchema = exports2.transformNarrativeJobOutputSchema = exports2.extractPreAiPackageOutputSchema = void 0;
52776
52776
  var evidenceFields = [
52777
52777
  { key: "evidence_reference", label: "Evidence Reference" },
52778
52778
  { key: "canonical_field", label: "Canonical Field" },
@@ -52843,6 +52843,30 @@ var require_output_schemas = __commonJS({
52843
52843
  { key: "errors", label: "Errors", listItems: [] }
52844
52844
  ]
52845
52845
  };
52846
+ exports2.transformHomeNarrativeOutputSchema = {
52847
+ fields: [
52848
+ { key: "contract", label: "Generation Result Contract" },
52849
+ { key: "candidate", label: "Validated Home Candidate", children: [
52850
+ { key: "candidate_digest", label: "Candidate Digest" },
52851
+ { key: "request_digest", label: "Request Digest" },
52852
+ { key: "output_digest", label: "Output Digest" },
52853
+ { key: "outputs", label: "Exactly Two Home Outputs", dynamicKey: true },
52854
+ { key: "provenance", label: "Bound Home Provenance", listItems: [
52855
+ { key: "canonical_field", label: "Canonical Field" },
52856
+ { key: "template_element_id", label: "Template Element ID" },
52857
+ { key: "verified_context_refs", label: "Verified Context References", listItems: [] }
52858
+ ] },
52859
+ { key: "no_new_facts_attestation", label: "No New Facts Attestation", format: "boolean" }
52860
+ ] },
52861
+ { key: "checkpoint", label: "Needs Review Checkpoint", children: [
52862
+ { key: "checkpoint_kind", label: "Checkpoint Kind" },
52863
+ { key: "review_state", label: "Review State" },
52864
+ { key: "review_binding_digest", label: "Review Binding Digest" },
52865
+ { key: "staged_outputs", label: "Staged Home Outputs", dynamicKey: true },
52866
+ { key: "staging_columns", label: "Existing Monday Columns", dynamicKey: true }
52867
+ ] }
52868
+ ]
52869
+ };
52846
52870
  }
52847
52871
  });
52848
52872
 
@@ -54131,12 +54155,69 @@ var require_transform_narrative_job = __commonJS({
54131
54155
  }
54132
54156
  });
54133
54157
 
54158
+ // dist/src/lib/transform-home-narrative.js
54159
+ var require_transform_home_narrative = __commonJS({
54160
+ "dist/src/lib/transform-home-narrative.js"(exports2) {
54161
+ "use strict";
54162
+ Object.defineProperty(exports2, "__esModule", { value: true });
54163
+ exports2.transformHomeNarrative = void 0;
54164
+ var pieces_framework_12 = require_src2();
54165
+ var pieces_common_1 = require_src4();
54166
+ var pre_ai_contract_1 = require_pre_ai_contract();
54167
+ var output_schemas_1 = require_output_schemas();
54168
+ var PRIVATE_RUNTIME_URL = "http://coach-migration-runtime:3010/narrative/home/transform";
54169
+ exports2.transformHomeNarrative = (0, pieces_framework_12.createAction)({
54170
+ name: "transform_home_narrative",
54171
+ displayName: "Transform Home Narrative for Review",
54172
+ description: "Builds the additive HOME_V1 request from the exact owned PREAI package, runs the fixed OpenCode provider boundary, and returns a Needs Review checkpoint.",
54173
+ auth: void 0,
54174
+ audience: "human",
54175
+ aiMetadata: {
54176
+ description: "Use before approval. Prompt, baseline, output keys, candidate set, endpoint, provider, model, and process controls are fixed and not user-selectable.",
54177
+ idempotent: true
54178
+ },
54179
+ props: {
54180
+ origin_run_id: pieces_framework_12.Property.ShortText({ displayName: "Origin Runtime Run ID", required: true }),
54181
+ origin_attempt: pieces_framework_12.Property.Number({ displayName: "Origin Attempt", required: true }),
54182
+ event_identity: pieces_framework_12.Property.ShortText({ displayName: "Origin Event Identity", required: true }),
54183
+ board_id: pieces_framework_12.Property.ShortText({ displayName: "Monday Board ID", required: true }),
54184
+ item_id: pieces_framework_12.Property.ShortText({ displayName: "Monday Item ID", required: true }),
54185
+ pre_ai_package: pieces_framework_12.Property.Json({
54186
+ displayName: "Owning PREAI Package",
54187
+ description: "The exact digest-bound PREAI package from the same migration execution. Home verified context is derived server-side from this package.",
54188
+ required: true
54189
+ })
54190
+ },
54191
+ outputSchema: output_schemas_1.transformHomeNarrativeOutputSchema,
54192
+ run: async (context) => {
54193
+ const preAiPackage = (0, pre_ai_contract_1.validatePreAiPackage)(context.propsValue.pre_ai_package);
54194
+ const response = await pieces_common_1.httpClient.sendRequest({
54195
+ method: pieces_common_1.HttpMethod.POST,
54196
+ url: PRIVATE_RUNTIME_URL,
54197
+ headers: { "Content-Type": "application/json" },
54198
+ body: {
54199
+ origin_run_id: context.propsValue.origin_run_id,
54200
+ origin_attempt: context.propsValue.origin_attempt,
54201
+ event_identity: context.propsValue.event_identity,
54202
+ board_id: context.propsValue.board_id,
54203
+ item_id: context.propsValue.item_id,
54204
+ pre_ai_package: preAiPackage
54205
+ },
54206
+ timeout: 125e3
54207
+ });
54208
+ return response.body;
54209
+ }
54210
+ });
54211
+ }
54212
+ });
54213
+
54134
54214
  // dist/src/index.js
54135
54215
  Object.defineProperty(exports, "__esModule", { value: true });
54136
54216
  exports.coachMigrationAi = void 0;
54137
54217
  var pieces_framework_1 = require_src2();
54138
54218
  var extract_pre_ai_package_1 = require_extract_pre_ai_package();
54139
54219
  var transform_narrative_job_1 = require_transform_narrative_job();
54220
+ var transform_home_narrative_1 = require_transform_home_narrative();
54140
54221
  exports.coachMigrationAi = (0, pieces_framework_1.createPiece)({
54141
54222
  displayName: "Coach Migration AI",
54142
54223
  description: "Builds canonical PREAI packages and invokes strict, bounded coach narrative jobs through the private migration runtime.",
@@ -54145,7 +54226,7 @@ exports.coachMigrationAi = (0, pieces_framework_1.createPiece)({
54145
54226
  auth: void 0,
54146
54227
  minimumSupportedRelease: "0.36.0",
54147
54228
  maximumSupportedRelease: "0.999.999",
54148
- actions: [extract_pre_ai_package_1.extractPreAiPackage, transform_narrative_job_1.transformNarrativeJob],
54229
+ actions: [extract_pre_ai_package_1.extractPreAiPackage, transform_narrative_job_1.transformNarrativeJob, transform_home_narrative_1.transformHomeNarrative],
54149
54230
  triggers: []
54150
54231
  });
54151
54232
  /*! Bundled license information: