@deployxai/dxc 0.1.7 → 0.1.8
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/dist/chunks/{chunk-NAL5UOUZ.js → chunk-QPHUHGHV.js} +1 -1
- package/dist/chunks/{chunk-N4CMLINP.js → chunk-UQRFCGHR.js} +132 -5
- package/dist/chunks/{knowledge-PWFALFEC.js → knowledge-5Y22MFAV.js} +1 -1
- package/dist/chunks/{monitor-CL5UXEO2.js → monitor-MZPF73LC.js} +2 -2
- package/dist/index.js +870 -368
- package/package.json +1 -1
- package/skills/dxc-article-outline/SKILL.md +1 -1
- package/skills/dxc-article-write/SKILL.md +1 -1
- package/skills/dxc-content-brief/SKILL.md +1 -1
- package/skills/dxc-content-review/SKILL.md +1 -1
- package/skills/dxc-content-workflow/SKILL.md +14 -6
- package/skills/dxc-content-workflow/references/stage-contract.md +12 -4
- package/skills/dxc-knowledge/SKILL.md +1 -1
- package/skills/dxc-memory/SKILL.md +1 -1
- package/skills/dxc-profile/SKILL.md +1 -1
- package/skills/dxc-quote-curator/SKILL.md +1 -1
- package/skills/dxc-research/SKILL.md +1 -1
- package/skills/dxc-title-write/SKILL.md +1 -1
- package/skills/dxc-visual-plan/SKILL.md +42 -3
- package/skills/dxc-wechat-publisher/SKILL.md +18 -14
- package/skills/dxc-wechat-publisher/agents/openai.yaml +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __dxcCreateRequire } from "node:module"; const require = __dxcCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
sourceFetchResultSchema
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-UQRFCGHR.js";
|
|
5
5
|
|
|
6
6
|
// apps/cli/src/source.ts
|
|
7
7
|
import { createHash } from "node:crypto";
|
|
@@ -1040,7 +1040,7 @@ var visualStageInlineAssetSchema = z5.object({
|
|
|
1040
1040
|
sha256: z5.string().regex(/^[a-f0-9]{64}$/u),
|
|
1041
1041
|
source: z5.enum(["agent-generated", "local-material"])
|
|
1042
1042
|
}).strict();
|
|
1043
|
-
var
|
|
1043
|
+
var visualPlanMaterializedArtifactFrontmatterSchema = z5.object({
|
|
1044
1044
|
assetsDirectory: portableRelativePathSchema,
|
|
1045
1045
|
coverAsset: portableRelativePathSchema,
|
|
1046
1046
|
coverSha256: z5.string().regex(/^[a-f0-9]{64}$/u),
|
|
@@ -1052,6 +1052,57 @@ var visualPlanStageArtifactFrontmatterSchema = z5.object({
|
|
|
1052
1052
|
inlineAssets: z5.array(visualStageInlineAssetSchema).max(20),
|
|
1053
1053
|
inlineImagesSupported: z5.literal(true)
|
|
1054
1054
|
}).strict();
|
|
1055
|
+
var visualGenerationPlannedAssetSchema = z5.object({
|
|
1056
|
+
placementAnchor: z5.string().regex(/^after-heading:[^\r\n]{1,160}$/u).optional(),
|
|
1057
|
+
purpose: z5.string().trim().min(1).max(300),
|
|
1058
|
+
role: z5.enum(["cover", "inline"]),
|
|
1059
|
+
source: z5.literal("agent-generated")
|
|
1060
|
+
}).strict().superRefine((asset, context) => {
|
|
1061
|
+
if (asset.role === "inline" && asset.placementAnchor === void 0) {
|
|
1062
|
+
context.addIssue({
|
|
1063
|
+
code: "custom",
|
|
1064
|
+
message: "inline proposal requires placementAnchor",
|
|
1065
|
+
path: ["placementAnchor"]
|
|
1066
|
+
});
|
|
1067
|
+
}
|
|
1068
|
+
if (asset.role === "cover" && asset.placementAnchor !== void 0) {
|
|
1069
|
+
context.addIssue({
|
|
1070
|
+
code: "custom",
|
|
1071
|
+
message: "cover proposal must not have placementAnchor",
|
|
1072
|
+
path: ["placementAnchor"]
|
|
1073
|
+
});
|
|
1074
|
+
}
|
|
1075
|
+
});
|
|
1076
|
+
var visualGenerationPlanSchema = z5.object({
|
|
1077
|
+
chargesQuota: z5.boolean(),
|
|
1078
|
+
dataTransit: z5.enum(["local-only", "agent-provider", "dxc-cloud"]),
|
|
1079
|
+
executionLocation: z5.enum(["local-device", "agent-hosted"]),
|
|
1080
|
+
maxAttempts: z5.literal(1),
|
|
1081
|
+
plannedAssets: z5.array(visualGenerationPlannedAssetSchema).min(1).max(20)
|
|
1082
|
+
}).strict().superRefine((value, context) => {
|
|
1083
|
+
if (value.plannedAssets.filter((asset) => asset.role === "cover").length > 1) {
|
|
1084
|
+
context.addIssue({
|
|
1085
|
+
code: "custom",
|
|
1086
|
+
message: "generation proposal allows at most one generated cover",
|
|
1087
|
+
path: ["plannedAssets"]
|
|
1088
|
+
});
|
|
1089
|
+
}
|
|
1090
|
+
});
|
|
1091
|
+
var visualPlanGenerationProposalFrontmatterSchema = z5.object({
|
|
1092
|
+
assetsDirectory: portableRelativePathSchema,
|
|
1093
|
+
dxc: z5.object({
|
|
1094
|
+
...contentStageMetadataBaseShape,
|
|
1095
|
+
artifactStatus: z5.literal("awaiting-user"),
|
|
1096
|
+
stage: z5.literal("visual-plan")
|
|
1097
|
+
}).strict(),
|
|
1098
|
+
generation: visualGenerationPlanSchema,
|
|
1099
|
+
inlineImagesSupported: z5.literal(true),
|
|
1100
|
+
planned: z5.literal(true)
|
|
1101
|
+
}).strict();
|
|
1102
|
+
var visualPlanStageArtifactFrontmatterSchema = z5.union([
|
|
1103
|
+
visualPlanMaterializedArtifactFrontmatterSchema,
|
|
1104
|
+
visualPlanGenerationProposalFrontmatterSchema
|
|
1105
|
+
]);
|
|
1055
1106
|
var qualityReviewStageArtifactFrontmatterSchema = z5.object({
|
|
1056
1107
|
blockerCount: z5.number().int().nonnegative(),
|
|
1057
1108
|
dxc: z5.object({
|
|
@@ -1175,6 +1226,14 @@ var stepConfirmationBindingSchema = z5.object({
|
|
|
1175
1226
|
});
|
|
1176
1227
|
}
|
|
1177
1228
|
});
|
|
1229
|
+
var externalActionAuthorizationSchema = z5.object({
|
|
1230
|
+
action: z5.literal("image-generation"),
|
|
1231
|
+
confirmedAt: z5.iso.datetime(),
|
|
1232
|
+
confirmedBy: z5.string().trim().min(1).max(160),
|
|
1233
|
+
planSnapshotHash: z5.string().regex(/^[a-f0-9]{64}$/u),
|
|
1234
|
+
plan: visualGenerationPlanSchema,
|
|
1235
|
+
requestedAt: z5.iso.datetime()
|
|
1236
|
+
}).strict();
|
|
1178
1237
|
var stepCheckpointBaseShape = {
|
|
1179
1238
|
artifact: checkpointArtifactSchema.optional(),
|
|
1180
1239
|
completedAt: z5.iso.datetime().optional(),
|
|
@@ -1217,6 +1276,17 @@ var stepCheckpointSchema = z5.discriminatedUnion("checkpointVersion", [
|
|
|
1217
1276
|
metadata: stepCheckpointMetadataSchema,
|
|
1218
1277
|
outputs: z5.array(stageArtifactReferenceSchema).min(1).max(CONTENT_ARTIFACT_KINDS.length),
|
|
1219
1278
|
waitingFor: z5.string().trim().min(1).max(500).nullable()
|
|
1279
|
+
}).strict(),
|
|
1280
|
+
z5.object({
|
|
1281
|
+
...stepCheckpointBaseShape,
|
|
1282
|
+
authorizations: z5.array(externalActionAuthorizationSchema).max(20),
|
|
1283
|
+
checkpointVersion: z5.literal("4"),
|
|
1284
|
+
confirmationBinding: stepConfirmationBindingSchema.nullable(),
|
|
1285
|
+
confirmationPurpose: z5.enum(["external-action", "stage-completion"]).nullable(),
|
|
1286
|
+
inputs: z5.array(stageArtifactReferenceSchema).max(CONTENT_ARTIFACT_KINDS.length),
|
|
1287
|
+
metadata: stepCheckpointMetadataSchema,
|
|
1288
|
+
outputs: z5.array(stageArtifactReferenceSchema).min(1).max(CONTENT_ARTIFACT_KINDS.length),
|
|
1289
|
+
waitingFor: z5.string().trim().min(1).max(500).nullable()
|
|
1220
1290
|
}).strict()
|
|
1221
1291
|
]).superRefine((checkpoint, context) => {
|
|
1222
1292
|
if (checkpoint.artifact !== void 0 && checkpoint.artifact.kind !== checkpoint.stage) {
|
|
@@ -1231,7 +1301,7 @@ var stepCheckpointSchema = z5.discriminatedUnion("checkpointVersion", [
|
|
|
1231
1301
|
message: "awaiting-user and completed checkpoints require an artifact"
|
|
1232
1302
|
});
|
|
1233
1303
|
}
|
|
1234
|
-
if (checkpoint.artifact !== void 0 && checkpoint.status !== "awaiting-user" && checkpoint.status !== "completed") {
|
|
1304
|
+
if (checkpoint.artifact !== void 0 && checkpoint.status !== "awaiting-user" && checkpoint.status !== "completed" && !(checkpoint.checkpointVersion === "4" && checkpoint.status === "running" && checkpoint.stage === "visual-plan" && checkpoint.authorizations.length > 0)) {
|
|
1235
1305
|
context.addIssue({
|
|
1236
1306
|
code: "custom",
|
|
1237
1307
|
message: "only awaiting-user and completed checkpoints may bind an artifact"
|
|
@@ -1285,7 +1355,7 @@ var stepCheckpointSchema = z5.discriminatedUnion("checkpointVersion", [
|
|
|
1285
1355
|
message: "confirmed checkpoints must be completed"
|
|
1286
1356
|
});
|
|
1287
1357
|
}
|
|
1288
|
-
if (checkpoint.checkpointVersion === "3") {
|
|
1358
|
+
if (checkpoint.checkpointVersion === "3" || checkpoint.checkpointVersion === "4") {
|
|
1289
1359
|
if (checkpoint.confirmation === "pending" && checkpoint.confirmationBinding?.status !== "pending") {
|
|
1290
1360
|
context.addIssue({
|
|
1291
1361
|
code: "custom",
|
|
@@ -1305,6 +1375,38 @@ var stepCheckpointSchema = z5.discriminatedUnion("checkpointVersion", [
|
|
|
1305
1375
|
});
|
|
1306
1376
|
}
|
|
1307
1377
|
}
|
|
1378
|
+
if (checkpoint.checkpointVersion === "4") {
|
|
1379
|
+
if (checkpoint.authorizations.length > 0 && checkpoint.stage !== "visual-plan") {
|
|
1380
|
+
context.addIssue({
|
|
1381
|
+
code: "custom",
|
|
1382
|
+
message: "image generation authorizations are only valid for visual-plan"
|
|
1383
|
+
});
|
|
1384
|
+
}
|
|
1385
|
+
if (checkpoint.stage === "visual-plan" && checkpoint.status === "running" && checkpoint.authorizations.length > 0 && checkpoint.artifact === void 0) {
|
|
1386
|
+
context.addIssue({
|
|
1387
|
+
code: "custom",
|
|
1388
|
+
message: "authorized visual-plan running checkpoint must bind its proposal artifact"
|
|
1389
|
+
});
|
|
1390
|
+
}
|
|
1391
|
+
if (checkpoint.confirmationBinding === null && checkpoint.confirmationPurpose !== null) {
|
|
1392
|
+
context.addIssue({
|
|
1393
|
+
code: "custom",
|
|
1394
|
+
message: "confirmation purpose requires a confirmation binding"
|
|
1395
|
+
});
|
|
1396
|
+
}
|
|
1397
|
+
if (checkpoint.confirmationBinding !== null && checkpoint.confirmationPurpose === null) {
|
|
1398
|
+
context.addIssue({
|
|
1399
|
+
code: "custom",
|
|
1400
|
+
message: "confirmation binding requires a confirmation purpose"
|
|
1401
|
+
});
|
|
1402
|
+
}
|
|
1403
|
+
if (checkpoint.confirmationPurpose === "external-action" && (checkpoint.stage !== "visual-plan" || checkpoint.status !== "awaiting-user" || checkpoint.confirmation !== "pending")) {
|
|
1404
|
+
context.addIssue({
|
|
1405
|
+
code: "custom",
|
|
1406
|
+
message: "external-action confirmation is only valid for a pending visual plan"
|
|
1407
|
+
});
|
|
1408
|
+
}
|
|
1409
|
+
}
|
|
1308
1410
|
});
|
|
1309
1411
|
var stepCheckpointInspectionSchema = z5.discriminatedUnion("state", [
|
|
1310
1412
|
z5.object({
|
|
@@ -1359,6 +1461,20 @@ var contentProjectStatusResultSchema = z5.object({
|
|
|
1359
1461
|
manifest: contentProjectManifestSchema,
|
|
1360
1462
|
manifestPath: z5.literal("dxc.project.json"),
|
|
1361
1463
|
nextStage: contentArtifactKindSchema.nullable(),
|
|
1464
|
+
recoveryPlan: z5.array(
|
|
1465
|
+
z5.object({
|
|
1466
|
+
action: z5.literal("rerun-stage"),
|
|
1467
|
+
reason: z5.enum([
|
|
1468
|
+
"artifact-changed",
|
|
1469
|
+
"artifact-empty",
|
|
1470
|
+
"artifact-missing",
|
|
1471
|
+
"input-artifact-changed",
|
|
1472
|
+
"input-artifact-empty",
|
|
1473
|
+
"input-artifact-missing"
|
|
1474
|
+
]),
|
|
1475
|
+
stage: contentArtifactKindSchema
|
|
1476
|
+
}).strict()
|
|
1477
|
+
),
|
|
1362
1478
|
workflowStatus: z5.enum([
|
|
1363
1479
|
"not-started",
|
|
1364
1480
|
"in-progress",
|
|
@@ -1395,10 +1511,17 @@ var contentProjectResolveResultSchema = z5.object({
|
|
|
1395
1511
|
var contentProjectCheckpointResultSchema = z5.object({
|
|
1396
1512
|
command: z5.literal("project.checkpoint"),
|
|
1397
1513
|
data: z5.object({
|
|
1514
|
+
artifactMutations: z5.array(
|
|
1515
|
+
z5.object({
|
|
1516
|
+
afterSha256: z5.string().regex(/^[a-f0-9]{64}$/u),
|
|
1517
|
+
beforeSha256: z5.string().regex(/^[a-f0-9]{64}$/u).nullable(),
|
|
1518
|
+
path: portableRelativePathSchema
|
|
1519
|
+
}).strict()
|
|
1520
|
+
),
|
|
1398
1521
|
checkpoint: stepCheckpointSchema,
|
|
1399
1522
|
checkpointPath: portableRelativePathSchema,
|
|
1400
1523
|
guidance: z5.object({
|
|
1401
|
-
action: z5.
|
|
1524
|
+
action: z5.enum(["authorize-external-action", "confirm-stage"]),
|
|
1402
1525
|
message: z5.string().trim().min(1).max(500),
|
|
1403
1526
|
suggestedFlag: z5.literal("--confirm")
|
|
1404
1527
|
}).strict().nullable()
|
|
@@ -1421,7 +1544,11 @@ var contentProjectErrorResultSchema = z5.object({
|
|
|
1421
1544
|
"DXC_PROJECT_NOT_FOUND",
|
|
1422
1545
|
"DXC_PROJECT_STAGE_INVALID"
|
|
1423
1546
|
]),
|
|
1424
|
-
|
|
1547
|
+
fields: z5.array(z5.string().trim().min(1).max(200)).max(20).optional(),
|
|
1548
|
+
message: z5.string().trim().min(1),
|
|
1549
|
+
reason: z5.string().regex(/^[A-Z][A-Z0-9_]{2,63}$/u).optional(),
|
|
1550
|
+
recovery: z5.string().trim().min(1).max(500).optional(),
|
|
1551
|
+
stage: contentArtifactKindSchema.optional()
|
|
1425
1552
|
}).strict(),
|
|
1426
1553
|
ok: z5.literal(false)
|
|
1427
1554
|
}).strict();
|
|
@@ -2,7 +2,7 @@ import { createRequire as __dxcCreateRequire } from "node:module"; const require
|
|
|
2
2
|
import {
|
|
3
3
|
SourceCli,
|
|
4
4
|
SourceCliError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-QPHUHGHV.js";
|
|
6
6
|
import {
|
|
7
7
|
CONTENT_MONITOR_SCHEMA_VERSION,
|
|
8
8
|
LocalStateError,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
contentMonitorStatusResultSchema,
|
|
15
15
|
ensurePrivateRegularFile,
|
|
16
16
|
sourceFetchKindSchema
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-UQRFCGHR.js";
|
|
18
18
|
|
|
19
19
|
// apps/cli/src/monitor.ts
|
|
20
20
|
import { createHash, randomUUID as systemRandomUUID } from "node:crypto";
|