@carbonstopper/agent-mcp 0.1.72 → 0.1.74
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/anonymous-policy.js +5 -0
- package/dist/anonymous-policy.js.map +1 -1
- package/dist/apipath.d.ts +1 -0
- package/dist/apipath.js +1 -0
- package/dist/apipath.js.map +1 -1
- package/dist/monitor-tools.js +2 -1
- package/dist/monitor-tools.js.map +1 -1
- package/dist/operation-dto-schemas.d.ts +159 -0
- package/dist/operation-dto-schemas.js +155 -0
- package/dist/operation-dto-schemas.js.map +1 -0
- package/dist/operation-tools.d.ts +1104 -0
- package/dist/operation-tools.js +114 -0
- package/dist/operation-tools.js.map +1 -0
- package/dist/tools.d.ts +1 -1
- package/dist/tools.js +7 -0
- package/dist/tools.js.map +1 -1
- package/docs/cbam-monitor-v1.1.md +8 -0
- package/docs/cbam-operation-report-v1.1.md +65 -0
- package/package.json +1 -1
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import * as dto from "./operation-dto-schemas.js";
|
|
3
|
+
import { CbamOperationSkill } from "./apipath.js";
|
|
4
|
+
const text = (max) => z.string().min(1).max(max).refine(v => v.trim().length > 0);
|
|
5
|
+
const read = { sessionId: text(128), lang: z.enum(["zh", "en"]).optional(), messageId: text(128).optional(),
|
|
6
|
+
traceId: text(128).optional(), taskId: text(128).optional(), eventId: text(128).optional() };
|
|
7
|
+
const write = { ...read, idempotencyKey: text(128).describe("同一逻辑动作重试保持原键;超时先查询回执,不能换键重放。") };
|
|
8
|
+
const reportRead = { ...read, operationId: dto.operationId };
|
|
9
|
+
const reportWrite = { ...write, operationId: dto.operationId, dataVersion: z.number().int().nonnegative(),
|
|
10
|
+
baseSnapshotId: text(128).optional().describe("宿主保存 section_read/item_query 返回的快照 ID;0 是有效数据版本。"),
|
|
11
|
+
actionRef: z.strictObject({ actionKey: text(128) }).optional().describe("仅可信宿主注入已登记的材料动作引用。"),
|
|
12
|
+
confirmed: z.boolean().optional().describe("仅可信宿主根据用户明确操作注入;模型不能自行确认。") };
|
|
13
|
+
const moduleCode = z.enum(["general", "process", "condition", "quality"]);
|
|
14
|
+
const itemKey = text(129).describe("当前报告/父对象中的真实 itemKey;不能使用 clientItemKey、名称或数组下标。");
|
|
15
|
+
const parent = z.strictObject({ collection: text(64), itemKey: itemKey.optional() });
|
|
16
|
+
const fileRef = z.strictObject({ fileId: text(128) });
|
|
17
|
+
const boundaryFiles = z.strictObject({ add: z.array(z.strictObject({ clientItemKey: text(64), fileRef })).max(100).optional(),
|
|
18
|
+
remove: z.array(z.strictObject({ fileRefKey: text(128) })).max(100).optional() }).describe("仅引用已授权 fileId;不传 URL。省略保留,remove 需明确用户确认和当前 dataVersion。");
|
|
19
|
+
const paging = { pageNum: z.number().int().min(1).optional(), pageSize: z.number().int().min(1).max(50).optional() };
|
|
20
|
+
const textRead = { textField: text(100).optional(), textOffset: z.number().int().nonnegative().optional(), maxChars: z.number().int().min(1).max(4096).optional() };
|
|
21
|
+
const shape = (values) => ({ changes: values.optional(), clearFields: z.array(Object.keys(values.shape).length
|
|
22
|
+
? z.enum(Object.keys(values.shape)) : z.never()).max(100).optional() });
|
|
23
|
+
const check = (v, ctx) => {
|
|
24
|
+
const clears = v.clearFields || [];
|
|
25
|
+
if (new Set(clears).size !== clears.length || clears.some(k => Object.hasOwn(v.changes || {}, k)))
|
|
26
|
+
ctx.addIssue({ code: "custom", message: "clearFields 不得重复或与 changes 重复" });
|
|
27
|
+
};
|
|
28
|
+
const fields = (values, children = {}) => z.strictObject({ ...shape(values), ...children }).superRefine(check);
|
|
29
|
+
function items(values, addable = false, children = {}, updates = values) {
|
|
30
|
+
return z.strictObject({
|
|
31
|
+
...(addable ? { add: z.array(z.strictObject({ clientItemKey: text(64), values: values.refine(v => Object.keys(v).length > 0) })).max(100).optional() } : {}),
|
|
32
|
+
update: z.array(z.strictObject({ itemKey, ...shape(updates), ...children }).superRefine(check)).max(100).optional(),
|
|
33
|
+
}).describe("省略保留;update 用真实 itemKey+changes;add 用 clientItemKey+values,成功后读取真实键映射。删除必须使用 item_delete。");
|
|
34
|
+
}
|
|
35
|
+
export const operationPatches = {
|
|
36
|
+
general: fields(dto.general_generalValues),
|
|
37
|
+
process: z.strictObject({
|
|
38
|
+
boundaryFiles: boundaryFiles.optional(),
|
|
39
|
+
processInfo: fields(dto.process_processInfoValues).optional(),
|
|
40
|
+
processes: items(dto.process_processesValues, false, { routes: items(dto.process_routesValues, true).optional() }).optional(),
|
|
41
|
+
cbamProducts: items(dto.process_cbamProductsValues, false, { processConsumptions: items(dto.process_processConsumptionsValues).optional() }).optional(),
|
|
42
|
+
precursors: items(dto.process_precursorsValues, false, { routeQuantities: items(dto.process_routeQuantitiesValues).optional(), processConsumptions: items(dto.process_processConsumptionsValues).optional() }).optional(),
|
|
43
|
+
directEmissions: items(dto.process_directEmissionsValues).optional(),
|
|
44
|
+
nonCbamProducts: items(dto.process_nonCbamProductsValues).optional(),
|
|
45
|
+
electricityItems: items(dto.process_electricityItemsValues, true, {}, dto.process_electricityItemsUpdateValues).optional(),
|
|
46
|
+
heatFlows: items(dto.process_heatFlowsValues).optional(), wasteGasFlows: items(dto.process_wasteGasFlowsValues).optional(),
|
|
47
|
+
}),
|
|
48
|
+
condition: z.strictObject({ industryParameters: items(dto.condition_industryParametersValues).optional(),
|
|
49
|
+
zeroRatedFuel: fields(dto.condition_zeroRatedFuelValues).optional(),
|
|
50
|
+
facilityElectricity: fields(dto.condition_facilityElectricityValues, { generators: items(dto.condition_generatorsValues).optional() }).optional(),
|
|
51
|
+
co2Stage: fields(dto.condition_co2StageValues, { projects: items(dto.condition_projectsValues, true).optional() }).optional() }),
|
|
52
|
+
quality: z.strictObject({ quality: fields(dto.quality_qualityValues).optional(), dataGaps: items(dto.quality_dataGapsValues, true).optional() }),
|
|
53
|
+
};
|
|
54
|
+
const deletion = z.strictObject({ moduleCode, collection: text(64), parent: parent.optional(), itemKeys: z.array(itemKey).min(1).max(100) });
|
|
55
|
+
const source = z.strictObject({ sourceType: z.enum(["file", "message"]), sourceId: text(128) });
|
|
56
|
+
const fact = z.strictObject({ factId: text(128), sourceRef: source, locator: text(500), rawValue: z.unknown(), typedValue: z.unknown().optional(), unit: text(100).optional(), status: text(32) });
|
|
57
|
+
const processedSource = z.strictObject({ ...source.shape, status: z.enum(["PARSED", "EMPTY", "FAILED"]), reason: text(1000).optional() });
|
|
58
|
+
const candidateContext = { candidateId: text(128), status: z.enum(["CONFIRMED", "NEEDS_INPUT"]), sourceIds: z.array(text(128)).min(1).max(100),
|
|
59
|
+
lineage: z.array(z.strictObject({ pointer: text(500), factIds: z.array(text(128)).min(1).max(100), transform: text(1000).optional() })).max(1000), dependsOn: z.array(text(128)).max(100).optional() };
|
|
60
|
+
// 登记仅由宿主调用,保留无效候选供 Java 逐项校验和恢复。
|
|
61
|
+
// 每次实际写入报告仍须通过下方严格的模块增量结构校验。
|
|
62
|
+
const candidate = z.strictObject({ ...candidateContext, moduleCode: text(32), patch: z.record(z.string(), z.unknown()) });
|
|
63
|
+
const evidenceValues = z.strictObject({ evidenceType: z.enum(["calibration", "lab_analysis", "electricity_factor", "precursor_report", "equipment_maintenance", "data_quality_review", "other"]).optional(),
|
|
64
|
+
reviewFrequency: z.enum(["batch", "monthly", "quarterly", "reporting_year", "annual_calibration", "method_change", "supplier_update"]).optional(),
|
|
65
|
+
sourceName: text(40).optional(), evidenceNo: text(40).optional(), issueDate: z.iso.date().optional(), expiryDate: z.iso.date().optional(), remark: text(200).optional() });
|
|
66
|
+
export const operationSchemas = {
|
|
67
|
+
cbam_operation_prerequisite_query: z.strictObject({ ...read, view: z.enum(["summary", "factories", "plans", "accounting_tasks"]), factoryId: dto.operationId.optional(), planId: dto.operationId.optional(), ...paging }),
|
|
68
|
+
cbam_operation_material_advice: z.strictObject({ ...read, operationId: dto.operationId.optional(), taskId: text(128), cardId: text(128).optional() }),
|
|
69
|
+
cbam_operation_material_task: z.strictObject({ ...read, idempotencyKey: text(128).optional(), operation: z.discriminatedUnion("action", [
|
|
70
|
+
z.strictObject({ action: z.literal("sources_read"), sources: z.array(source).min(1).max(100) }),
|
|
71
|
+
z.strictObject({ action: z.literal("task_read"), operationId: dto.operationId, ...paging }),
|
|
72
|
+
z.strictObject({ action: z.literal("extraction_read"), operationId: dto.operationId, extractionResultId: text(128), collection: z.enum(["facts", "candidates", "unmappedFacts", "plannedActions", "invalidCandidates", "processedSources"]).optional(), ...paging }),
|
|
73
|
+
z.strictObject({ action: z.literal("batch_register"), operationId: dto.operationId, batchId: text(128), sources: z.array(source).min(1).max(100), revision: z.number().int().min(1), status: z.enum(["QUEUED", "PARSING", "FAILED"]) }),
|
|
74
|
+
z.strictObject({ action: z.literal("extraction_register"), operationId: dto.operationId, batchId: text(128), extractionResultId: text(128), processedSources: z.array(processedSource).min(1).max(100), facts: z.array(fact).max(1000), candidates: z.array(candidate).max(100), unmappedFacts: z.array(z.strictObject({ factId: text(128), reason: text(1000) })).max(1000) }),
|
|
75
|
+
]) }).superRefine((v, ctx) => { if (v.operation.action.endsWith("_register") && !v.idempotencyKey)
|
|
76
|
+
ctx.addIssue({ code: "custom", message: "Registration requires idempotencyKey" }); }),
|
|
77
|
+
cbam_operation_report_create: z.strictObject({ ...write, taskId: text(128), planId: dto.operationId, accountId: dto.operationId.optional(), general: dto.general_generalValues.optional() }),
|
|
78
|
+
cbam_operation_report_query: z.strictObject({ ...read, view: z.enum(["page", "summary", "overview"]), operationId: dto.operationId.optional(), factoryId: dto.operationId.optional(), planId: dto.operationId.optional(), name: text(100).optional(), ...paging }),
|
|
79
|
+
cbam_operation_section_read: z.strictObject({ ...reportRead, moduleCode, view: z.enum(["data", "schema", "reference", "text"]), referenceType: z.enum(["regions", "precursor_defaults", "cn_benchmarks"]).optional(), collection: text(64).optional(), parentCode: text(64).optional(), keyword: text(100).optional(), itemKey: itemKey.optional(), ...paging, ...textRead, fields: z.array(text(100)).max(30).optional() }),
|
|
80
|
+
cbam_operation_item_query: z.strictObject({ ...reportRead, moduleCode, collection: text(64), parent: parent.optional(), view: z.enum(["page", "detail", "text"]), itemKey: itemKey.optional(), fields: z.array(text(100)).max(30).optional(), ...paging, ...textRead }),
|
|
81
|
+
cbam_operation_general_patch: z.strictObject({ ...reportWrite, ...operationPatches.general.shape }).superRefine(check),
|
|
82
|
+
cbam_operation_process_patch: z.strictObject({ ...reportWrite, ...operationPatches.process.shape }),
|
|
83
|
+
cbam_operation_condition_patch: z.strictObject({ ...reportWrite, ...operationPatches.condition.shape }),
|
|
84
|
+
cbam_operation_quality_patch: z.strictObject({ ...reportWrite, ...operationPatches.quality.shape }),
|
|
85
|
+
cbam_operation_item_delete: z.strictObject({ ...reportWrite, ...deletion.shape }),
|
|
86
|
+
cbam_operation_evidence_read: z.strictObject({ ...reportRead, keyword: text(40).optional(), evidenceType: text(64).optional(), partCode: text(64).optional(), itemKey: itemKey.optional(), ...paging }),
|
|
87
|
+
cbam_operation_evidence_manage: z.strictObject({ ...reportWrite, operation: z.discriminatedUnion("action", [
|
|
88
|
+
z.strictObject({ action: z.literal("create"), evidence: evidenceValues.required({ evidenceType: true }), fileRef: fileRef.optional() }),
|
|
89
|
+
z.strictObject({ action: z.literal("update"), evidenceId: dto.operationId, patch: fields(evidenceValues), fileRef: fileRef.optional() }),
|
|
90
|
+
z.strictObject({ action: z.literal("bind"), evidenceId: dto.operationId.optional(), sourceEvidenceId: dto.operationId.optional(), partCode: text(64), itemKey }),
|
|
91
|
+
z.strictObject({ action: z.literal("unbind"), relationId: dto.operationId }),
|
|
92
|
+
z.strictObject({ action: z.literal("delete"), evidenceId: dto.operationId }),
|
|
93
|
+
]) }),
|
|
94
|
+
cbam_operation_report_save: z.strictObject({ ...reportWrite, actionRefs: z.partialRecord(moduleCode, text(128)).optional().describe("宿主专用 moduleCode -> 已登记 actionKey;多模块原子提交必须覆盖每个提交模块。"), patches: z.strictObject({ general: operationPatches.general.optional(), process: operationPatches.process.optional(), condition: operationPatches.condition.optional(), quality: operationPatches.quality.optional() }).optional(), deletions: z.array(deletion).max(100).optional() }),
|
|
95
|
+
cbam_operation_report_progress: z.strictObject({ ...reportRead, view: z.enum(["summary", "missing"]).optional(), ...paging }),
|
|
96
|
+
cbam_operation_report_generate: z.strictObject({ ...reportWrite, language: z.enum(["ZH", "EN"]) }),
|
|
97
|
+
};
|
|
98
|
+
export const operationToolNames = Object.keys(operationSchemas);
|
|
99
|
+
const paths = ["prerequisite/query", "material/advice", "material/task", "report/create", "report/query", "report/section/read", "report/item/query",
|
|
100
|
+
"report/patch/general", "report/patch/process", "report/patch/condition", "report/patch/quality", "report/item/delete", "evidence/read", "evidence/manage", "report/submit", "report/progress", "report/generate"];
|
|
101
|
+
export const operationRoutes = Object.fromEntries(operationToolNames.map((name, i) => [name, { method: "POST", path: CbamOperationSkill(paths[i]), bodyKind: "cbamOperation", maxRetries: 0 }]));
|
|
102
|
+
const workflow = "运营报告:先 prerequisite_query,必须选择已正式保存的监测计划。无合格计划则继续/创建监测计划,正式保存后恢复当前运营报告任务。report_create 成功立即展示右侧,再解析材料。四模块逐对象增量保存,草稿缺项不阻断独立数据保存。";
|
|
103
|
+
export const operationDescriptions = Object.fromEntries(operationToolNames.map(name => [name, workflow + " 使用 operationId 标识运营报告;planId 是来源,二者不能混用。读取 section_read(view=schema) 获取字段与 item_query 获取真实 itemKey;省略保留,0/false 有效,clearFields 显式清空。"]));
|
|
104
|
+
operationDescriptions.cbam_operation_material_task = "宿主专用可信材料读取/批次和提取登记工具。不得进入模型工具列表。单一 MCP action 覆盖五种操作;registered=true 只代表登记,不代表保存。";
|
|
105
|
+
operationDescriptions.cbam_operation_report_create += " 新任务持久化 taskId,重试复用 taskId 和 idempotencyKey,防止重复报告;无需上传或完整信息才能创建。";
|
|
106
|
+
operationDescriptions.cbam_operation_report_save += " 正式保存检查完整度并计算;已完成报告增量修改也执行完整校验,失败保留原结果。依赖修改可在 patches 中原子提交。";
|
|
107
|
+
operationDescriptions.cbam_operation_section_read += " schema 首次返回 sections 索引,必须再按 collection=sections[].name 读取完整字段。directEmissions 的 schema 含 semanticByMethod。长值用 view=text 逐块读取,dataVersion 必须一致。";
|
|
108
|
+
operationDescriptions.cbam_operation_report_progress += " summary 返回完整度和缺项数量;view=missing 分页读取全部缺项,到 hasMore=false 为止。缺项中的下标不是保存用 itemKey。";
|
|
109
|
+
operationDescriptions.cbam_operation_report_generate += " 生成当前已落库草稿或完成报告的受控 DOCX 下载入口;不生成文件管理 fileId,不宣称草稿已正式完成。";
|
|
110
|
+
export function buildOperationBody(args) {
|
|
111
|
+
const { operation, ...body } = args;
|
|
112
|
+
return operation && typeof operation === "object" ? { ...body, ...operation } : body;
|
|
113
|
+
}
|
|
114
|
+
//# sourceMappingURL=operation-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation-tools.js","sourceRoot":"","sources":["../src/operation-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,GAAG,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAGlD,MAAM,IAAI,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AAC1F,MAAM,IAAI,GAAG,EAAE,SAAS,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;IACzG,OAAO,EAAE,IAAI,CAAC,GAAG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C,CAAC,CAAC,EAAC,GAAG,IAAI,EAAC,GAAG,SAAS,EAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAClF,CAAC"}
|
package/dist/tools.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { z } from "zod";
|
|
|
2
2
|
export declare const schemas: Record<string, z.ZodObject<any> | undefined>;
|
|
3
3
|
export declare const exposedToolNames: readonly [...string[], "session_carbon_objects", "cbam_reference_search", "cbam_report_search", "cbam_report_read", "cbam_factory_read", "cbam_factory_save", "cbam_report_save", "cbam_process_manage", "cbam_precursor_manage", "cbam_source_flow_manage", "cbam_heat_power_update", "cbam_product_data_update", "cbam_sale_product_manage", "cbam_carbon_tax_manage", "cbam_data_quality_update", "cbam_report_generate", "cbam_document_read", "cbam_document_publish", "user_memory_recall", "user_memory_get", "user_memory_upsert", "user_memory_forget", "project_memory_recall", "project_memory_get", "project_memory_upsert", "project_memory_forget", "project_overview", "project_member_list", "project_task_search", "project_task_read", "project_session_search", "project_session_read", "project_calculation_search", "project_calculation_read", "project_emission_source_read", "project_enterprise_source_search", "project_enterprise_source_read", "project_enterprise_task_create", "modeling_re_modeling", "modeling_detail", "modeling_account_detail", "modeling_account_update_structured", "modeling_emission_detail", "modeling_emission_add_structured", "modeling_emission_batch_add_structured", "modeling_emission_update_structured", "modeling_emission_batch_update_structured", "modeling_emission_delete_structured", "modeling_execute_structured", "report_generate", "report_regenerate", "report_detail", "factor_search", "unit_list", "company_org_subject_query", "company_org_subject_batch_add", "company_org_subject_batch_update", "enterprise_computation_exists", "enterprise_computation_create_or_update", "enterprise_computation_batch_add", "enterprise_computation_batch_delete", "enterprise_computation_update_base_info", "enterprise_computation_detail", "enterprise_computation_period_list", "enterprise_emission_category_list", "enterprise_report_org_tree", "enterprise_report_generate", "enterprise_report_regenerate", "enterprise_report_file_record_retry", "enterprise_emission_batch_save", "enterprise_emission_batch_update", "enterprise_emission_batch_delete"];
|
|
4
4
|
export declare const descriptions: Record<string, string>;
|
|
5
|
-
export type BodyKind = "agentSkill" | "cbam" | "cbamMonitor" | "sessionContext" | "projectRead" | "projectEnterpriseTaskCreate" | "userMemoryRecall" | "userMemoryGet" | "userMemoryUpsert" | "projectMemoryUpsert" | "userMemoryForget" | "workspaceFile" | "multipartArtifact" | "factorSearch" | "singleEmissionAdd" | "enterpriseReport" | "enterpriseEmissionSave" | "enterpriseEmissionUpdate" | "enterprisePeriodList";
|
|
5
|
+
export type BodyKind = "agentSkill" | "cbam" | "cbamMonitor" | "cbamOperation" | "sessionContext" | "projectRead" | "projectEnterpriseTaskCreate" | "userMemoryRecall" | "userMemoryGet" | "userMemoryUpsert" | "projectMemoryUpsert" | "userMemoryForget" | "workspaceFile" | "multipartArtifact" | "factorSearch" | "singleEmissionAdd" | "enterpriseReport" | "enterpriseEmissionSave" | "enterpriseEmissionUpdate" | "enterprisePeriodList";
|
|
6
6
|
export type RoutePath = string | ((args: Record<string, unknown>) => string);
|
|
7
7
|
export interface ToolRoute {
|
|
8
8
|
method: "GET" | "POST";
|
package/dist/tools.js
CHANGED
|
@@ -2,6 +2,7 @@ import { z } from "zod";
|
|
|
2
2
|
import { createHash } from "node:crypto";
|
|
3
3
|
import * as apipath from "./apipath.js";
|
|
4
4
|
import { monitorSchemas, monitorToolNames, monitorRoutes, monitorDescriptions, buildMonitorBody } from "./monitor-tools.js";
|
|
5
|
+
import { operationSchemas, operationToolNames, operationRoutes, operationDescriptions, buildOperationBody } from "./operation-tools.js";
|
|
5
6
|
import { enterpriseEmissionSaveFactorContract, enterpriseEmissionUpdateFactorContract, ToolInputValidationError, validateEnterpriseFactorContract, } from "./tool-validation.js";
|
|
6
7
|
const sessionId = z
|
|
7
8
|
.string()
|
|
@@ -995,6 +996,7 @@ const cbamDataQuality = z.object({
|
|
|
995
996
|
});
|
|
996
997
|
export const schemas = {
|
|
997
998
|
...monitorSchemas,
|
|
999
|
+
...operationSchemas,
|
|
998
1000
|
session_carbon_objects: z.object({
|
|
999
1001
|
sessionId,
|
|
1000
1002
|
monitorPageNum: z.number().int().min(1).max(100000).optional().describe("监测计划/材料任务独立分页,从 1 开始。"),
|
|
@@ -1600,6 +1602,7 @@ export const schemas = {
|
|
|
1600
1602
|
schemas.enterprise_report_regenerate = schemas.enterprise_report_generate;
|
|
1601
1603
|
export const exposedToolNames = [
|
|
1602
1604
|
...monitorToolNames,
|
|
1605
|
+
...operationToolNames,
|
|
1603
1606
|
"session_carbon_objects",
|
|
1604
1607
|
"cbam_reference_search",
|
|
1605
1608
|
"cbam_report_search",
|
|
@@ -1675,6 +1678,7 @@ export const exposedToolNames = [
|
|
|
1675
1678
|
];
|
|
1676
1679
|
export const descriptions = {
|
|
1677
1680
|
...monitorDescriptions,
|
|
1681
|
+
...operationDescriptions,
|
|
1678
1682
|
session_carbon_objects: "Recover product-carbon accounts, enterprise-carbon computations, and CBAM reports bound to the current Agent session. Call this before guessing a lost business id. Omit module or use all for every family; module=footprint3 returns productCarbonAccounts, module=enterprise returns enterpriseCarbonComputations, and module=cbam returns cbamReports. One session may contain multiple CBAM reports, so match by reportName/org/factory and then pass the exact cbamReports[].reportId to every report-specific tool. Never substitute an enterprise year, product accountId, or another report id. When monitoring v1.1 is enabled, all/cbam also returns monitorPlans, monitorIntakes, activeMonitorPlanId and activeIntakeId; use monitorPageNum/monitorPageSize for their independent page metadata. Resume pending binding and failed material application steps before automatic progress display. Truncated intake steps expose an internal recovery reference for the host Agent. monitorPlans[].planId is a separate monitoring-plan identity. This tool is read-only and requires sessionId.",
|
|
1679
1683
|
cbam_reference_search: "Read CBAM reference data needed for the current step: accessible organizations and factories, countries, currencies, enum codes, product categories, default processes/precursors/products/CN/sale data, or report-scoped carbon-tax candidates. Request only needed types. Use returned ids/codes exactly and never invent dictionary or organization values. CARBON_TAX_CANDIDATE requires reportId and is returned directly at carbonTaxCandidates (not data.data). It includes products, emission/benchmark type mappings, benchmark rows, taxTypeOptions, offsetMethodOptions, currencyOptions, report-year inputDefaults, requiredUserInputs, and conditionalRules. Apply inputDefaults and continue without asking when requiredUserInputs is empty. currencyOptions.value is the request dictionary code and currencyOptions.unit is the displayed ISO unit. Pass a selected saleProductId to receive precursorOptions; also pass emissionValueType=1 (actual) or 2 (default) to receive valid emissionOptions. Benchmark record id and type are independent: type=1 reads bmgStar/BMg*, type=2 reads bmg/BMg. Large reference tables are paginated with pageNum/pageSize. Read-only.",
|
|
1680
1684
|
cbam_report_search: "Search CBAM reports accessible to the current user by optional name, organization, factory, year, and pagination. Use this or session_carbon_objects to resolve an exact reportId. A single Agent session can create and work with multiple CBAM reports; never silently select the first result when several reports match. Read-only.",
|
|
@@ -1759,6 +1763,7 @@ descriptions.enterprise_report_generate = enterpriseReportPeriodRule + descripti
|
|
|
1759
1763
|
descriptions.enterprise_report_regenerate = enterpriseReportPeriodRule + descriptions.enterprise_report_regenerate;
|
|
1760
1764
|
export const toolRoutes = {
|
|
1761
1765
|
...monitorRoutes,
|
|
1766
|
+
...operationRoutes,
|
|
1762
1767
|
session_carbon_objects: {
|
|
1763
1768
|
method: "POST",
|
|
1764
1769
|
path: apipath.SessionBusinessRefs(),
|
|
@@ -2231,6 +2236,8 @@ export const toolRoutes = {
|
|
|
2231
2236
|
export function buildBody(route, args) {
|
|
2232
2237
|
if (route.bodyKind === "cbamMonitor")
|
|
2233
2238
|
return buildMonitorBody(args);
|
|
2239
|
+
if (route.bodyKind === "cbamOperation")
|
|
2240
|
+
return buildOperationBody(args);
|
|
2234
2241
|
if (route.bodyKind === "cbam") {
|
|
2235
2242
|
const body = { ...args };
|
|
2236
2243
|
const action = body.action;
|