@bluefly/openstandardagents 0.2.8 → 0.2.9
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/.env.example +1 -1
- package/.github/AGENTS.md +245 -0
- package/.github/agents/github-issue-triage.ossa.yaml +99 -0
- package/.github/agents/github-pr-triage.ossa.yaml +137 -0
- package/.github/workflows/issue-sync-to-gitlab.yml +138 -0
- package/.github/workflows/pr-triage-to-gitlab.yml +164 -0
- package/.version.json +1 -1
- package/.wiki-config.json +1 -1
- package/CHANGELOG.md +33 -0
- package/CONTRIBUTING.md +102 -3
- package/README.md +17 -10
- package/dist/services/release-automation/schemas/release.schema.js +1 -1
- package/dist/services/release-automation/webhook.service.js +3 -3
- package/dist/services/release-automation/webhook.service.js.map +1 -1
- package/dist/services/runtime/claude/claude-adapter.d.ts +1 -1
- package/dist/services/runtime/claude/claude-adapter.d.ts.map +1 -1
- package/dist/services/runtime/claude/claude-adapter.js +1 -1
- package/dist/services/runtime/claude/claude-adapter.js.map +1 -1
- package/dist/spec/v0.2.9/a2a-protocol.md +1337 -0
- package/dist/spec/v0.2.9/agent.md +1946 -0
- package/dist/spec/v0.2.9/capabilities/index.yaml +25 -0
- package/dist/spec/v0.2.9/capabilities/memory.yaml +251 -0
- package/dist/spec/v0.2.9/capability-schema.md +576 -0
- package/dist/spec/v0.2.9/compliance-profiles.md +533 -0
- package/dist/spec/v0.2.9/conformance-testing.md +1527 -0
- package/dist/spec/v0.2.9/gitlab-duo-integration.md +621 -0
- package/dist/spec/v0.2.9/ossa-0.2.9.schema.json +3699 -0
- package/dist/spec/v0.2.9/runtime-semantics.md +464 -0
- package/dist/spec/v0.2.9/security-model.md +1245 -0
- package/dist/spec/v0.2.9/semantic-conventions.md +347 -0
- package/dist/spec/v0.2.9/types.ts +522 -0
- package/dist/types/policy.d.ts +377 -0
- package/dist/types/policy.d.ts.map +1 -0
- package/dist/types/policy.js +84 -0
- package/dist/types/policy.js.map +1 -0
- package/dist/utils/version.js +1 -1
- package/docs/specs/policy-dsl.md +925 -0
- package/examples/adk-integration/code-review-workflow.yml +1 -1
- package/examples/adk-integration/customer-support.yml +1 -1
- package/examples/adk-integration/data-pipeline.yml +1 -1
- package/examples/advanced/reasoning-agent.yaml +136 -0
- package/examples/advanced/workflows/hybrid-model-strategy.yaml +1 -1
- package/examples/agent-manifests/critics/critic-agent.yaml +1 -1
- package/examples/agent-manifests/governors/governor-agent.yaml +1 -1
- package/examples/agent-manifests/integrators/integrator-agent.yaml +1 -1
- package/examples/agent-manifests/judges/judge-agent.yaml +1 -1
- package/examples/agent-manifests/monitors/monitor-agent.yaml +1 -1
- package/examples/agent-manifests/orchestrators/orchestrator-agent.yaml +1 -1
- package/examples/agent-manifests/sample-compliant-agent.yaml +1 -1
- package/examples/agent-manifests/workers/worker-agent.yaml +1 -1
- package/examples/agents-md/code-agent.ossa.json +100 -0
- package/examples/agents-md/monorepo-agent.ossa.yaml +180 -0
- package/examples/anthropic/claude-assistant.ossa.json +1 -1
- package/examples/autogen/multi-agent.ossa.json +1 -1
- package/examples/claude-code/code-reviewer.ossa.yaml +1 -1
- package/examples/claude-code/ossa-validator.ossa.yaml +2 -2
- package/examples/common_npm/agent-router.ossa.yaml +1 -1
- package/examples/common_npm/agent-router.v0.2.2.ossa.yaml +1 -1
- package/examples/crewai/research-team.ossa.json +1 -1
- package/examples/cursor/code-review-agent.ossa.json +1 -1
- package/examples/drupal/gitlab-ml-recommender.ossa.yaml +1 -1
- package/examples/drupal/gitlab-ml-recommender.v0.2.2.ossa.yaml +1 -1
- package/examples/extensions/agents-md-v1.yml +175 -0
- package/examples/extensions/drupal-v1.yml +1 -1
- package/examples/extensions/kagent-v1.yml +1 -1
- package/examples/getting-started/hello-world-complete.ossa.yaml +1 -1
- package/examples/integration-patterns/agent-to-agent-orchestration.ossa.yaml +4 -4
- package/examples/kagent/compliance-validator.ossa.yaml +1 -1
- package/examples/kagent/cost-optimizer.ossa.yaml +1 -1
- package/examples/kagent/documentation-agent.ossa.yaml +1 -1
- package/examples/kagent/k8s-troubleshooter-v1.ossa.yaml +1 -1
- package/examples/kagent/k8s-troubleshooter-v1.v0.2.2.ossa.yaml +1 -1
- package/examples/kagent/k8s-troubleshooter.ossa.yaml +1 -1
- package/examples/kagent/security-scanner.ossa.yaml +1 -1
- package/examples/langchain/chain-agent.ossa.json +1 -1
- package/examples/langflow/workflow-agent.ossa.json +1 -1
- package/examples/langgraph/state-machine-agent.ossa.json +1 -1
- package/examples/llamaindex/rag-agent.ossa.json +1 -1
- package/examples/migration-guides/from-langchain-to-ossa.yaml +4 -4
- package/examples/multi-agent/conditional-router.ossa.yaml +1 -1
- package/examples/multi-agent/parallel-execution.ossa.yaml +1 -1
- package/examples/multi-agent/sequential-pipeline.ossa.yaml +1 -1
- package/examples/openai/basic-agent.ossa.yaml +1 -1
- package/examples/openai/multi-tool-agent.ossa.json +1 -1
- package/examples/openai/swarm-agent.ossa.json +1 -1
- package/examples/production/document-analyzer-openai.yml +1 -1
- package/examples/quickstart/support-agent.ossa.yaml +1 -1
- package/examples/templates/ossa-compliance.yaml +1 -1
- package/examples/vercel/edge-agent.ossa.json +1 -1
- package/llms.txt +1 -1
- package/package.json +5 -3
- package/scripts/README.md +25 -0
- package/scripts/compliance-audit.ts +796 -0
- package/scripts/generate-agents-catalog.ts +2 -1
- package/scripts/generate-api-docs.ts +2 -1
- package/scripts/generate-examples-docs.ts +2 -1
- package/scripts/generate-llms-ctx.sh +2 -2
- package/spec/v0.2.9/a2a-protocol.md +1337 -0
- package/spec/v0.2.9/agent.md +1946 -0
- package/spec/v0.2.9/capabilities/index.yaml +25 -0
- package/spec/v0.2.9/capabilities/memory.yaml +251 -0
- package/spec/v0.2.9/capability-schema.md +576 -0
- package/spec/v0.2.9/compliance-profiles.md +533 -0
- package/spec/v0.2.9/conformance-testing.md +1527 -0
- package/spec/v0.2.9/gitlab-duo-integration.md +621 -0
- package/spec/v0.2.9/ossa-0.2.9.schema.json +3699 -0
- package/spec/v0.2.9/runtime-semantics.md +464 -0
- package/spec/v0.2.9/security-model.md +1245 -0
- package/spec/v0.2.9/semantic-conventions.md +347 -0
- package/spec/v0.2.9/types.ts +522 -0
- package/test-results/junit.xml +184 -146
- package/.github/workflows/pr-comment.yml +0 -33
|
@@ -0,0 +1,377 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview OSSA Policy DSL Type Definitions
|
|
3
|
+
* @module @openstandardagents/policy
|
|
4
|
+
* @version 1.0.0
|
|
5
|
+
*
|
|
6
|
+
* Formal type definitions for the OSSA Policy Domain-Specific Language.
|
|
7
|
+
* See docs/specs/policy-dsl.md for full specification.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Variable reference in policy expressions (e.g., $cost.tokens)
|
|
11
|
+
*/
|
|
12
|
+
export interface Variable {
|
|
13
|
+
type: 'variable';
|
|
14
|
+
/** Dot-separated path (e.g., ['cost', 'tokens']) */
|
|
15
|
+
path: string[];
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Primitive value types
|
|
19
|
+
*/
|
|
20
|
+
export type PrimitiveValue = string | number | boolean | null;
|
|
21
|
+
/**
|
|
22
|
+
* Array of values (for recursive structure)
|
|
23
|
+
*/
|
|
24
|
+
export type ValueArray = PolicyValue[];
|
|
25
|
+
/**
|
|
26
|
+
* Object of values (for recursive structure)
|
|
27
|
+
*/
|
|
28
|
+
export interface ValueObject {
|
|
29
|
+
[key: string]: PolicyValue;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Function call in policy expressions
|
|
33
|
+
*/
|
|
34
|
+
export interface FunctionCall {
|
|
35
|
+
type: 'function';
|
|
36
|
+
/** Function name */
|
|
37
|
+
name: string;
|
|
38
|
+
/** Function arguments */
|
|
39
|
+
args: PolicyValue[];
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Value types supported in policy expressions
|
|
43
|
+
*/
|
|
44
|
+
export type PolicyValue = PrimitiveValue | ValueArray | ValueObject | Variable | FunctionCall;
|
|
45
|
+
/**
|
|
46
|
+
* @deprecated Use PolicyValue instead
|
|
47
|
+
*/
|
|
48
|
+
export type Value = PolicyValue;
|
|
49
|
+
/**
|
|
50
|
+
* Comparison operators for condition evaluation
|
|
51
|
+
*/
|
|
52
|
+
export type ComparisonOperator = 'equals' | 'notEquals' | 'greaterThan' | 'lessThan' | 'greaterEqual' | 'lessEqual' | 'contains' | 'matches' | 'in' | 'startsWith' | 'endsWith';
|
|
53
|
+
/**
|
|
54
|
+
* Logical operators for combining conditions
|
|
55
|
+
*/
|
|
56
|
+
export type LogicalOperator = 'and' | 'or' | 'not';
|
|
57
|
+
/**
|
|
58
|
+
* Action types that can be performed by policies
|
|
59
|
+
*/
|
|
60
|
+
export type ActionType = 'allow' | 'deny' | 'require_approval' | 'log' | 'escalate' | 'notify' | 'execute';
|
|
61
|
+
/**
|
|
62
|
+
* Action effects (final outcome)
|
|
63
|
+
*/
|
|
64
|
+
export type Effect = 'allow' | 'deny' | 'escalate' | 'log';
|
|
65
|
+
/**
|
|
66
|
+
* Comparison expression (e.g., $cost.tokens > 1000)
|
|
67
|
+
*/
|
|
68
|
+
export interface ComparisonCondition {
|
|
69
|
+
type: 'comparison';
|
|
70
|
+
/** Left-hand side value */
|
|
71
|
+
left: PolicyValue;
|
|
72
|
+
/** Comparison operator */
|
|
73
|
+
operator: ComparisonOperator;
|
|
74
|
+
/** Right-hand side value */
|
|
75
|
+
right: PolicyValue;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Logical expression (AND, OR, NOT)
|
|
79
|
+
*/
|
|
80
|
+
export interface LogicalCondition {
|
|
81
|
+
type: 'logical';
|
|
82
|
+
/** Logical operator */
|
|
83
|
+
operator: LogicalOperator;
|
|
84
|
+
/** Sub-conditions */
|
|
85
|
+
conditions: PolicyCondition[];
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Function-based condition
|
|
89
|
+
*/
|
|
90
|
+
export interface FunctionCondition {
|
|
91
|
+
type: 'function';
|
|
92
|
+
/** Function name */
|
|
93
|
+
function: string;
|
|
94
|
+
/** Function arguments */
|
|
95
|
+
args: PolicyValue[];
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Policy condition (union type)
|
|
99
|
+
*/
|
|
100
|
+
export type PolicyCondition = ComparisonCondition | LogicalCondition | FunctionCondition;
|
|
101
|
+
/**
|
|
102
|
+
* Notification channel configuration
|
|
103
|
+
*/
|
|
104
|
+
export interface NotificationChannel {
|
|
105
|
+
/** Channel type */
|
|
106
|
+
type: 'email' | 'slack' | 'pagerduty' | 'webhook' | 'sms';
|
|
107
|
+
/** Channel-specific configuration */
|
|
108
|
+
config: Record<string, PolicyValue>;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Notification configuration
|
|
112
|
+
*/
|
|
113
|
+
export interface NotificationConfig {
|
|
114
|
+
/** Notification channels */
|
|
115
|
+
channels: ('email' | 'slack' | 'pagerduty' | 'webhook' | 'sms')[];
|
|
116
|
+
/** Notification message (supports template variables) */
|
|
117
|
+
message: string;
|
|
118
|
+
/** Additional notification metadata */
|
|
119
|
+
metadata?: Record<string, PolicyValue>;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Audit log configuration
|
|
123
|
+
*/
|
|
124
|
+
export interface AuditConfig {
|
|
125
|
+
/** Log level */
|
|
126
|
+
level: 'debug' | 'info' | 'warning' | 'error';
|
|
127
|
+
/** Log message (supports template variables) */
|
|
128
|
+
message: string;
|
|
129
|
+
/** Compliance frameworks */
|
|
130
|
+
compliance?: string[];
|
|
131
|
+
/** Additional audit metadata */
|
|
132
|
+
metadata?: Record<string, PolicyValue>;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Policy action
|
|
136
|
+
*/
|
|
137
|
+
export interface PolicyAction {
|
|
138
|
+
/** Action type */
|
|
139
|
+
type: ActionType;
|
|
140
|
+
/** Target resource or capability */
|
|
141
|
+
target?: string;
|
|
142
|
+
/** Action parameters */
|
|
143
|
+
params?: Record<string, PolicyValue>;
|
|
144
|
+
/** Effect of the action */
|
|
145
|
+
effect: Effect;
|
|
146
|
+
/** Notification configuration */
|
|
147
|
+
notify?: NotificationConfig;
|
|
148
|
+
/** Audit log configuration */
|
|
149
|
+
audit?: AuditConfig;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Complete policy rule
|
|
153
|
+
*/
|
|
154
|
+
export interface PolicyRule {
|
|
155
|
+
/** Unique rule identifier */
|
|
156
|
+
id: string;
|
|
157
|
+
/** Human-readable description */
|
|
158
|
+
description?: string;
|
|
159
|
+
/** Condition that triggers this rule */
|
|
160
|
+
condition: PolicyCondition;
|
|
161
|
+
/** Action to perform when condition matches */
|
|
162
|
+
action: PolicyAction;
|
|
163
|
+
/** Rule priority (higher = evaluated first) */
|
|
164
|
+
priority?: number;
|
|
165
|
+
/** Rule enabled state */
|
|
166
|
+
enabled?: boolean;
|
|
167
|
+
/** Rule metadata */
|
|
168
|
+
metadata?: Record<string, PolicyValue>;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Duration (timeout, delay, etc.)
|
|
172
|
+
*/
|
|
173
|
+
export interface Duration {
|
|
174
|
+
/** Numeric value */
|
|
175
|
+
value: number;
|
|
176
|
+
/** Time unit */
|
|
177
|
+
unit: 'seconds' | 'minutes' | 'hours' | 'days';
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Escalation target (human or system)
|
|
181
|
+
*/
|
|
182
|
+
export interface EscalationTarget {
|
|
183
|
+
/** Target type */
|
|
184
|
+
type: 'user' | 'group' | 'role' | 'webhook';
|
|
185
|
+
/** Target identifier (user ID, group name, etc.) */
|
|
186
|
+
identifier: string;
|
|
187
|
+
/** Additional target metadata */
|
|
188
|
+
metadata?: Record<string, PolicyValue>;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Escalation policy for human-in-the-loop workflows
|
|
192
|
+
*/
|
|
193
|
+
export interface EscalationPolicy {
|
|
194
|
+
/** Unique escalation identifier */
|
|
195
|
+
id: string;
|
|
196
|
+
/** Human-readable description */
|
|
197
|
+
description?: string;
|
|
198
|
+
/** Condition that triggers escalation */
|
|
199
|
+
condition: PolicyCondition;
|
|
200
|
+
/** Escalation target (user, group, role) */
|
|
201
|
+
target: EscalationTarget;
|
|
202
|
+
/** Timeout for human response */
|
|
203
|
+
timeout?: Duration;
|
|
204
|
+
/** Fallback action if timeout expires */
|
|
205
|
+
fallback?: PolicyAction;
|
|
206
|
+
/** Escalation priority */
|
|
207
|
+
priority?: 'low' | 'medium' | 'high' | 'critical';
|
|
208
|
+
/** Notification channels */
|
|
209
|
+
channels?: NotificationChannel[];
|
|
210
|
+
/** Escalation metadata */
|
|
211
|
+
metadata?: Record<string, PolicyValue>;
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Policy evaluation context
|
|
215
|
+
* Variables accessible via $ prefix in policy expressions
|
|
216
|
+
*/
|
|
217
|
+
export interface PolicyContext {
|
|
218
|
+
/** Agent metadata */
|
|
219
|
+
agent: {
|
|
220
|
+
name: string;
|
|
221
|
+
version: string;
|
|
222
|
+
capabilities: string[];
|
|
223
|
+
};
|
|
224
|
+
/** Current action being evaluated */
|
|
225
|
+
action: {
|
|
226
|
+
type: string;
|
|
227
|
+
target: string;
|
|
228
|
+
params: Record<string, PolicyValue>;
|
|
229
|
+
};
|
|
230
|
+
/** Cost metrics */
|
|
231
|
+
cost: {
|
|
232
|
+
tokens: number;
|
|
233
|
+
daily: number;
|
|
234
|
+
monthly: number;
|
|
235
|
+
currency: string;
|
|
236
|
+
};
|
|
237
|
+
/** Performance metrics */
|
|
238
|
+
performance: {
|
|
239
|
+
latency: number;
|
|
240
|
+
throughput: number;
|
|
241
|
+
};
|
|
242
|
+
/** Security context */
|
|
243
|
+
security: {
|
|
244
|
+
user: string;
|
|
245
|
+
role: string;
|
|
246
|
+
permissions: string[];
|
|
247
|
+
};
|
|
248
|
+
/** Compliance context */
|
|
249
|
+
compliance: {
|
|
250
|
+
frameworks: string[];
|
|
251
|
+
policies: string[];
|
|
252
|
+
};
|
|
253
|
+
/** Time context */
|
|
254
|
+
time: {
|
|
255
|
+
timestamp: number;
|
|
256
|
+
hour: number;
|
|
257
|
+
day: string;
|
|
258
|
+
timezone: string;
|
|
259
|
+
};
|
|
260
|
+
/** Custom context fields */
|
|
261
|
+
[key: string]: PolicyValue | Record<string, PolicyValue> | string[] | undefined;
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Complete policy document
|
|
265
|
+
*/
|
|
266
|
+
export interface PolicyDocument {
|
|
267
|
+
/** Policy identifier */
|
|
268
|
+
id: string;
|
|
269
|
+
/** Policy version (semver) */
|
|
270
|
+
version: string;
|
|
271
|
+
/** Human-readable description */
|
|
272
|
+
description?: string;
|
|
273
|
+
/** Policy rules */
|
|
274
|
+
rules: PolicyRule[];
|
|
275
|
+
/** Escalation policies */
|
|
276
|
+
escalations?: EscalationPolicy[];
|
|
277
|
+
/** Policy metadata */
|
|
278
|
+
metadata?: Record<string, PolicyValue>;
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* Policy error types
|
|
282
|
+
*/
|
|
283
|
+
export type PolicyErrorType = 'SyntaxError' | 'ValidationError' | 'EvaluationError' | 'EscalationError' | 'ContextError';
|
|
284
|
+
/**
|
|
285
|
+
* Policy error details
|
|
286
|
+
*/
|
|
287
|
+
export interface PolicyErrorDetails {
|
|
288
|
+
/** Error type */
|
|
289
|
+
type: PolicyErrorType;
|
|
290
|
+
/** Error message */
|
|
291
|
+
message: string;
|
|
292
|
+
/** Rule identifier (if applicable) */
|
|
293
|
+
rule?: string;
|
|
294
|
+
/** Source location (if applicable) */
|
|
295
|
+
location?: {
|
|
296
|
+
line: number;
|
|
297
|
+
column: number;
|
|
298
|
+
};
|
|
299
|
+
/** Additional error context */
|
|
300
|
+
context?: Record<string, PolicyValue | string[]>;
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Policy error class
|
|
304
|
+
*/
|
|
305
|
+
export declare class PolicyError extends Error {
|
|
306
|
+
readonly details: PolicyErrorDetails;
|
|
307
|
+
constructor(details: PolicyErrorDetails);
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* Policy evaluation result
|
|
311
|
+
*/
|
|
312
|
+
export interface PolicyEvaluationResult {
|
|
313
|
+
/** Whether action is allowed */
|
|
314
|
+
allowed: boolean;
|
|
315
|
+
/** Effect applied */
|
|
316
|
+
effect: Effect;
|
|
317
|
+
/** Matched rule (if any) */
|
|
318
|
+
rule?: string;
|
|
319
|
+
/** Action taken */
|
|
320
|
+
action?: PolicyAction;
|
|
321
|
+
/** Escalation (if escalated) */
|
|
322
|
+
escalation?: EscalationPolicy;
|
|
323
|
+
/** Evaluation errors (if any) */
|
|
324
|
+
errors?: PolicyErrorDetails[];
|
|
325
|
+
/** Evaluation metadata */
|
|
326
|
+
metadata?: {
|
|
327
|
+
/** Evaluation duration (ms) */
|
|
328
|
+
duration: number;
|
|
329
|
+
/** Rules evaluated */
|
|
330
|
+
rulesEvaluated: number;
|
|
331
|
+
/** Timestamp */
|
|
332
|
+
timestamp: number;
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* Policy parser interface
|
|
337
|
+
*/
|
|
338
|
+
export interface PolicyParser {
|
|
339
|
+
/**
|
|
340
|
+
* Parse policy DSL string into PolicyDocument
|
|
341
|
+
*/
|
|
342
|
+
parse(source: string): PolicyDocument;
|
|
343
|
+
/**
|
|
344
|
+
* Validate policy document
|
|
345
|
+
*/
|
|
346
|
+
validate(policy: PolicyDocument): PolicyErrorDetails[];
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* Policy evaluator interface
|
|
350
|
+
*/
|
|
351
|
+
export interface PolicyEvaluator {
|
|
352
|
+
/**
|
|
353
|
+
* Evaluate policy rules against context
|
|
354
|
+
*/
|
|
355
|
+
evaluate(policy: PolicyDocument, context: PolicyContext): PolicyEvaluationResult;
|
|
356
|
+
/**
|
|
357
|
+
* Evaluate single condition against context
|
|
358
|
+
*/
|
|
359
|
+
evaluateCondition(condition: PolicyCondition, context: PolicyContext): boolean;
|
|
360
|
+
/**
|
|
361
|
+
* Execute policy action
|
|
362
|
+
*/
|
|
363
|
+
executeAction(action: PolicyAction, context: PolicyContext): Promise<void>;
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* Parse duration string (e.g., "15m", "2h")
|
|
367
|
+
*/
|
|
368
|
+
export declare function parseDuration(str: string): Duration;
|
|
369
|
+
/**
|
|
370
|
+
* Format duration as human-readable string
|
|
371
|
+
*/
|
|
372
|
+
export declare function formatDuration(duration: Duration): string;
|
|
373
|
+
/**
|
|
374
|
+
* Resolve variable path in context
|
|
375
|
+
*/
|
|
376
|
+
export declare function resolveVariable(variable: Variable, context: PolicyContext): PolicyValue;
|
|
377
|
+
//# sourceMappingURL=policy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"policy.d.ts","sourceRoot":"","sources":["../../src/types/policy.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,UAAU,CAAC;IACjB,oDAAoD;IACpD,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;AAE9D;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,WAAW,EAAE,CAAC;AAEvC;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,UAAU,CAAC;IACjB,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,yBAAyB;IACzB,IAAI,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
|
1
|
+
/**
|
|
2
|
+
* @fileoverview OSSA Policy DSL Type Definitions
|
|
3
|
+
* @module @openstandardagents/policy
|
|
4
|
+
* @version 1.0.0
|
|
5
|
+
*
|
|
6
|
+
* Formal type definitions for the OSSA Policy Domain-Specific Language.
|
|
7
|
+
* See docs/specs/policy-dsl.md for full specification.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Policy error class
|
|
11
|
+
*/
|
|
12
|
+
export class PolicyError extends Error {
|
|
13
|
+
details;
|
|
14
|
+
constructor(details) {
|
|
15
|
+
super(details.message);
|
|
16
|
+
this.name = 'PolicyError';
|
|
17
|
+
this.details = details;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
// ============================================================================
|
|
21
|
+
// Utility Functions
|
|
22
|
+
// ============================================================================
|
|
23
|
+
/**
|
|
24
|
+
* Parse duration string (e.g., "15m", "2h")
|
|
25
|
+
*/
|
|
26
|
+
export function parseDuration(str) {
|
|
27
|
+
const match = str.match(/^(\d+)(s|m|h|d)$/);
|
|
28
|
+
if (!match) {
|
|
29
|
+
throw new PolicyError({
|
|
30
|
+
type: 'ValidationError',
|
|
31
|
+
message: `Invalid duration format: ${str}`,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
const unitMap = {
|
|
35
|
+
s: 'seconds',
|
|
36
|
+
m: 'minutes',
|
|
37
|
+
h: 'hours',
|
|
38
|
+
d: 'days',
|
|
39
|
+
};
|
|
40
|
+
return {
|
|
41
|
+
value: parseInt(match[1], 10),
|
|
42
|
+
unit: unitMap[match[2]],
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Format duration as human-readable string
|
|
47
|
+
*/
|
|
48
|
+
export function formatDuration(duration) {
|
|
49
|
+
const unitLabels = {
|
|
50
|
+
seconds: 'second',
|
|
51
|
+
minutes: 'minute',
|
|
52
|
+
hours: 'hour',
|
|
53
|
+
days: 'day',
|
|
54
|
+
};
|
|
55
|
+
const label = unitLabels[duration.unit];
|
|
56
|
+
return `${duration.value} ${label}${duration.value !== 1 ? 's' : ''}`;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Resolve variable path in context
|
|
60
|
+
*/
|
|
61
|
+
export function resolveVariable(variable, context) {
|
|
62
|
+
let value = context;
|
|
63
|
+
for (const key of variable.path) {
|
|
64
|
+
if (value === null || value === undefined) {
|
|
65
|
+
throw new PolicyError({
|
|
66
|
+
type: 'ContextError',
|
|
67
|
+
message: `Cannot resolve variable: $${variable.path.join('.')}`,
|
|
68
|
+
context: { path: variable.path, availableKeys: [] },
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
if (typeof value === 'object') {
|
|
72
|
+
value = value[key];
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
throw new PolicyError({
|
|
76
|
+
type: 'ContextError',
|
|
77
|
+
message: `Cannot resolve variable: $${variable.path.join('.')}`,
|
|
78
|
+
context: { path: variable.path, availableKeys: [] },
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return value;
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=policy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"policy.js","sourceRoot":"","sources":["../../src/types/policy.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AA+aH;;GAEG;AACH,MAAM,OAAO,WAAY,SAAQ,KAAK;IACpB,OAAO,CAAqB;IAE5C,YAAY,OAA2B;QACrC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC;QAC1B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;CACF;AAuFD,+EAA+E;AAC/E,oBAAoB;AACpB,+EAA+E;AAE/E;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,GAAW;IACvC,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,kBAAkB,CAA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AG,CAAC,EAAE;gBAC/D,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,aAAa,EAAE,EAAE,EAAE;aACpD,CAAC,CAAC;QACL,CAAC;QAED,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9B,KAAK,GAAI,KAAiC,CAAC,GAAG,CAAC,CAAC;QAClD,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,WAAW,CAAC;gBACpB,IAAI,EAAE,cAAc;gBACpB,OAAO,EAAE,6BAA6B,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;gBAC/D,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,aAAa,EAAE,EAAE,EAAE;aACpD,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,KAAoB,CAAC;AAC9B,CAAC"}
|
package/dist/utils/version.js
CHANGED
|
@@ -57,7 +57,7 @@ export function getVersionInfo(forceRefresh = false) {
|
|
|
57
57
|
if (cachedVersionInfo && !forceRefresh) {
|
|
58
58
|
return cachedVersionInfo;
|
|
59
59
|
}
|
|
60
|
-
let version = '0.2.
|
|
60
|
+
let version = '0.2.9'; // Ultimate fallback
|
|
61
61
|
// Try to find package.json
|
|
62
62
|
// Strategy 1: From this file's location (works in dist)
|
|
63
63
|
try {
|