@orbytautomation/engine 0.1.2 → 0.2.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 (70) hide show
  1. package/dist/core/EngineConfig.d.ts +5 -0
  2. package/dist/core/EngineConfig.d.ts.map +1 -1
  3. package/dist/core/EngineConfig.js +4 -0
  4. package/dist/core/EngineConfig.js.map +1 -1
  5. package/dist/core/OrbytEngine.d.ts +207 -76
  6. package/dist/core/OrbytEngine.d.ts.map +1 -1
  7. package/dist/core/OrbytEngine.js +395 -63
  8. package/dist/core/OrbytEngine.js.map +1 -1
  9. package/dist/errors/SecurityErrors.d.ts +75 -0
  10. package/dist/errors/SecurityErrors.d.ts.map +1 -0
  11. package/dist/errors/SecurityErrors.js +145 -0
  12. package/dist/errors/SecurityErrors.js.map +1 -0
  13. package/dist/errors/index.d.ts +1 -0
  14. package/dist/errors/index.d.ts.map +1 -1
  15. package/dist/errors/index.js +1 -0
  16. package/dist/errors/index.js.map +1 -1
  17. package/dist/execution/ExecutionLimits.d.ts +116 -0
  18. package/dist/execution/ExecutionLimits.d.ts.map +1 -0
  19. package/dist/execution/ExecutionLimits.js +280 -0
  20. package/dist/execution/ExecutionLimits.js.map +1 -0
  21. package/dist/execution/ExecutionStrategyResolver.d.ts +140 -0
  22. package/dist/execution/ExecutionStrategyResolver.d.ts.map +1 -0
  23. package/dist/execution/ExecutionStrategyResolver.js +332 -0
  24. package/dist/execution/ExecutionStrategyResolver.js.map +1 -0
  25. package/dist/execution/IntentAnalyzer.d.ts +101 -0
  26. package/dist/execution/IntentAnalyzer.d.ts.map +1 -0
  27. package/dist/execution/IntentAnalyzer.js +348 -0
  28. package/dist/execution/IntentAnalyzer.js.map +1 -0
  29. package/dist/execution/InternalExecutionContext.d.ts +255 -0
  30. package/dist/execution/InternalExecutionContext.d.ts.map +1 -0
  31. package/dist/execution/InternalExecutionContext.js +175 -0
  32. package/dist/execution/InternalExecutionContext.js.map +1 -0
  33. package/dist/execution/index.d.ts +5 -0
  34. package/dist/execution/index.d.ts.map +1 -1
  35. package/dist/execution/index.js +6 -0
  36. package/dist/execution/index.js.map +1 -1
  37. package/dist/index.d.ts +5 -7
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/index.js +8 -0
  40. package/dist/index.js.map +1 -1
  41. package/dist/loader/WorkflowLoader.d.ts +154 -0
  42. package/dist/loader/WorkflowLoader.d.ts.map +1 -0
  43. package/dist/loader/WorkflowLoader.js +239 -0
  44. package/dist/loader/WorkflowLoader.js.map +1 -0
  45. package/dist/loader/index.d.ts +10 -0
  46. package/dist/loader/index.d.ts.map +1 -0
  47. package/dist/loader/index.js +10 -0
  48. package/dist/loader/index.js.map +1 -0
  49. package/dist/parser/WorkflowParser.d.ts +8 -0
  50. package/dist/parser/WorkflowParser.d.ts.map +1 -1
  51. package/dist/parser/WorkflowParser.js +6 -0
  52. package/dist/parser/WorkflowParser.js.map +1 -1
  53. package/dist/security/ReservedFields.d.ts +64 -0
  54. package/dist/security/ReservedFields.d.ts.map +1 -0
  55. package/dist/security/ReservedFields.js +253 -0
  56. package/dist/security/ReservedFields.js.map +1 -0
  57. package/dist/security/index.d.ts +1 -0
  58. package/dist/security/index.d.ts.map +1 -1
  59. package/dist/security/index.js +1 -0
  60. package/dist/security/index.js.map +1 -1
  61. package/dist/types/core-types.d.ts +59 -0
  62. package/dist/types/core-types.d.ts.map +1 -0
  63. package/dist/types/core-types.js +2 -0
  64. package/dist/types/core-types.js.map +1 -0
  65. package/package.json +1 -1
  66. package/test-security-annotations.yaml +20 -0
  67. package/test-security-context.yaml +21 -0
  68. package/test-security.mjs +148 -0
  69. package/test-security.yaml +19 -0
  70. package/test-valid-workflow.yaml +26 -0
