@aifabrix/builder 2.59.0 → 2.61.2
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/README.md +14 -11
- package/docs/README.md +80 -0
- package/docs/builder-help/evidence-patterns.json +155 -0
- package/docs/builder-help/golden-examples/crm-company.json +30 -0
- package/docs/builder-help/golden-examples/crm-deal.json +29 -0
- package/docs/builder-help/golden-examples/document-storage-keyed-get.json +85 -0
- package/docs/builder-help/golden-examples/document-storage.json +30 -0
- package/docs/builder-help/golden-examples/meeting-transcript.json +29 -0
- package/docs/builder-help/golden-examples/repository-template.json +29 -0
- package/docs/builder-help/golden-examples/service-ticket.json +29 -0
- package/docs/builder-help/platform-roles.json +98 -0
- package/docs/builder-help/resource-type-catalog.json +402 -0
- package/lib/agent-kit/git-identity.js +180 -0
- package/lib/agent-kit/setup.js +3 -0
- package/lib/agent-kit/start.js +45 -1
- package/lib/api/configuration.api.js +131 -0
- package/lib/api/role-assistant-test-job.api.js +60 -0
- package/lib/api/system-secrets.api.js +72 -0
- package/lib/api/work-search.api.js +13 -6
- package/lib/app/deploy.js +8 -1
- package/lib/app/run-docker-fallback.js +6 -1
- package/lib/app/run-helpers.js +2 -1
- package/lib/app/run-parameter-sync.js +142 -0
- package/lib/app/show-display.js +1 -0
- package/lib/app/show-online.js +15 -0
- package/lib/build/docker-build-args.js +5 -2
- package/lib/build/index.js +3 -2
- package/lib/build/standard-docker-build.js +6 -3
- package/lib/cli/setup-app.js +19 -1
- package/lib/cli/setup-environment.js +156 -0
- package/lib/cli/setup-utility.js +24 -1
- package/lib/commands/datasource-capability-upsert-cli.js +112 -0
- package/lib/commands/datasource-capability.js +4 -2
- package/lib/commands/env-secret-context.js +113 -0
- package/lib/commands/env-secret-list.js +200 -0
- package/lib/commands/env-secret-push-confirm.js +54 -0
- package/lib/commands/env-secret-push-run.js +227 -0
- package/lib/commands/env-secret-push.js +168 -0
- package/lib/commands/repair-datasource-apply.js +2 -0
- package/lib/commands/repair-datasource-keyed-document.js +122 -0
- package/lib/commands/repair-datasource-run.js +1 -0
- package/lib/commands/role-assistant.js +7 -0
- package/lib/commands/setup-modes.js +1 -8
- package/lib/commands/setup-prompts.js +2 -180
- package/lib/commands/verify-operations-skip-e2e.js +25 -1
- package/lib/commands/verify-operations-steps.js +13 -1
- package/lib/commands/wizard-config-normalizer.js +7 -4
- package/lib/commands/wizard-core.js +5 -157
- package/lib/commands/wizard-file-saving.js +163 -0
- package/lib/core/env-platform-expand.js +97 -0
- package/lib/core/secrets-env-content.js +42 -4
- package/lib/core/secrets-env-write.js +10 -3
- package/lib/core/secrets-load.js +4 -2
- package/lib/datasource/binary-documents-validator.js +190 -0
- package/lib/datasource/capability/run-capability-upsert.js +202 -0
- package/lib/datasource/capability/upsert-ingredients.js +291 -0
- package/lib/datasource/capability/upsert-operations.js +138 -0
- package/lib/datasource/capability/upsert-test-scaffold.js +189 -0
- package/lib/datasource/validate.js +12 -5
- package/lib/deployment/installation/azure-infra-stage.js +3 -1
- package/lib/deployment/installation/infra-catalog.js +2 -5
- package/lib/generator/builders.js +17 -0
- package/lib/generator/helpers.js +23 -2
- package/lib/generator/index.js +13 -6
- package/lib/lifecycle/product-model.js +4 -3
- package/lib/lifecycle/report-display.js +3 -2
- package/lib/parameters/infra-parameter-catalog.js +1 -1
- package/lib/programmatic/builder-help-enterprise-sync-fabrix.js +1 -1
- package/lib/programmatic/builder-help-governance.js +1 -1
- package/lib/programmatic/builder-help.js +1 -1
- package/lib/role-assistant/test-cases-search.js +3 -0
- package/lib/role-assistant/test-job-runner.js +125 -0
- package/lib/role-assistant/test-runner-search.js +44 -2
- package/lib/role-assistant/test-runner-workhub-answers.js +4 -1
- package/lib/role-assistant/test-runner-workhub-missing-fields.js +42 -0
- package/lib/role-assistant/test-runner-workhub-wait-stop.js +94 -0
- package/lib/role-assistant/test-runner-workhub.js +28 -19
- package/lib/schema/application-schema.json +205 -2
- package/lib/schema/external-datasource.schema.json +23 -3
- package/lib/schema/infra-parameter.schema.json +139 -33
- package/lib/schema/infra.parameter.yaml +416 -66
- package/lib/schema/infrastructure-schema.json +10 -35
- package/lib/utils/compose-generate-docker-compose.js +16 -9
- package/lib/utils/datasource-binary-evidence.js +92 -0
- package/lib/utils/datasource-test-run-capability-scope.js +44 -1
- package/lib/utils/datasource-test-run-debug-display.js +2 -0
- package/lib/utils/datasource-test-run-display.js +8 -2
- package/lib/utils/datasource-test-run-issue-guidance.js +176 -0
- package/lib/utils/datasource-test-run-tty-log.js +2 -0
- package/lib/utils/docker-build.js +29 -8
- package/lib/utils/docker-manifest-public-port.js +36 -0
- package/lib/utils/env-copy.js +11 -10
- package/lib/utils/external-system-system-test-tty.js +3 -2
- package/lib/utils/image-tags.js +2 -2
- package/lib/utils/platform-kv-ref.js +1 -1
- package/lib/utils/platform-resolution.js +226 -0
- package/lib/utils/prepare-local-data-mount.js +58 -0
- package/lib/utils/resolve-docker-image-ref.js +8 -3
- package/lib/utils/secrets-helpers.js +0 -1
- package/lib/utils/system-secret-mapping.js +125 -0
- package/lib/utils/test-log-writer.js +2 -1
- package/lib/validation/external-manifest-validator.js +5 -0
- package/lib/validation/openapi-contract-surface-validator.js +3 -1
- package/lib/validation/validate-external-file.js +5 -1
- package/package.json +5 -4
- package/templates/README.md +2 -1
- package/templates/agent-kit/agent-kit.yaml +4 -1
- package/templates/agent-kit/instructions/AGENTKIT.md +1 -1
- package/templates/agent-kit/instructions/root.AGENTS.md +2 -0
- package/templates/agent-kit/skills/aifabrix-connected-system/SKILL.md +35 -2
- package/templates/agent-kit/skills/aifabrix-connected-system/references/delivery-gates.md +15 -0
- package/templates/agent-kit/skills/aifabrix-connected-system/scripts/delivery-verdict.js +176 -0
- package/templates/agent-kit/skills/aifabrix-plan/SKILL.md +6 -2
- package/templates/agent-kit/skills/aifabrix-prove/SKILL.md +28 -2
- package/templates/agent-kit/skills/aifabrix-prove/references/evidence-lifecycle.md +22 -0
- package/templates/agent-kit/skills/aifabrix-role-assistant/SKILL.md +28 -1
- package/templates/agent-kit/skills/aifabrix-role-assistant/references/testing-playbook.md +117 -0
- package/templates/agent-kit/skills/shared/feedback.md +31 -0
- package/templates/agent-kit/skills/shared/hosts.md +13 -3
- package/templates/agent-kit/skills/shared/interaction.md +83 -0
- package/templates/agent-kit/skills/shared/status.md +76 -0
- package/templates/agent-kit/workspace/BUILDER_IMPROVEMENT_FINDINGS.md +27 -0
- package/templates/applications/builder-api/application.yaml +1 -1
- package/templates/applications/builder-api/env.template +5 -1
- package/templates/applications/dataplane/application.yaml +30 -2
- package/templates/applications/dataplane/env.template +36 -5
- package/templates/applications/keycloak/application.yaml +6 -1
- package/templates/applications/miso-controller/application.yaml +96 -1
- package/templates/applications/miso-controller/env.template +63 -37
- package/templates/applications/miso-controller/rbac.yaml +17 -0
- package/templates/external-system/external-datasource.yaml.hbs +7 -1
- package/templates/marketplace/main.json +73 -225
- package/templates/python/Dockerfile.hbs +2 -0
- package/templates/python/docker-compose.hbs +1 -1
- package/templates/typescript/Dockerfile.hbs +2 -0
- package/templates/typescript/docker-compose.hbs +12 -0
- package/templates/agent-kit/skills/aifabrix-plan/references/interaction.md +0 -34
- /package/{lib/programmatic/help-content → docs/builder-help/content}/channel-onboarding.md +0 -0
- /package/{lib/programmatic/help-content → docs/builder-help/content}/cip-overview.md +0 -0
- /package/{lib/programmatic/help-content → docs/builder-help/content}/connected-system-ui.md +0 -0
- /package/{lib/programmatic/help-content → docs/builder-help/content}/dimensions-guide.md +0 -0
- /package/{lib/programmatic/help-content → docs/builder-help/content}/enterprise-sync-fabrix.md +0 -0
- /package/{lib/programmatic/help-content → docs/builder-help/content}/overview.md +0 -0
- /package/{lib/programmatic/help-content → docs/builder-help/content}/subscription-guide.md +0 -0
- /package/{lib/programmatic/help-content → docs/builder-help/content}/workflow.md +0 -0
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "1.0.0",
|
|
3
|
+
"source": "baseline-resourcetypes.json",
|
|
4
|
+
"lastSynced": "2026-08-22",
|
|
5
|
+
"minimumSystemKeys": [
|
|
6
|
+
"customer",
|
|
7
|
+
"contact",
|
|
8
|
+
"employee",
|
|
9
|
+
"project",
|
|
10
|
+
"task",
|
|
11
|
+
"meeting",
|
|
12
|
+
"document",
|
|
13
|
+
"approval",
|
|
14
|
+
"contract",
|
|
15
|
+
"invoice",
|
|
16
|
+
"deal",
|
|
17
|
+
"ticket",
|
|
18
|
+
"message",
|
|
19
|
+
"channel",
|
|
20
|
+
"workspace",
|
|
21
|
+
"knowledge",
|
|
22
|
+
"event"
|
|
23
|
+
],
|
|
24
|
+
"resourceTypes": [
|
|
25
|
+
{
|
|
26
|
+
"key": "approval",
|
|
27
|
+
"displayName": "Approval",
|
|
28
|
+
"description": "Approval request, decision, review process, or authorization workflow item.",
|
|
29
|
+
"category": "governance",
|
|
30
|
+
"defaultRiskLevel": "high",
|
|
31
|
+
"status": "active"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"key": "asset",
|
|
35
|
+
"displayName": "Asset",
|
|
36
|
+
"description": "Managed physical, digital, financial, or operational business asset.",
|
|
37
|
+
"category": "business",
|
|
38
|
+
"defaultRiskLevel": "medium",
|
|
39
|
+
"status": "active"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"key": "attachment",
|
|
43
|
+
"displayName": "Attachment",
|
|
44
|
+
"description": "File attachment, uploaded content, supporting artifact, or binary business asset.",
|
|
45
|
+
"category": "content",
|
|
46
|
+
"defaultRiskLevel": "low",
|
|
47
|
+
"status": "active"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"key": "balance",
|
|
51
|
+
"displayName": "Balance",
|
|
52
|
+
"description": "Leave, absence, or accrued time-off balance for a person.",
|
|
53
|
+
"category": "people",
|
|
54
|
+
"defaultRiskLevel": "medium",
|
|
55
|
+
"status": "active"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"key": "budget",
|
|
59
|
+
"displayName": "Budget",
|
|
60
|
+
"description": "Budget allocation, financial plan, spending target, or funding record.",
|
|
61
|
+
"category": "business",
|
|
62
|
+
"defaultRiskLevel": "medium",
|
|
63
|
+
"status": "active"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"key": "case",
|
|
67
|
+
"displayName": "Case",
|
|
68
|
+
"description": "Support request, incident, issue, service ticket, or customer problem record.",
|
|
69
|
+
"category": "business",
|
|
70
|
+
"defaultRiskLevel": "medium",
|
|
71
|
+
"status": "active"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"key": "channel",
|
|
75
|
+
"displayName": "Channel",
|
|
76
|
+
"description": "Collaboration channel, team space, or communication group.",
|
|
77
|
+
"category": "collaboration",
|
|
78
|
+
"defaultRiskLevel": "low",
|
|
79
|
+
"status": "active"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"key": "contact",
|
|
83
|
+
"displayName": "Contact",
|
|
84
|
+
"description": "Individual person associated with a customer, supplier, partner, or other business entity.",
|
|
85
|
+
"category": "people",
|
|
86
|
+
"defaultRiskLevel": "medium",
|
|
87
|
+
"status": "active"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"key": "contract",
|
|
91
|
+
"displayName": "Contract",
|
|
92
|
+
"description": "Formal agreement, legal commitment, or business contract between parties.",
|
|
93
|
+
"category": "governance",
|
|
94
|
+
"defaultRiskLevel": "high",
|
|
95
|
+
"status": "active"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"key": "customer",
|
|
99
|
+
"displayName": "Customer",
|
|
100
|
+
"description": "Organization, account, client, or business entity that purchases, receives, or is associated with products or services.",
|
|
101
|
+
"category": "business",
|
|
102
|
+
"defaultRiskLevel": "medium",
|
|
103
|
+
"status": "active"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"key": "deal",
|
|
107
|
+
"displayName": "Deal",
|
|
108
|
+
"description": "Commercial deal, sales opportunity, or revenue pursuit in the sales pipeline.",
|
|
109
|
+
"category": "business",
|
|
110
|
+
"defaultRiskLevel": "medium",
|
|
111
|
+
"status": "active"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"key": "decision",
|
|
115
|
+
"displayName": "Decision",
|
|
116
|
+
"description": "Business decision, resolution, approved action, or governance outcome.",
|
|
117
|
+
"category": "governance",
|
|
118
|
+
"defaultRiskLevel": "high",
|
|
119
|
+
"status": "active"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"key": "department",
|
|
123
|
+
"displayName": "Department",
|
|
124
|
+
"description": "Organizational unit, business function, or department.",
|
|
125
|
+
"category": "people",
|
|
126
|
+
"defaultRiskLevel": "medium",
|
|
127
|
+
"status": "active"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"key": "document",
|
|
131
|
+
"displayName": "Document",
|
|
132
|
+
"description": "Business document, file, presentation, contract, or knowledge artifact.",
|
|
133
|
+
"category": "content",
|
|
134
|
+
"defaultRiskLevel": "medium",
|
|
135
|
+
"status": "active"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"key": "folder",
|
|
139
|
+
"displayName": "Folder",
|
|
140
|
+
"description": "Container or directory for documents and files.",
|
|
141
|
+
"category": "content",
|
|
142
|
+
"defaultRiskLevel": "low",
|
|
143
|
+
"status": "active"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"key": "hr-report",
|
|
147
|
+
"displayName": "HR Report",
|
|
148
|
+
"description": "People and HR report, workforce analytics rollup, or period summary. Distinct from Document.",
|
|
149
|
+
"category": "people",
|
|
150
|
+
"defaultRiskLevel": "medium",
|
|
151
|
+
"status": "active"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"key": "email",
|
|
155
|
+
"displayName": "Email",
|
|
156
|
+
"description": "Email message, conversation, or business communication record.",
|
|
157
|
+
"category": "communication",
|
|
158
|
+
"defaultRiskLevel": "low",
|
|
159
|
+
"status": "active"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"key": "employee",
|
|
163
|
+
"displayName": "Employee",
|
|
164
|
+
"description": "Internal worker, staff member, contractor, or workforce resource.",
|
|
165
|
+
"category": "people",
|
|
166
|
+
"defaultRiskLevel": "medium",
|
|
167
|
+
"status": "active"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"key": "event",
|
|
171
|
+
"displayName": "Event",
|
|
172
|
+
"description": "Business event, calendar event, milestone, or scheduled activity.",
|
|
173
|
+
"category": "communication",
|
|
174
|
+
"defaultRiskLevel": "low",
|
|
175
|
+
"status": "active"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"key": "expense",
|
|
179
|
+
"displayName": "Expense",
|
|
180
|
+
"description": "Expense claim, cost record, reimbursement, or financial expenditure.",
|
|
181
|
+
"category": "business",
|
|
182
|
+
"defaultRiskLevel": "medium",
|
|
183
|
+
"status": "active"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"key": "finance-report",
|
|
187
|
+
"displayName": "Finance Report",
|
|
188
|
+
"description": "Financial report, analytics rollup, or period summary over finance records. Distinct from Document.",
|
|
189
|
+
"category": "business",
|
|
190
|
+
"defaultRiskLevel": "medium",
|
|
191
|
+
"status": "active"
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"key": "invoice",
|
|
195
|
+
"displayName": "Invoice",
|
|
196
|
+
"description": "Billing document, payment request, or financial charge record.",
|
|
197
|
+
"category": "business",
|
|
198
|
+
"defaultRiskLevel": "high",
|
|
199
|
+
"status": "active"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"key": "knowledge",
|
|
203
|
+
"displayName": "Knowledge",
|
|
204
|
+
"description": "Knowledge article, FAQ, guidance, procedure, or reference content.",
|
|
205
|
+
"category": "content",
|
|
206
|
+
"defaultRiskLevel": "low",
|
|
207
|
+
"status": "active"
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"key": "llm",
|
|
211
|
+
"displayName": "LLM",
|
|
212
|
+
"description": "Large language model provider capability surface for chat completion and embedding operations.",
|
|
213
|
+
"category": "content",
|
|
214
|
+
"defaultRiskLevel": "medium",
|
|
215
|
+
"status": "active"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"key": "meeting",
|
|
219
|
+
"displayName": "Meeting",
|
|
220
|
+
"description": "Scheduled interaction, discussion, workshop, or business event involving participants.",
|
|
221
|
+
"category": "collaboration",
|
|
222
|
+
"defaultRiskLevel": "low",
|
|
223
|
+
"status": "active"
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"key": "message",
|
|
227
|
+
"displayName": "Message",
|
|
228
|
+
"description": "Chat, Teams message, discussion, or conversational communication record.",
|
|
229
|
+
"category": "communication",
|
|
230
|
+
"defaultRiskLevel": "low",
|
|
231
|
+
"status": "active"
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"key": "note",
|
|
235
|
+
"displayName": "Note",
|
|
236
|
+
"description": "Business note, comment, activity note, CRM note, or user-generated contextual information.",
|
|
237
|
+
"category": "content",
|
|
238
|
+
"defaultRiskLevel": "low",
|
|
239
|
+
"status": "active"
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"key": "objective",
|
|
243
|
+
"displayName": "Objective",
|
|
244
|
+
"description": "Strategic goal, business objective, target outcome, or organizational priority.",
|
|
245
|
+
"category": "business",
|
|
246
|
+
"defaultRiskLevel": "medium",
|
|
247
|
+
"status": "active"
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"key": "opportunity",
|
|
251
|
+
"displayName": "Opportunity",
|
|
252
|
+
"description": "Potential sales, revenue, business development, or commercial opportunity.",
|
|
253
|
+
"category": "business",
|
|
254
|
+
"defaultRiskLevel": "medium",
|
|
255
|
+
"status": "active"
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"key": "operations-report",
|
|
259
|
+
"displayName": "Operations Report",
|
|
260
|
+
"description": "Operations report, operational analytics rollup, or period summary. Distinct from Document.",
|
|
261
|
+
"category": "business",
|
|
262
|
+
"defaultRiskLevel": "medium",
|
|
263
|
+
"status": "active"
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
"key": "order",
|
|
267
|
+
"displayName": "Order",
|
|
268
|
+
"description": "Customer order, purchase request, sales order, or transaction record.",
|
|
269
|
+
"category": "business",
|
|
270
|
+
"defaultRiskLevel": "medium",
|
|
271
|
+
"status": "active"
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"key": "organization",
|
|
275
|
+
"displayName": "Organization",
|
|
276
|
+
"description": "Internal organizational entity, subsidiary, legal entity, or business unit.",
|
|
277
|
+
"category": "business",
|
|
278
|
+
"defaultRiskLevel": "medium",
|
|
279
|
+
"status": "active"
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"key": "owner",
|
|
283
|
+
"displayName": "Owner",
|
|
284
|
+
"description": "Individual user or account responsible for ownership, stewardship, or accountability of a record or business object.",
|
|
285
|
+
"category": "people",
|
|
286
|
+
"defaultRiskLevel": "medium",
|
|
287
|
+
"status": "active"
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"key": "partner",
|
|
291
|
+
"displayName": "Partner",
|
|
292
|
+
"description": "External organization participating in business collaboration, delivery, sales, or strategic activities.",
|
|
293
|
+
"category": "business",
|
|
294
|
+
"defaultRiskLevel": "medium",
|
|
295
|
+
"status": "active"
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"key": "payment",
|
|
299
|
+
"displayName": "Payment",
|
|
300
|
+
"description": "Payment transaction, settlement, receipt, or financial payment record.",
|
|
301
|
+
"category": "business",
|
|
302
|
+
"defaultRiskLevel": "high",
|
|
303
|
+
"status": "active"
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
"key": "policy",
|
|
307
|
+
"displayName": "Policy",
|
|
308
|
+
"description": "Policy, guideline, compliance rule, or governance document.",
|
|
309
|
+
"category": "governance",
|
|
310
|
+
"defaultRiskLevel": "high",
|
|
311
|
+
"status": "active"
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
"key": "position",
|
|
315
|
+
"displayName": "Position",
|
|
316
|
+
"description": "Job role, position, title, or workforce assignment.",
|
|
317
|
+
"category": "people",
|
|
318
|
+
"defaultRiskLevel": "medium",
|
|
319
|
+
"status": "active"
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
"key": "product",
|
|
323
|
+
"displayName": "Product",
|
|
324
|
+
"description": "Product, service offering, subscription, or item available for sale or delivery.",
|
|
325
|
+
"category": "business",
|
|
326
|
+
"defaultRiskLevel": "medium",
|
|
327
|
+
"status": "active"
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
"key": "project",
|
|
331
|
+
"displayName": "Project",
|
|
332
|
+
"description": "Temporary initiative or work effort with defined objectives, timelines, resources, and deliverables.",
|
|
333
|
+
"category": "business",
|
|
334
|
+
"defaultRiskLevel": "medium",
|
|
335
|
+
"status": "active"
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
"key": "repository",
|
|
339
|
+
"displayName": "Repository",
|
|
340
|
+
"description": "Version-controlled source repository for integration manifests, CIP pipelines, and workspace sync.",
|
|
341
|
+
"category": "content",
|
|
342
|
+
"defaultRiskLevel": "medium",
|
|
343
|
+
"status": "active"
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"key": "risk",
|
|
347
|
+
"displayName": "Risk",
|
|
348
|
+
"description": "Potential business, operational, compliance, security, or financial risk.",
|
|
349
|
+
"category": "governance",
|
|
350
|
+
"defaultRiskLevel": "high",
|
|
351
|
+
"status": "active"
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
"key": "sales-report",
|
|
355
|
+
"displayName": "Sales Report",
|
|
356
|
+
"description": "Sales report, pipeline analytics rollup, or commercial period summary. Distinct from Document.",
|
|
357
|
+
"category": "business",
|
|
358
|
+
"defaultRiskLevel": "medium",
|
|
359
|
+
"status": "active"
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
"key": "supplier",
|
|
363
|
+
"displayName": "Supplier",
|
|
364
|
+
"description": "Organization providing products, services, materials, or external resources.",
|
|
365
|
+
"category": "business",
|
|
366
|
+
"defaultRiskLevel": "medium",
|
|
367
|
+
"status": "active"
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
"key": "task",
|
|
371
|
+
"displayName": "Task",
|
|
372
|
+
"description": "Work item, action, assignment, or activity that can be completed by an individual or team.",
|
|
373
|
+
"category": "business",
|
|
374
|
+
"defaultRiskLevel": "medium",
|
|
375
|
+
"status": "active"
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
"key": "template",
|
|
379
|
+
"displayName": "Template",
|
|
380
|
+
"description": "Integration workspace template used to materialize local Builder workspaces.",
|
|
381
|
+
"category": "content",
|
|
382
|
+
"defaultRiskLevel": "low",
|
|
383
|
+
"status": "active"
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
"key": "ticket",
|
|
387
|
+
"displayName": "Ticket",
|
|
388
|
+
"description": "Support ticket, service request, incident, or customer issue record.",
|
|
389
|
+
"category": "business",
|
|
390
|
+
"defaultRiskLevel": "medium",
|
|
391
|
+
"status": "active"
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
"key": "workspace",
|
|
395
|
+
"displayName": "Workspace",
|
|
396
|
+
"description": "Shared workspace, site, or collaboration area for teams and content.",
|
|
397
|
+
"category": "collaboration",
|
|
398
|
+
"defaultRiskLevel": "low",
|
|
399
|
+
"status": "active"
|
|
400
|
+
}
|
|
401
|
+
]
|
|
402
|
+
}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Git commit identity for onboarding and Agent Kit GitHub work.
|
|
3
|
+
*
|
|
4
|
+
* Resolution order:
|
|
5
|
+
* 1. Existing `git config` — never rewritten, because it is the user's own setting.
|
|
6
|
+
* 2. The AI Fabrix login token's claims, offered as editable defaults.
|
|
7
|
+
* 3. The prompt answer, written to git config.
|
|
8
|
+
*
|
|
9
|
+
* The GitHub token is deliberately not used for the address: `gh api user` returns null whenever
|
|
10
|
+
* the account keeps its email private, and reading `user/emails` would demand the broader `user`
|
|
11
|
+
* scope for a value the login token already holds.
|
|
12
|
+
*
|
|
13
|
+
* @fileoverview Resolve and persist git user.name / user.email
|
|
14
|
+
* @author AI Fabrix Team
|
|
15
|
+
* @version 1.0.0
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
'use strict';
|
|
19
|
+
|
|
20
|
+
const { execFileSync } = require('child_process');
|
|
21
|
+
const logger = require('../utils/logger');
|
|
22
|
+
|
|
23
|
+
const EMAIL_RE = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @param {Function} exec - execFileSync
|
|
27
|
+
* @param {string} key - Config key
|
|
28
|
+
* @param {boolean} global - Read the global scope only
|
|
29
|
+
* @returns {string} Trimmed value or ''
|
|
30
|
+
*/
|
|
31
|
+
function readConfig(exec, key, global) {
|
|
32
|
+
try {
|
|
33
|
+
const args = global ? ['config', '--global', '--get', key] : ['config', '--get', key];
|
|
34
|
+
return String(exec('git', args, { encoding: 'utf8', stdio: ['ignore', 'pipe', 'ignore'] })).trim();
|
|
35
|
+
} catch {
|
|
36
|
+
return '';
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Current identity, preferring any effective value (local or global) over none.
|
|
42
|
+
* @param {Object} [options] - `execFileSync`
|
|
43
|
+
* @returns {{ name: string, email: string, complete: boolean }}
|
|
44
|
+
*/
|
|
45
|
+
function readGitIdentity(options = {}) {
|
|
46
|
+
const exec = options.execFileSync || execFileSync;
|
|
47
|
+
const name = readConfig(exec, 'user.name', false);
|
|
48
|
+
const email = readConfig(exec, 'user.email', false);
|
|
49
|
+
return { name, email, complete: Boolean(name && email) };
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function decodeJwtClaims(token) {
|
|
53
|
+
const raw = String(token || '');
|
|
54
|
+
const parts = raw.split('.');
|
|
55
|
+
if (parts.length < 2) return null;
|
|
56
|
+
try {
|
|
57
|
+
return JSON.parse(Buffer.from(parts[1], 'base64url').toString('utf8'));
|
|
58
|
+
} catch {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Name and email from the AI Fabrix login token, used as prompt defaults.
|
|
65
|
+
* @param {Object} [options] - `config` and `controller` overrides for tests
|
|
66
|
+
* @returns {Promise<{ name: string, email: string }>} Empty strings when unavailable
|
|
67
|
+
*/
|
|
68
|
+
async function identityFromLoginToken(options = {}) {
|
|
69
|
+
const config = options.config || require('../core/config');
|
|
70
|
+
try {
|
|
71
|
+
const controller = options.controller || (await config.getControllerUrl());
|
|
72
|
+
if (!controller) return { name: '', email: '' };
|
|
73
|
+
const entry = await config.getDeviceToken(controller);
|
|
74
|
+
const claims = decodeJwtClaims(entry && (entry.token || entry.accessToken));
|
|
75
|
+
if (!claims) return { name: '', email: '' };
|
|
76
|
+
return {
|
|
77
|
+
name: String(claims.name || '').trim(),
|
|
78
|
+
email: String(claims.email || claims.preferred_username || '').trim()
|
|
79
|
+
};
|
|
80
|
+
} catch {
|
|
81
|
+
return { name: '', email: '' };
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* @param {Object} [options] - `config`
|
|
87
|
+
* @returns {Promise<string>} adminEmail from config.yaml, or ''
|
|
88
|
+
*/
|
|
89
|
+
async function emailFromConfig(options = {}) {
|
|
90
|
+
const config = options.config || require('../core/config');
|
|
91
|
+
try {
|
|
92
|
+
const cfg = await config.getConfig();
|
|
93
|
+
return String((cfg && cfg.adminEmail) || '').trim();
|
|
94
|
+
} catch {
|
|
95
|
+
return '';
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* @param {string} value - Candidate address
|
|
101
|
+
* @returns {boolean|string} true, or the reason it is rejected
|
|
102
|
+
*/
|
|
103
|
+
function validateEmail(value) {
|
|
104
|
+
return EMAIL_RE.test(String(value || '').trim()) || 'Enter an email address, for example name@example.com';
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function validateName(value) {
|
|
108
|
+
return String(value || '').trim().length > 0 || 'Enter the name to record on commits';
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
async function promptIdentity(defaults, deps) {
|
|
112
|
+
const inquirer = deps.inquirer || require('inquirer');
|
|
113
|
+
return inquirer.prompt([
|
|
114
|
+
{
|
|
115
|
+
type: 'input',
|
|
116
|
+
name: 'name',
|
|
117
|
+
message: 'Name for git commits',
|
|
118
|
+
default: defaults.name || undefined,
|
|
119
|
+
validate: validateName
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
type: 'input',
|
|
123
|
+
name: 'email',
|
|
124
|
+
message: 'Email for git commits',
|
|
125
|
+
default: defaults.email || undefined,
|
|
126
|
+
validate: validateEmail
|
|
127
|
+
}
|
|
128
|
+
]);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
function writeGitIdentity(identity, options) {
|
|
132
|
+
const exec = options.execFileSync || execFileSync;
|
|
133
|
+
exec('git', ['config', '--global', 'user.name', identity.name], { stdio: 'ignore' });
|
|
134
|
+
exec('git', ['config', '--global', 'user.email', identity.email], { stdio: 'ignore' });
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
function missingIdentityError(defaults) {
|
|
138
|
+
const name = defaults.name || 'Your Name';
|
|
139
|
+
const email = defaults.email || 'you@example.com';
|
|
140
|
+
return new Error(
|
|
141
|
+
'Git commit identity is not configured. Run:\n' +
|
|
142
|
+
` git config --global user.name ${JSON.stringify(name)}\n` +
|
|
143
|
+
` git config --global user.email ${email}`
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Ensures git has a commit identity, asking only when one is missing.
|
|
149
|
+
* @param {Object} [options] - `interactive`, `execFileSync`, `inquirer`, `config`
|
|
150
|
+
* @returns {Promise<{ name: string, email: string, source: 'git'|'prompt' }>}
|
|
151
|
+
*/
|
|
152
|
+
async function ensureGitIdentity(options = {}) {
|
|
153
|
+
const current = readGitIdentity(options);
|
|
154
|
+
if (current.complete) {
|
|
155
|
+
return { name: current.name, email: current.email, source: 'git' };
|
|
156
|
+
}
|
|
157
|
+
const token = await identityFromLoginToken(options);
|
|
158
|
+
const defaults = {
|
|
159
|
+
name: current.name || token.name,
|
|
160
|
+
email: current.email || token.email || (await emailFromConfig(options))
|
|
161
|
+
};
|
|
162
|
+
if (!options.interactive) {
|
|
163
|
+
throw missingIdentityError(defaults);
|
|
164
|
+
}
|
|
165
|
+
logger.log('Git commit identity is not set. Defaults come from your AI Fabrix login; edit if needed.');
|
|
166
|
+
const answers = await promptIdentity(defaults, options);
|
|
167
|
+
const identity = { name: String(answers.name).trim(), email: String(answers.email).trim() };
|
|
168
|
+
writeGitIdentity(identity, options);
|
|
169
|
+
logger.log(`Git identity set to ${identity.name} <${identity.email}>`);
|
|
170
|
+
return { ...identity, source: 'prompt' };
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
module.exports = {
|
|
174
|
+
readGitIdentity,
|
|
175
|
+
identityFromLoginToken,
|
|
176
|
+
emailFromConfig,
|
|
177
|
+
ensureGitIdentity,
|
|
178
|
+
validateEmail,
|
|
179
|
+
validateName
|
|
180
|
+
};
|
package/lib/agent-kit/setup.js
CHANGED
|
@@ -8,6 +8,7 @@ const { auditLog } = require('../core/audit-logger');
|
|
|
8
8
|
const { normalizeSetup, preflight, resolveWork } = require('./setup-context');
|
|
9
9
|
const { acquireWorkspace } = require('./setup-state');
|
|
10
10
|
const { ensureController, ensureGithubLogin, ensureProvider } = require('./setup-auth');
|
|
11
|
+
const { ensureGitIdentity } = require('./git-identity');
|
|
11
12
|
const { prepareWorkspace, validateExisting } = require('./setup-workspace');
|
|
12
13
|
const { prepareSession, attachSession } = require('./setup-session');
|
|
13
14
|
const { managedSetupOptions } = require('./setup-managed');
|
|
@@ -19,6 +20,8 @@ async function authenticate(context, options, setPhase) {
|
|
|
19
20
|
if (context.fullName) {
|
|
20
21
|
setPhase('github-login');
|
|
21
22
|
ensureGithubLogin(options);
|
|
23
|
+
// Commits need an author. The login token supplies the default; the user can change it.
|
|
24
|
+
await ensureGitIdentity({ ...options, interactive: options.interactive !== false });
|
|
22
25
|
}
|
|
23
26
|
if (context.code === 'cursor') return null;
|
|
24
27
|
setPhase('agent-login');
|
package/lib/agent-kit/start.js
CHANGED
|
@@ -116,6 +116,27 @@ function claudeInnerArgs(p) {
|
|
|
116
116
|
]);
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
+
/**
|
|
120
|
+
* POSIX single-quote escaping for a value sent to a shell via tmux send-keys.
|
|
121
|
+
* @param {string} value - Raw value
|
|
122
|
+
* @returns {string} Quoted value
|
|
123
|
+
*/
|
|
124
|
+
function shellQuote(value) {
|
|
125
|
+
const escaped = String(value).split('\'').join('\'\\\'\'');
|
|
126
|
+
return `'${escaped}'`;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Codex authenticates inside the session, not in the window that launched it. Running it as the
|
|
131
|
+
* tmux session command makes the session end with the sign-in process, so the shell owns the
|
|
132
|
+
* window and codex is started inside it with send-keys.
|
|
133
|
+
* @param {object} p - Start parameters
|
|
134
|
+
* @returns {string} Shell command to run inside the session
|
|
135
|
+
*/
|
|
136
|
+
function codexStartCommand(p) {
|
|
137
|
+
return p.binary ? `exec ${shellQuote(p.binary)}` : 'exec codex';
|
|
138
|
+
}
|
|
139
|
+
|
|
119
140
|
/**
|
|
120
141
|
* @param {object} p
|
|
121
142
|
* @returns {object}
|
|
@@ -127,12 +148,17 @@ function buildTmuxSpec(p) {
|
|
|
127
148
|
? ['new-session', '-d', '-s', p.session, '-c', p.cwd]
|
|
128
149
|
: ['new-session', '-s', p.session, '-c', p.cwd];
|
|
129
150
|
const remote = p.app === 'claude' && p.remoteControl;
|
|
151
|
+
// codex: shell owns the window, codex starts inside it (see codexStartCommand).
|
|
152
|
+
const launchArgs = p.app === 'codex'
|
|
153
|
+
? [...mode]
|
|
154
|
+
: [...mode, ...(p.binary ? ['env', p.binary] : [spec.bin]), ...extra];
|
|
130
155
|
return {
|
|
131
156
|
bin: 'tmux',
|
|
132
|
-
args:
|
|
157
|
+
args: launchArgs,
|
|
133
158
|
session: p.session,
|
|
134
159
|
appBin: spec.bin,
|
|
135
160
|
needTmux: true,
|
|
161
|
+
innerCommand: p.app === 'codex' ? codexStartCommand(p) : undefined,
|
|
136
162
|
remoteControlName: remote ? p.remoteControlName : undefined,
|
|
137
163
|
remoteControlPrefix: remote ? p.remoteControlPrefix : undefined
|
|
138
164
|
};
|
|
@@ -333,6 +359,22 @@ function executeStart(options, context, execute) {
|
|
|
333
359
|
startCodexRemote(options, context.remoteSpec);
|
|
334
360
|
}
|
|
335
361
|
spawnLaunch(options, context.spec);
|
|
362
|
+
sendInnerCommand(options, context.spec);
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* Starts the agent inside an existing session window. Only codex uses this; the session must exist
|
|
367
|
+
* first, which is why it runs after the launch.
|
|
368
|
+
* @param {object} options - Start options
|
|
369
|
+
* @param {object} spec - Launch spec
|
|
370
|
+
* @returns {void}
|
|
371
|
+
*/
|
|
372
|
+
function sendInnerCommand(options, spec) {
|
|
373
|
+
if (!spec.innerCommand) {
|
|
374
|
+
return;
|
|
375
|
+
}
|
|
376
|
+
const exec = options.execFileSync || execFileSync;
|
|
377
|
+
exec('tmux', ['send-keys', '-t', `=${spec.session}`, spec.innerCommand, 'Enter'], { stdio: 'inherit' });
|
|
336
378
|
}
|
|
337
379
|
|
|
338
380
|
/**
|
|
@@ -363,6 +405,8 @@ function runStart(options) {
|
|
|
363
405
|
|
|
364
406
|
module.exports = {
|
|
365
407
|
START_APPS,
|
|
408
|
+
codexStartCommand,
|
|
409
|
+
sendInnerCommand,
|
|
366
410
|
normalizeStartApp,
|
|
367
411
|
sanitizeSessionName,
|
|
368
412
|
resolveSessionName,
|