@@ -0,0 +1,348 @@
1
+ /**
2
+ * Intent Layer
3
+ *
4
+ * Intelligence layer that understands WHAT the workflow is trying to do.
5
+ *
6
+ * This layer analyzes workflow structure, metadata, and annotations to:
7
+ * - Classify workflow intent
8
+ * - Provide better errors
9
+ * - Enable optimization
10
+ * - Generate smart explanations
11
+ *
12
+ * Foundation: Basic intent detection from annotations.
13
+ * Future: Pattern recognition, ML-based classification.
14
+ */
15
+ /**
16
+ * Intent Layer Analyzer
17
+ *
18
+ * Understands what workflows are trying to do.
19
+ * Foundation for intelligent behavior.
20
+ */
21
+ export class IntentAnalyzer {
22
+ /**
23
+ * Classify workflow intent
24
+ *
25
+ * Foundation: Checks annotations and basic patterns
26
+ * Future: ML-based classification, pattern recognition
27
+ */
28
+ static classify(workflow) {
29
+ // 1. Check explicit intent annotation
30
+ const explicitIntent = this.checkExplicitIntent(workflow);
31
+ if (explicitIntent) {
32
+ return explicitIntent;
33
+ }
34
+ // 2. Analyze workflow structure
35
+ const structuralIntent = this.analyzeStructure(workflow);
36
+ if (structuralIntent.confidence !== 'low') {
37
+ return structuralIntent;
38
+ }
39
+ // 3. Analyze step patterns
40
+ const patternIntent = this.analyzeStepPatterns(workflow);
41
+ return patternIntent;
42
+ }
43
+ /**
44
+ * Check for explicit intent annotation
45
+ */
46
+ static checkExplicitIntent(workflow) {
47
+ // Check annotations['ai.intent']
48
+ const aiIntent = workflow.annotations?.['ai.intent'];
49
+ if (aiIntent && this.isKnownIntent(aiIntent)) {
50
+ return {
51
+ intent: aiIntent,
52
+ confidence: 'high',
53
+ reasoning: 'Explicit ai.intent annotation',
54
+ patterns: ['explicit-annotation'],
55
+ };
56
+ }
57
+ return null;
58
+ }
59
+ /**
60
+ * Analyze workflow structure for intent
61
+ */
62
+ static analyzeStructure(workflow) {
63
+ const patterns = [];
64
+ // Check workflow name/description for keywords
65
+ const name = workflow.name?.toLowerCase() || '';
66
+ const description = workflow.metadata?.description?.toLowerCase() || '';
67
+ const text = `${name} ${description}`;
68
+ // Data pipeline patterns
69
+ if (this.containsKeywords(text, ['etl', 'pipeline', 'transform', 'extract'])) {
70
+ patterns.push('data-keywords');
71
+ return {
72
+ intent: 'data-pipeline',
73
+ confidence: 'medium',
74
+ reasoning: 'Found data pipeline keywords in name/description',
75
+ patterns,
76
+ };
77
+ }
78
+ // Deployment patterns
79
+ if (this.containsKeywords(text, ['deploy', 'release', 'rollout'])) {
80
+ patterns.push('deployment-keywords');
81
+ return {
82
+ intent: 'deployment',
83
+ confidence: 'medium',
84
+ reasoning: 'Found deployment keywords',
85
+ patterns,
86
+ };
87
+ }
88
+ // Testing patterns
89
+ if (this.containsKeywords(text, ['test', 'qa', 'validate', 'verify'])) {
90
+ patterns.push('testing-keywords');
91
+ return {
92
+ intent: 'testing',
93
+ confidence: 'medium',
94
+ reasoning: 'Found testing keywords',
95
+ patterns,
96
+ };
97
+ }
98
+ return {
99
+ intent: 'unknown',
100
+ confidence: 'low',
101
+ reasoning: 'No clear intent from structure',
102
+ patterns,
103
+ };
104
+ }
105
+ /**
106
+ * Analyze step patterns for intent
107
+ */
108
+ static analyzeStepPatterns(workflow) {
109
+ const patterns = [];
110
+ const stepAdapters = workflow.steps.map(s => s.adapter);
111
+ // Data pipeline pattern: fetch -> process -> store
112
+ const hasDataFlow = this.hasPattern(stepAdapters, ['http', 'cli', 'fs']);
113
+ if (hasDataFlow) {
114
+ patterns.push('data-flow-pattern');
115
+ return {
116
+ intent: 'data-pipeline',
117
+ confidence: 'medium',
118
+ reasoning: 'Detected fetch-process-store pattern',
119
+ patterns,
120
+ };
121
+ }
122
+ // Notification pattern: multiple http/webhook calls
123
+ const httpCount = stepAdapters.filter(a => a === 'http').length;
124
+ if (httpCount >= 2) {
125
+ patterns.push('multiple-http-calls');
126
+ return {
127
+ intent: 'notification',
128
+ confidence: 'low',
129
+ reasoning: 'Multiple HTTP calls detected',
130
+ patterns,
131
+ };
132
+ }
133
+ // Orchestration: many different adapters
134
+ const uniqueAdapters = new Set(stepAdapters).size;
135
+ if (uniqueAdapters >= 4) {
136
+ patterns.push('multi-adapter');
137
+ return {
138
+ intent: 'orchestration',
139
+ confidence: 'low',
140
+ reasoning: 'Multiple adapter types suggest orchestration',
141
+ patterns,
142
+ };
143
+ }
144
+ return {
145
+ intent: 'automation',
146
+ confidence: 'low',
147
+ reasoning: 'General automation (no specific pattern detected)',
148
+ patterns: ['generic'],
149
+ };
150
+ }
151
+ /**
152
+ * Get recommendations based on intent
153
+ */
154
+ static getRecommendations(intent) {
155
+ // Foundation: Basic recommendations
156
+ // Future: Context-aware, experience-based recommendations
157
+ const recommendations = {
158
+ 'data-pipeline': {
159
+ optimizations: [
160
+ 'Consider enabling caching for expensive transformations',
161
+ 'Use parallel processing when steps are independent',
162
+ ],
163
+ warnings: [
164
+ 'Ensure data validation at each stage',
165
+ 'Add retry logic for network-based data fetching',
166
+ ],
167
+ bestPractices: [
168
+ 'Implement idempotent operations',
169
+ 'Add data quality checks',
170
+ ],
171
+ },
172
+ 'deployment': {
173
+ optimizations: [
174
+ 'Use health checks after deployment',
175
+ 'Implement rollback logic',
176
+ ],
177
+ warnings: [
178
+ 'Always have a rollback plan',
179
+ 'Test in staging before production',
180
+ ],
181
+ bestPractices: [
182
+ 'Use blue-green or canary deployments',
183
+ 'Implement smoke tests',
184
+ ],
185
+ },
186
+ 'testing': {
187
+ optimizations: [
188
+ 'Run fast tests first',
189
+ 'Parallelize independent test suites',
190
+ ],
191
+ bestPractices: [
192
+ 'Fail fast on critical failures',
193
+ 'Generate test reports',
194
+ ],
195
+ },
196
+ 'monitoring': {
197
+ optimizations: [
198
+ 'Use appropriate check intervals',
199
+ 'Implement alerting thresholds',
200
+ ],
201
+ bestPractices: [
202
+ 'Define clear success criteria',
203
+ 'Log monitoring results',
204
+ ],
205
+ },
206
+ 'notification': {
207
+ optimizations: [
208
+ 'Batch notifications when possible',
209
+ 'Use async delivery',
210
+ ],
211
+ warnings: [
212
+ 'Implement rate limiting',
213
+ 'Handle delivery failures gracefully',
214
+ ],
215
+ bestPractices: [
216
+ 'Template notifications',
217
+ 'Track delivery status',
218
+ ],
219
+ },
220
+ 'integration': {
221
+ optimizations: [
222
+ 'Use webhook retention policies',
223
+ 'Implement circuit breakers',
224
+ ],
225
+ warnings: [
226
+ 'Validate external service health',
227
+ 'Handle service unavailability',
228
+ ],
229
+ bestPractices: [
230
+ 'Use API versioning',
231
+ 'Implement proper error handling',
232
+ ],
233
+ },
234
+ 'automation': {
235
+ optimizations: [
236
+ 'Identify parallelization opportunities',
237
+ 'Cache repeated operations',
238
+ ],
239
+ bestPractices: [
240
+ 'Make operations idempotent',
241
+ 'Add proper logging',
242
+ ],
243
+ },
244
+ 'orchestration': {
245
+ optimizations: [
246
+ 'Optimize step dependencies',
247
+ 'Use parallel execution',
248
+ ],
249
+ warnings: [
250
+ 'Manage service dependencies carefully',
251
+ 'Implement timeout strategies',
252
+ ],
253
+ bestPractices: [
254
+ 'Document service interactions',
255
+ 'Implement comprehensive error handling',
256
+ ],
257
+ },
258
+ 'unknown': {
259
+ warnings: [
260
+ 'Consider adding ai.intent annotation for better optimization',
261
+ ],
262
+ },
263
+ };
264
+ return recommendations[intent] || {};
265
+ }
266
+ /**
267
+ * Generate human-friendly explanation of workflow
268
+ */
269
+ static explain(workflow) {
270
+ const classified = this.classify(workflow);
271
+ const intentDescriptions = {
272
+ 'data-pipeline': 'processes and transforms data',
273
+ 'deployment': 'deploys applications or services',
274
+ 'testing': 'validates and tests functionality',
275
+ 'monitoring': 'monitors system health',
276
+ 'notification': 'sends notifications',
277
+ 'integration': 'integrates multiple services',
278
+ 'automation': 'automates tasks',
279
+ 'orchestration': 'orchestrates multiple services',
280
+ 'unknown': 'performs automated tasks',
281
+ };
282
+ const description = intentDescriptions[classified.intent];
283
+ const name = workflow.name || 'This workflow';
284
+ return `${name} ${description} (${classified.confidence} confidence)`;
285
+ }
286
+ // Helper methods
287
+ static isKnownIntent(intent) {
288
+ const knownIntents = [
289
+ 'data-pipeline', 'deployment', 'testing', 'monitoring',
290
+ 'notification', 'integration', 'automation', 'orchestration',
291
+ ];
292
+ return knownIntents.includes(intent);
293
+ }
294
+ static containsKeywords(text, keywords) {
295
+ return keywords.some(keyword => text.includes(keyword));
296
+ }
297
+ static hasPattern(adapters, pattern) {
298
+ // Simple pattern matching: check if all pattern adapters exist in sequence
299
+ let patternIndex = 0;
300
+ for (const adapter of adapters) {
301
+ if (adapter === pattern[patternIndex]) {
302
+ patternIndex++;
303
+ if (patternIndex === pattern.length) {
304
+ return true;
305
+ }
306
+ }
307
+ }
308
+ return false;
309
+ }
310
+ }
311
+ /**
312
+ * Intent-based error messages
313
+ *
314
+ * Provides context-aware error messages based on workflow intent
315
+ */
316
+ export class IntentAwareErrors {
317
+ /**
318
+ * Get intent-aware error message
319
+ */
320
+ static getMessage(intent, error, context) {
321
+ // Foundation: Basic error enhancement
322
+ // Future: Smart error suggestions based on intent and context
323
+ const baseMessage = error;
324
+ // Add intent-specific context
325
+ const intentContext = {
326
+ 'data-pipeline': 'For data pipelines, ensure data sources are accessible and formats are correct.',
327
+ 'deployment': 'For deployments, verify permissions and target environment status.',
328
+ 'testing': 'For tests, check test data and environment setup.',
329
+ 'monitoring': 'For monitoring, ensure endpoints are accessible.',
330
+ 'notification': 'For notifications, verify API keys and endpoints.',
331
+ 'integration': 'For integrations, check service connectivity.',
332
+ 'automation': 'Check that all required resources are available.',
333
+ 'orchestration': 'Verify all services are healthy.',
334
+ 'unknown': 'Review workflow configuration.',
335
+ };
336
+ const suggestion = intentContext[intent] || '';
337
+ // Add context-specific details if provided
338
+ let enhancedMessage = suggestion ? `${baseMessage}\n\n💡 ${suggestion}` : baseMessage;
339
+ if (context && Object.keys(context).length > 0) {
340
+ const contextStr = Object.entries(context)
341
+ .map(([key, value]) => `${key}: ${value}`)
342
+ .join(', ');
343
+ enhancedMessage += `\n\nContext: ${contextStr}`;
344
+ }
345
+ return enhancedMessage;
346
+ }
347
+ }
348
+ //# sourceMappingURL=IntentAnalyzer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IntentAnalyzer.js","sourceRoot":"","sources":["../../src/execution/IntentAnalyzer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AA4DH;;;;;GAKG;AACH,MAAM,OAAO,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,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC7C,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC;iBACrC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,KAAK,KAAK,EAAE,CAAC;iBACzC,IAAI,CAAC,IAAI,CAAC,CAAC;YAChB,eAAe,IAAI,gBAAgB,UAAU,EAAE,CAAC;QACpD,CAAC;QAED,OAAO,eAAe,CAAC;IAC3B,CAAC;CACJ"}
@@ -0,0 +1,255 @@
1
+ /**
2
+ * Internal Execution Context
3
+ *
4
+ * These fields are NEVER user-controlled.
5
+ * Engine injects them automatically at runtime.
6
+ *
7
+ * Security: User workflow YAML cannot override these values.
8
+ */
9
+ import type { TierLimits } from './ExecutionLimits.js';
10
+ /**
11
+ * Execution Identity (Engine-Generated)
12
+ * Generated for each workflow execution
13
+ */
14
+ export interface ExecutionIdentity {
15
+ /** Unique execution ID (generated by engine) */
16
+ executionId: string;
17
+ /** Run ID for this workflow execution */
18
+ runId: string;
19
+ /** Trace ID for distributed tracing */
20
+ traceId: string;
21
+ /** Parent run ID if this is a nested workflow */
22
+ parentRunId?: string;
23
+ /** Execution start timestamp */
24
+ startedAt: Date;
25
+ /** Engine version that executed this workflow */
26
+ engineVersion: string;
27
+ /** Node ID for future distributed execution */
28
+ nodeId?: string;
29
+ }
30
+ /**
31
+ * Ownership Context (From Bridge/API)
32
+ * Passed from website/bridge to engine
33
+ */
34
+ export interface OwnershipContext {
35
+ /** User ID who triggered execution */
36
+ userId: string;
37
+ /** Workspace/organization ID */
38
+ workspaceId: string;
39
+ /** Subscription ID */
40
+ subscriptionId: string;
41
+ /** Subscription tier (free, pro, enterprise) */
42
+ subscriptionTier: string;
43
+ /** Geographic region */
44
+ region: string;
45
+ /** Pricing model (ecosystem | component) */
46
+ pricingModel: 'ecosystem' | 'component';
47
+ /** Billing mode */
48
+ billingMode: 'ecosystem' | 'component';
49
+ }
50
+ /**
51
+ * Billing Snapshot (Frozen at Execution Start)
52
+ * Prevents billing disputes when pricing changes
53
+ */
54
+ export interface BillingSnapshot {
55
+ /** Base cost per automation execution */
56
+ baseExecutionCost: number;
57
+ /** Base cost per step */
58
+ baseStepCost: number;
59
+ /** Pricing tier at execution time */
60
+ pricingTier: string;
61
+ /** Discount applied (%) */
62
+ discountApplied: number;
63
+ /** Promo code applied */
64
+ promoApplied?: string;
65
+ /** Effective rate after discounts */
66
+ effectiveRate: number;
67
+ /** Billing snapshot version (for audit) */
68
+ snapshotVersion: string;
69
+ /** Timestamp when snapshot was taken */
70
+ snapshotAt: Date;
71
+ }
72
+ /**
73
+ * Usage Counters (Engine-Calculated)
74
+ * Never user-editable
75
+ */
76
+ export interface UsageCounters {
77
+ /** Number of automations executed (always 1 per workflow) */
78
+ automationCount: number;
79
+ /** Total number of steps executed */
80
+ stepCount: number;
81
+ /** Weighted step count (sum of step weights) */
82
+ weightedStepCount: number;
83
+ /** Execution duration in seconds */
84
+ durationSeconds: number;
85
+ /** CPU usage (future) */
86
+ resourceUsageCpu?: number;
87
+ /** Memory usage (future) */
88
+ resourceUsageMemory?: number;
89
+ }
90
+ /**
91
+ * Derived Billing Context (Engine-Computed)
92
+ * Calculated based on ownership + snapshot
93
+ */
94
+ export interface DerivedBillingContext {
95
+ /** Is this execution billable */
96
+ isBillable: boolean;
97
+ /** Billing scope resolved */
98
+ billingScopeResolved: 'workflow' | 'step' | 'both';
99
+ /** Effective product billing to */
100
+ effectiveProduct: string;
101
+ /** Pricing tier resolved from subscription */
102
+ pricingTierResolved: string;
103
+ /** Final cost calculated */
104
+ totalCost: number;
105
+ }
106
+ /**
107
+ * Security Metadata (Engine-Controlled)
108
+ * Security boundaries and permissions
109
+ */
110
+ export interface SecurityMetadata {
111
+ /** Payment status (affects execution) */
112
+ paymentStatus: 'active' | 'past_due' | 'canceled' | 'trial';
113
+ /** Request source IP (optional) */
114
+ ipAddress?: string;
115
+ /** Security policy version */
116
+ securityPolicyVersion?: string;
117
+ /** Execution isolation level */
118
+ isolationLevel: 'process' | 'container' | 'vm';
119
+ /** Permissions granted for this execution */
120
+ permissionsGranted: string[];
121
+ }
122
+ /**
123
+ * Runtime State (Engine-Managed)
124
+ * Current execution state
125
+ */
126
+ export interface RuntimeState {
127
+ /** Current workflow state */
128
+ workflowState: 'pending' | 'running' | 'completed' | 'failed' | 'timeout' | 'cancelled';
129
+ /** Actual retry count (not user-defined max) */
130
+ retryCountActual: number;
131
+ /** Was timeout triggered? */
132
+ timeoutTriggered: boolean;
133
+ /** Execution graph (resolved dependencies) */
134
+ executionGraph?: Record<string, string[]>;
135
+ /** Steps state map */
136
+ stepsState: Record<string, 'pending' | 'running' | 'completed' | 'failed' | 'skipped'>;
137
+ }
138
+ /**
139
+ * Request Context (Origin Information)
140
+ * Where the execution request came from
141
+ */
142
+ export interface RequestContext {
143
+ /** Request origin */
144
+ origin: 'cli' | 'api' | 'sdk' | 'webhook' | 'scheduler';
145
+ /** Execution mode */
146
+ mode: 'local' | 'server' | 'embedded' | 'dry-run';
147
+ /** Who/what triggered this */
148
+ triggeredBy?: string;
149
+ }
150
+ /**
151
+ * Internal Execution Context (Complete)
152
+ * This is what engine maintains internally. NEVER exposed to workflow.
153
+ */
154
+ export interface InternalExecutionContext {
155
+ /** Execution identity */
156
+ _identity: ExecutionIdentity;
157
+ /** Ownership from bridge */
158
+ _ownership: OwnershipContext;
159
+ /** Billing snapshot (frozen) */
160
+ _billingSnapshot: BillingSnapshot;
161
+ /** Usage counters */
162
+ _usage: UsageCounters;
163
+ /** Derived billing context */
164
+ _billing: DerivedBillingContext;
165
+ /** Tier-based execution limits (ENFORCED by engine) */
166
+ _limits: TierLimits;
167
+ /** Security metadata */
168
+ _security: SecurityMetadata;
169
+ /** Runtime state */
170
+ _runtime: RuntimeState;
171
+ /** Request context */
172
+ _request: RequestContext;
173
+ /** Audit metadata */
174
+ _audit: {
175
+ engineVersion: string;
176
+ billingSnapshotVersion: string;
177
+ executionVersion: string;
178
+ };
179
+ }
180
+ /**
181
+ * Step-level Internal Context
182
+ * Injected into each step execution
183
+ */
184
+ export interface InternalStepContext {
185
+ /** Step usage (engine-calculated from user weight or default) */
186
+ usage: {
187
+ billable: boolean;
188
+ unit: string;
189
+ weight: number;
190
+ computedCost: number;
191
+ };
192
+ /** Step requirements (engine-validated) */
193
+ requires: {
194
+ capabilities: string[];
195
+ validated: boolean;
196
+ };
197
+ /** Execution hints (engine-optimized) */
198
+ hints: {
199
+ cacheable: boolean;
200
+ idempotent: boolean;
201
+ heavy: boolean;
202
+ cost: 'free' | 'low' | 'medium' | 'high';
203
+ };
204
+ }
205
+ /**
206
+ * Context Builder
207
+ * Used by engine to create internal context
208
+ */
209
+ export declare class InternalContextBuilder {
210
+ /**
211
+ * Create execution identity
212
+ */
213
+ static createIdentity(engineVersion: string): ExecutionIdentity;
214
+ /**
215
+ * Create default ownership context (local mode)
216
+ */
217
+ static createDefaultOwnership(): OwnershipContext;
218
+ /**
219
+ * Create billing snapshot
220
+ */
221
+ static createBillingSnapshot(subscriptionTier: string, billingMode: 'ecosystem' | 'component'): BillingSnapshot;
222
+ /**
223
+ * Initialize usage counters
224
+ */
225
+ static initializeCounters(): UsageCounters;
226
+ /**
227
+ * Create derived billing context
228
+ */
229
+ static createDerivedBilling(ownership: OwnershipContext, snapshot: BillingSnapshot): DerivedBillingContext;
230
+ /**
231
+ * Build complete internal context
232
+ */
233
+ static build(engineVersion: string, ownershipContext?: Partial<OwnershipContext>, requestOrigin?: 'cli' | 'api' | 'sdk' | 'webhook' | 'scheduler', executionMode?: 'local' | 'server' | 'embedded' | 'dry-run'): InternalExecutionContext;
234
+ /**
235
+ * Create security metadata
236
+ */
237
+ static createSecurityMetadata(ownership: OwnershipContext): SecurityMetadata;
238
+ /**
239
+ * Initialize runtime state
240
+ */
241
+ static initializeRuntimeState(): RuntimeState;
242
+ /**
243
+ * Create request context
244
+ */
245
+ static createRequestContext(origin: 'cli' | 'api' | 'sdk' | 'webhook' | 'scheduler', mode: 'local' | 'server' | 'embedded' | 'dry-run'): RequestContext;
246
+ /**
247
+ * Create step internal context
248
+ */
249
+ static createStepContext(userWeight?: number, userUnit?: string): InternalStepContext;
250
+ /**
251
+ * Generate unique ID
252
+ */
253
+ private static generateId;
254
+ }
255
+ //# sourceMappingURL=InternalExecutionContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InternalExecutionContext.d.ts","sourceRoot":"","sources":["../../src/execution/InternalExecutionContext.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGvD;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,gDAAgD;IAChD,WAAW,EAAE,MAAM,CAAC;IAEpB,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAC;IAEd,uCAAuC;IACvC,OAAO,EAAE,MAAM,CAAC;IAEhB,iDAAiD;IACjD,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,gCAAgC;IAChC,SAAS,EAAE,IAAI,CAAC;IAEhB,iDAAiD;IACjD,aAAa,EAAE,MAAM,CAAC;IAEtB,+CAA+C;IAC/C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,sCAAsC;IACtC,MAAM,EAAE,MAAM,CAAC;IAEf,gCAAgC;IAChC,WAAW,EAAE,MAAM,CAAC;IAEpB,sBAAsB;IACtB,cAAc,EAAE,MAAM,CAAC;IAEvB,gDAAgD;IAChD,gBAAgB,EAAE,MAAM,CAAC;IAEzB,wBAAwB;IACxB,MAAM,EAAE,MAAM,CAAC;IAEf,4CAA4C;IAC5C,YAAY,EAAE,WAAW,GAAG,WAAW,CAAC;IAExC,oBAAoB;IACpB,WAAW,EAAE,WAAW,GAAG,WAAW,CAAC;CACxC;AAED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