@agentworkforce/events 0.1.0 → 4.1.20
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/LICENSE +190 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/json-schema.d.ts +6 -0
- package/dist/json-schema.d.ts.map +1 -0
- package/dist/json-schema.js +51 -0
- package/dist/json-schema.js.map +1 -0
- package/dist/parse.d.ts +22 -0
- package/dist/parse.d.ts.map +1 -0
- package/dist/parse.js +145 -0
- package/dist/parse.js.map +1 -0
- package/dist/redact.d.ts +6 -0
- package/dist/redact.d.ts.map +1 -0
- package/dist/redact.js +53 -0
- package/dist/redact.js.map +1 -0
- package/dist/registry.d.ts +12 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +180 -0
- package/dist/registry.js.map +1 -0
- package/dist/registry.test.d.ts +2 -0
- package/dist/registry.test.d.ts.map +1 -0
- package/dist/registry.test.js +113 -0
- package/dist/registry.test.js.map +1 -0
- package/dist/schemas.d.ts +157 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +84 -0
- package/dist/schemas.js.map +1 -0
- package/dist/types.d.ts +104 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/validate.d.ts +9 -0
- package/dist/validate.d.ts.map +1 -0
- package/dist/validate.js +22 -0
- package/dist/validate.js.map +1 -0
- package/package.json +6 -6
package/dist/registry.js
ADDED
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { redactEventValue } from './redact.js';
|
|
2
|
+
import { validateJsonSchema, withoutSchemaIdentifiers } from './json-schema.js';
|
|
3
|
+
import { EVENT_FRAME_V1_SCHEMA, EVENT_SUMMARY_SCHEMA } from './schemas.js';
|
|
4
|
+
import { validateEventFrameV1 } from './validate.js';
|
|
5
|
+
const OPEN_PAYLOAD_SCHEMA = Object.freeze({});
|
|
6
|
+
function example(id, provider, trigger, resourceKind, overrides = {}) {
|
|
7
|
+
return {
|
|
8
|
+
schemaVersion: 1,
|
|
9
|
+
id: `evt_${id.replaceAll('.', '_')}`,
|
|
10
|
+
workspace: 'ws_example',
|
|
11
|
+
type: id,
|
|
12
|
+
contractVersion: 1,
|
|
13
|
+
occurredAt: '2026-07-15T09:00:00.000Z',
|
|
14
|
+
attempt: 1,
|
|
15
|
+
resource: {
|
|
16
|
+
path: `/${provider}/${resourceKind.slice(provider.length + 1).replaceAll('.', 's/')}/example`,
|
|
17
|
+
kind: resourceKind,
|
|
18
|
+
id: 'example',
|
|
19
|
+
provider
|
|
20
|
+
},
|
|
21
|
+
summary: { title: `${id} example` },
|
|
22
|
+
payload: { action: trigger.split('.').at(-1) },
|
|
23
|
+
...overrides
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function contract(config) {
|
|
27
|
+
return Object.freeze({
|
|
28
|
+
id: config.id,
|
|
29
|
+
version: 1,
|
|
30
|
+
provider: config.provider,
|
|
31
|
+
trigger: config.trigger,
|
|
32
|
+
resourceKind: config.resourceKind,
|
|
33
|
+
summarySchema: EVENT_SUMMARY_SCHEMA,
|
|
34
|
+
payloadSchema: config.payloadSchema ?? OPEN_PAYLOAD_SCHEMA,
|
|
35
|
+
fixtureExamples: Object.freeze([config.fixture]),
|
|
36
|
+
redact: (payload) => redactEventValue(payload),
|
|
37
|
+
validate(frame) {
|
|
38
|
+
const base = validateEventFrameV1(frame);
|
|
39
|
+
if (!base.valid)
|
|
40
|
+
return base;
|
|
41
|
+
const errors = [];
|
|
42
|
+
if (frame.type !== config.id)
|
|
43
|
+
errors.push({ path: '$.type', message: `must equal ${config.id}`, keyword: 'const' });
|
|
44
|
+
if (frame.contractVersion !== 1)
|
|
45
|
+
errors.push({ path: '$.contractVersion', message: 'must equal 1', keyword: 'const' });
|
|
46
|
+
if (frame.resource.provider !== config.provider)
|
|
47
|
+
errors.push({ path: '$.resource.provider', message: `must equal ${config.provider}`, keyword: 'const' });
|
|
48
|
+
if (frame.resource.kind !== config.resourceKind)
|
|
49
|
+
errors.push({ path: '$.resource.kind', message: `must equal ${config.resourceKind}`, keyword: 'const' });
|
|
50
|
+
const summary = validateJsonSchema(EVENT_SUMMARY_SCHEMA, frame.summary, '$.summary');
|
|
51
|
+
if (!summary.valid)
|
|
52
|
+
errors.push(...summary.errors);
|
|
53
|
+
if (frame.payload !== undefined) {
|
|
54
|
+
const payload = validateJsonSchema(config.payloadSchema ?? OPEN_PAYLOAD_SCHEMA, frame.payload, '$.payload');
|
|
55
|
+
if (!payload.valid)
|
|
56
|
+
errors.push(...payload.errors);
|
|
57
|
+
}
|
|
58
|
+
return errors.length === 0 ? { valid: true, errors: [] } : { valid: false, errors };
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
export const EVENT_CONTRACTS = Object.freeze([
|
|
63
|
+
contract({
|
|
64
|
+
id: 'startup',
|
|
65
|
+
provider: 'runtime',
|
|
66
|
+
trigger: 'startup',
|
|
67
|
+
resourceKind: 'runtime.startup',
|
|
68
|
+
fixture: example('startup', 'runtime', 'startup', 'runtime.startup', {
|
|
69
|
+
resource: { path: '/runtime/startups/evt_startup', kind: 'runtime.startup', id: 'evt_startup', provider: 'runtime' },
|
|
70
|
+
summary: { title: 'Agent runtime started' },
|
|
71
|
+
payload: undefined
|
|
72
|
+
})
|
|
73
|
+
}),
|
|
74
|
+
contract({
|
|
75
|
+
id: 'cron.tick',
|
|
76
|
+
provider: 'cron',
|
|
77
|
+
trigger: 'tick',
|
|
78
|
+
resourceKind: 'cron.schedule',
|
|
79
|
+
fixture: example('cron.tick', 'cron', 'tick', 'cron.schedule', {
|
|
80
|
+
resource: { path: '/cron/schedules/scan', kind: 'cron.schedule', id: 'scan', provider: 'cron' },
|
|
81
|
+
summary: { title: 'Scheduled scan' },
|
|
82
|
+
schedule: { name: 'scan', cron: '0 9 * * *', timezone: 'UTC', scheduledFor: '2026-07-15T09:00:00.000Z' },
|
|
83
|
+
payload: undefined
|
|
84
|
+
})
|
|
85
|
+
}),
|
|
86
|
+
contract({
|
|
87
|
+
id: 'github.issues.labeled',
|
|
88
|
+
provider: 'github',
|
|
89
|
+
trigger: 'issues.labeled',
|
|
90
|
+
resourceKind: 'github.issue',
|
|
91
|
+
fixture: example('github.issues.labeled', 'github', 'issues.labeled', 'github.issue', {
|
|
92
|
+
resource: { path: '/github/repos/acme/app/issues/42.json', kind: 'github.issue', id: '42', provider: 'github' },
|
|
93
|
+
summary: { title: 'Issue #42 labeled bug', actor: 'octocat' },
|
|
94
|
+
payload: { action: 'labeled', issue: { number: 42 }, label: { name: 'bug' } }
|
|
95
|
+
})
|
|
96
|
+
}),
|
|
97
|
+
contract({
|
|
98
|
+
id: 'github.pull_request.opened',
|
|
99
|
+
provider: 'github',
|
|
100
|
+
trigger: 'pull_request.opened',
|
|
101
|
+
resourceKind: 'github.pull_request',
|
|
102
|
+
fixture: example('github.pull_request.opened', 'github', 'pull_request.opened', 'github.pull_request', {
|
|
103
|
+
resource: { path: '/github/repos/acme/app/pulls/7.json', kind: 'github.pull_request', id: '7', provider: 'github' },
|
|
104
|
+
summary: { title: 'PR #7 opened', actor: 'octocat' },
|
|
105
|
+
payload: { action: 'opened', pull_request: { number: 7 } }
|
|
106
|
+
})
|
|
107
|
+
}),
|
|
108
|
+
contract({
|
|
109
|
+
id: 'slack.message.created',
|
|
110
|
+
provider: 'slack',
|
|
111
|
+
trigger: 'message.created',
|
|
112
|
+
resourceKind: 'slack.message',
|
|
113
|
+
fixture: example('slack.message.created', 'slack', 'message.created', 'slack.message', {
|
|
114
|
+
resource: { path: '/slack/channels/C123/messages/171.json', kind: 'slack.message', id: '171', provider: 'slack' },
|
|
115
|
+
summary: { title: 'New Slack message', actor: 'U123' },
|
|
116
|
+
message: { channel: 'C123', messageId: '171' },
|
|
117
|
+
payload: { channel: 'C123', user: 'U123', text: 'hello' }
|
|
118
|
+
})
|
|
119
|
+
}),
|
|
120
|
+
contract({
|
|
121
|
+
id: 'linear.issue.created',
|
|
122
|
+
provider: 'linear',
|
|
123
|
+
trigger: 'issue.created',
|
|
124
|
+
resourceKind: 'linear.issue',
|
|
125
|
+
fixture: example('linear.issue.created', 'linear', 'issue.created', 'linear.issue', {
|
|
126
|
+
resource: { path: '/linear/issues/ENG-1.json', kind: 'linear.issue', id: 'ENG-1', provider: 'linear' },
|
|
127
|
+
summary: { title: 'ENG-1 created', actor: 'user@example.com' },
|
|
128
|
+
payload: { action: 'create', issue: { identifier: 'ENG-1', title: 'Ship it' } }
|
|
129
|
+
})
|
|
130
|
+
}),
|
|
131
|
+
contract({
|
|
132
|
+
id: 'relaycast.message',
|
|
133
|
+
provider: 'relaycast',
|
|
134
|
+
trigger: 'message',
|
|
135
|
+
resourceKind: 'relaycast.message',
|
|
136
|
+
fixture: example('relaycast.message', 'relaycast', 'message', 'relaycast.message', {
|
|
137
|
+
resource: { path: '/relaycast/general/messages/msg_1', kind: 'relaycast.message', id: 'msg_1', provider: 'relaycast' },
|
|
138
|
+
summary: { title: 'Can you take a look?' },
|
|
139
|
+
message: { channel: 'general', messageId: 'msg_1', threadId: 'thread_1' },
|
|
140
|
+
payload: { text: 'Can you take a look?' }
|
|
141
|
+
})
|
|
142
|
+
})
|
|
143
|
+
]);
|
|
144
|
+
const BY_KEY = new Map(EVENT_CONTRACTS.map((entry) => [`${entry.id}@${entry.version}`, entry]));
|
|
145
|
+
export function getEventContract(id, version = 1) {
|
|
146
|
+
return BY_KEY.get(`${id}@${version}`);
|
|
147
|
+
}
|
|
148
|
+
export function requireEventContract(id, version = 1) {
|
|
149
|
+
const entry = getEventContract(id, version);
|
|
150
|
+
if (!entry)
|
|
151
|
+
throw new Error(`Unknown Event contract: ${id}@${version}`);
|
|
152
|
+
return entry;
|
|
153
|
+
}
|
|
154
|
+
export const EVENT_CONTRACT_JSON_SCHEMAS = Object.freeze(Object.fromEntries(EVENT_CONTRACTS.map((entry) => [
|
|
155
|
+
`${entry.id}@${entry.version}`,
|
|
156
|
+
{
|
|
157
|
+
$schema: 'https://json-schema.org/draft/2020-12/schema',
|
|
158
|
+
$id: `https://agentworkforce.dev/schemas/events/${entry.id}/v${entry.version}.json`,
|
|
159
|
+
allOf: [
|
|
160
|
+
withoutSchemaIdentifiers(EVENT_FRAME_V1_SCHEMA),
|
|
161
|
+
{
|
|
162
|
+
type: 'object',
|
|
163
|
+
properties: {
|
|
164
|
+
type: { const: entry.id },
|
|
165
|
+
contractVersion: { const: entry.version },
|
|
166
|
+
resource: {
|
|
167
|
+
type: 'object',
|
|
168
|
+
properties: {
|
|
169
|
+
provider: { const: entry.provider },
|
|
170
|
+
kind: { const: entry.resourceKind }
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
summary: entry.summarySchema,
|
|
174
|
+
...(entry.payloadSchema ? { payload: entry.payloadSchema } : {})
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
]
|
|
178
|
+
}
|
|
179
|
+
])));
|
|
180
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAE3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAErD,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,CAAsB,CAAC;AAEnE,SAAS,OAAO,CACd,EAAU,EACV,QAAgB,EAChB,OAAe,EACf,YAAoB,EACpB,YAAmC,EAAE;IAErC,OAAO;QACL,aAAa,EAAE,CAAC;QAChB,EAAE,EAAE,OAAO,EAAE,CAAC,UAAU,CAAC,GAA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C,EAAE,IAAI,KAAK,CAAC,OAAO,EAAE;IAC9B;QACE,OAAO,EAAE,8CAA8C;QACvD,GAAG,EAAE,6CAA6C,KAAK,CAAC,EAAE,KAAK,KAAK,CAAC,OAAO,OAAO;QACnF,KAAK,EAAE;YACL,wBAAwB,CAAC,qBAAqB,CAAC;YAC/C;gBACE,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,EAAE;oBACzB,eAAe,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE;oBACzC,QAAQ,EAAE;wBACR,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACV,QAAQ,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,QAAQ,EAAE;4BACnC,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,YAAY,EAAE;yBACpC;qBACF;oBACD,OAAO,EAAE,KAAK,CAAC,aAAa;oBAC5B,GAAG,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;iBACjE;aACF;SACF;KACmB;CACvB,CAAC,CACH,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.test.d.ts","sourceRoot":"","sources":["../src/registry.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import assert from 'node:assert/strict';
|
|
2
|
+
import test from 'node:test';
|
|
3
|
+
import addFormatsModule from 'ajv-formats';
|
|
4
|
+
import { Ajv2020 } from 'ajv/dist/2020.js';
|
|
5
|
+
import { decodeEventFrame, EVENT_CONTRACTS, EVENT_CONTRACT_JSON_SCHEMAS, parseEventFrame, redactEventValue, safeParseEventFrame } from './index.js';
|
|
6
|
+
test('every registry entry exports schema and validating example fixtures', () => {
|
|
7
|
+
assert.deepEqual(EVENT_CONTRACTS.map((entry) => entry.id), [
|
|
8
|
+
'startup',
|
|
9
|
+
'cron.tick',
|
|
10
|
+
'github.issues.labeled',
|
|
11
|
+
'github.pull_request.opened',
|
|
12
|
+
'slack.message.created',
|
|
13
|
+
'linear.issue.created',
|
|
14
|
+
'relaycast.message'
|
|
15
|
+
]);
|
|
16
|
+
for (const contract of EVENT_CONTRACTS) {
|
|
17
|
+
assert.ok(EVENT_CONTRACT_JSON_SCHEMAS[`${contract.id}@${contract.version}`]);
|
|
18
|
+
assert.ok(contract.fixtureExamples.length > 0);
|
|
19
|
+
for (const fixture of contract.fixtureExamples) {
|
|
20
|
+
assert.equal(parseEventFrame(fixture), fixture);
|
|
21
|
+
assert.deepEqual(contract.validate(fixture), { valid: true, errors: [] });
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
test('all exported contract schemas register together without identifier collisions', () => {
|
|
26
|
+
const ajv = new Ajv2020({ strict: true });
|
|
27
|
+
addFormatsModule(ajv);
|
|
28
|
+
for (const schema of Object.values(EVENT_CONTRACT_JSON_SCHEMAS))
|
|
29
|
+
ajv.addSchema(schema);
|
|
30
|
+
});
|
|
31
|
+
test('known schema versions reject unknown top-level fields and preserve extensions', () => {
|
|
32
|
+
const fixture = EVENT_CONTRACTS[1].fixtureExamples[0];
|
|
33
|
+
assert.equal(safeParseEventFrame({ ...fixture, surprise: true }).success, false);
|
|
34
|
+
const extended = { ...fixture, extensions: { futureCapability: { enabled: true } } };
|
|
35
|
+
assert.deepEqual(parseEventFrame(extended).extensions, { futureCapability: { enabled: true } });
|
|
36
|
+
});
|
|
37
|
+
test('legacy gateway envelopes decode with visible compatibility metadata', () => {
|
|
38
|
+
const decoded = decodeEventFrame({
|
|
39
|
+
id: 'evt_legacy',
|
|
40
|
+
workspace: 'ws_1',
|
|
41
|
+
type: 'github.issue.labeled',
|
|
42
|
+
occurredAt: '2026-07-15T09:00:00.000Z',
|
|
43
|
+
attempt: 2,
|
|
44
|
+
provider: 'github',
|
|
45
|
+
deliveryId: 'delivery_1',
|
|
46
|
+
paths: ['/github/repos/acme/app/issues/42.json'],
|
|
47
|
+
resource: { action: 'labeled', issue: { number: 42 } },
|
|
48
|
+
summary: { title: 'Issue labeled' },
|
|
49
|
+
resumeContext: { phase: 2 },
|
|
50
|
+
vendorFutureField: { retained: true }
|
|
51
|
+
});
|
|
52
|
+
assert.equal(decoded.frame.type, 'github.issues.labeled');
|
|
53
|
+
assert.equal(decoded.frame.contractVersion, 1);
|
|
54
|
+
assert.deepEqual(decoded.frame.payload, { action: 'labeled', issue: { number: 42 } });
|
|
55
|
+
assert.equal(decoded.compatibility?.source, 'legacy-raw-gateway-envelope');
|
|
56
|
+
assert.deepEqual(decoded.compatibility?.aliasesApplied, ['github.issue.labeled -> github.issues.labeled']);
|
|
57
|
+
assert.deepEqual(decoded.frame.extensions?.vendorFutureField, { retained: true });
|
|
58
|
+
assert.deepEqual(decoded.frame.extensions?.resumeContext, { phase: 2 });
|
|
59
|
+
});
|
|
60
|
+
test('legacy cron and relaycast envelopes retain their specialized coordinates', () => {
|
|
61
|
+
const cron = decodeEventFrame({ id: 'cron_1', workspace: 'ws', type: 'cron.tick', occurredAt: '2026-07-15T09:00:00Z', name: 'scan', cron: '0 9 * * *' });
|
|
62
|
+
assert.deepEqual(cron.frame.schedule, { name: 'scan', cron: '0 9 * * *' });
|
|
63
|
+
assert.equal(cron.frame.resource.id, 'scan');
|
|
64
|
+
const relay = decodeEventFrame({ id: 'msg_evt', workspace: 'ws', type: 'relaycast.message', occurredAt: '2026-07-15T09:00:00Z', channel: 'general', messageId: 'm1', threadId: 't1', resource: { text: 'hello' } });
|
|
65
|
+
assert.deepEqual(relay.frame.message, { channel: 'general', messageId: 'm1', threadId: 't1' });
|
|
66
|
+
assert.equal(relay.frame.resource.kind, 'relaycast.message');
|
|
67
|
+
});
|
|
68
|
+
test('legacy startup remains compatible and resource lookalikes retain provider data', () => {
|
|
69
|
+
const startup = decodeEventFrame({ id: 'evt_boot', workspace: 'ws', type: 'startup', occurredAt: '2026-07-15T09:00:00Z' });
|
|
70
|
+
assert.equal(startup.frame.type, 'startup');
|
|
71
|
+
assert.equal(startup.frame.resource.kind, 'runtime.startup');
|
|
72
|
+
const github = decodeEventFrame({
|
|
73
|
+
id: 'evt_resource',
|
|
74
|
+
workspace: 'ws',
|
|
75
|
+
type: 'github.issues.labeled',
|
|
76
|
+
occurredAt: '2026-07-15T09:00:00Z',
|
|
77
|
+
resource: { path: '/provider/path', kind: 'github.issue', id: '42', provider: 'github', action: 'labeled' }
|
|
78
|
+
});
|
|
79
|
+
assert.deepEqual(github.frame.payload, { path: '/provider/path', kind: 'github.issue', id: '42', provider: 'github', action: 'labeled' });
|
|
80
|
+
assert.equal(github.frame.resource.path.includes('//'), false);
|
|
81
|
+
});
|
|
82
|
+
test('legacy extension copying is prototype-safe and preserves compatibility collisions', () => {
|
|
83
|
+
const legacy = JSON.parse('{"id":"evt_proto","workspace":"ws","type":"startup","occurredAt":"2026-07-15T09:00:00Z","__proto__":{"polluted":true},"compatibility":{"vendor":"original"}}');
|
|
84
|
+
const decoded = decodeEventFrame(legacy);
|
|
85
|
+
assert.equal(Object.prototype.hasOwnProperty.call(decoded.frame.extensions, '__proto__'), true);
|
|
86
|
+
assert.deepEqual(decoded.frame.extensions?.__proto__, { polluted: true });
|
|
87
|
+
assert.deepEqual(decoded.compatibility?.originalCompatibility, { vendor: 'original' });
|
|
88
|
+
assert.equal({}.polluted, undefined);
|
|
89
|
+
});
|
|
90
|
+
test('schema-driven validation rejects malformed timestamps and summary fields', () => {
|
|
91
|
+
const fixture = EVENT_CONTRACTS[0].fixtureExamples[0];
|
|
92
|
+
assert.equal(safeParseEventFrame({ ...fixture, occurredAt: 'July 15, 2026' }).success, false);
|
|
93
|
+
assert.equal(safeParseEventFrame({ ...fixture, summary: { title: 42 } }).success, false);
|
|
94
|
+
assert.equal(safeParseEventFrame({ ...fixture, schedule: { name: 'scan', scheduledFor: '2026-02-30T00:00:00Z' } }).success, false);
|
|
95
|
+
});
|
|
96
|
+
test('redaction is recursive, immutable, and handles bearer strings', () => {
|
|
97
|
+
const input = { token: 'secret', nested: [{ authorization: 'Bearer abc.def', text: 'Bearer abc.def' }] };
|
|
98
|
+
const output = redactEventValue(input);
|
|
99
|
+
assert.deepEqual(output, { token: '[REDACTED]', nested: [{ authorization: '[REDACTED]', text: '[REDACTED]' }] });
|
|
100
|
+
assert.equal(input.token, 'secret');
|
|
101
|
+
});
|
|
102
|
+
test('redaction preserves prototype-looking data safely and treats global matchers statelessly', () => {
|
|
103
|
+
const input = JSON.parse('{"__proto__":{"safe":true},"first":"one","second":"two"}');
|
|
104
|
+
const output = redactEventValue(input, { additionalSensitiveKeys: [/first|second/g] });
|
|
105
|
+
assert.equal(Object.prototype.hasOwnProperty.call(output, '__proto__'), true);
|
|
106
|
+
assert.deepEqual(output.__proto__, { safe: true });
|
|
107
|
+
assert.equal(output.first, '[REDACTED]');
|
|
108
|
+
assert.equal(output.second, '[REDACTED]');
|
|
109
|
+
assert.equal({}.safe, undefined);
|
|
110
|
+
const date = new Date('2026-07-15T09:00:00Z');
|
|
111
|
+
assert.equal(redactEventValue(date), date);
|
|
112
|
+
});
|
|
113
|
+
//# sourceMappingURL=registry.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.test.js","sourceRoot":"","sources":["../src/registry.test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,gBAAgB,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,2BAA2B,EAC3B,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,YAAY,CAAC;AAEpB,IAAI,CAAC,qEAAqE,EAAE,GAAG,EAAE;IAC/E,MAAM,C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,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;IACzC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IAC1C,MAAM,CAAC,KAAK,CAAE,EAAyB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IAEzD,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,sBAAsB,CAAC,CAAC;IAC9C,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC;AAC7C,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
export declare const EVENT_SUMMARY_SCHEMA: {
|
|
2
|
+
readonly $id: "https://agentworkforce.dev/schemas/events/event-summary.json";
|
|
3
|
+
readonly type: "object";
|
|
4
|
+
readonly properties: {
|
|
5
|
+
readonly title: {
|
|
6
|
+
readonly type: "string";
|
|
7
|
+
};
|
|
8
|
+
readonly description: {
|
|
9
|
+
readonly type: "string";
|
|
10
|
+
};
|
|
11
|
+
readonly actor: {
|
|
12
|
+
readonly type: "string";
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
readonly additionalProperties: true;
|
|
16
|
+
};
|
|
17
|
+
/** Canonical JSON Schema export used by Cloud, fixtures, and replay tooling. */
|
|
18
|
+
export declare const EVENT_FRAME_V1_SCHEMA: {
|
|
19
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
20
|
+
readonly $id: "https://agentworkforce.dev/schemas/events/event-frame-v1.json";
|
|
21
|
+
readonly title: "EventFrameV1";
|
|
22
|
+
readonly type: "object";
|
|
23
|
+
readonly additionalProperties: false;
|
|
24
|
+
readonly required: readonly ["schemaVersion", "id", "workspace", "type", "contractVersion", "occurredAt", "attempt", "resource", "summary"];
|
|
25
|
+
readonly properties: {
|
|
26
|
+
readonly schemaVersion: {
|
|
27
|
+
readonly const: 1;
|
|
28
|
+
};
|
|
29
|
+
readonly id: {
|
|
30
|
+
readonly type: "string";
|
|
31
|
+
readonly minLength: 1;
|
|
32
|
+
};
|
|
33
|
+
readonly workspace: {
|
|
34
|
+
readonly type: "string";
|
|
35
|
+
readonly minLength: 1;
|
|
36
|
+
};
|
|
37
|
+
readonly type: {
|
|
38
|
+
readonly type: "string";
|
|
39
|
+
readonly minLength: 1;
|
|
40
|
+
};
|
|
41
|
+
readonly contractVersion: {
|
|
42
|
+
readonly type: "integer";
|
|
43
|
+
readonly minimum: 1;
|
|
44
|
+
};
|
|
45
|
+
readonly occurredAt: {
|
|
46
|
+
readonly type: "string";
|
|
47
|
+
readonly format: "date-time";
|
|
48
|
+
};
|
|
49
|
+
readonly attempt: {
|
|
50
|
+
readonly type: "integer";
|
|
51
|
+
readonly minimum: 1;
|
|
52
|
+
};
|
|
53
|
+
readonly resource: {
|
|
54
|
+
readonly type: "object";
|
|
55
|
+
readonly additionalProperties: false;
|
|
56
|
+
readonly required: readonly ["path", "kind", "id", "provider"];
|
|
57
|
+
readonly properties: {
|
|
58
|
+
readonly path: {
|
|
59
|
+
readonly type: "string";
|
|
60
|
+
};
|
|
61
|
+
readonly kind: {
|
|
62
|
+
readonly type: "string";
|
|
63
|
+
readonly minLength: 1;
|
|
64
|
+
};
|
|
65
|
+
readonly id: {
|
|
66
|
+
readonly type: "string";
|
|
67
|
+
readonly minLength: 1;
|
|
68
|
+
};
|
|
69
|
+
readonly provider: {
|
|
70
|
+
readonly type: "string";
|
|
71
|
+
readonly minLength: 1;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
readonly summary: {
|
|
76
|
+
readonly $id: "https://agentworkforce.dev/schemas/events/event-summary.json";
|
|
77
|
+
readonly type: "object";
|
|
78
|
+
readonly properties: {
|
|
79
|
+
readonly title: {
|
|
80
|
+
readonly type: "string";
|
|
81
|
+
};
|
|
82
|
+
readonly description: {
|
|
83
|
+
readonly type: "string";
|
|
84
|
+
};
|
|
85
|
+
readonly actor: {
|
|
86
|
+
readonly type: "string";
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
readonly additionalProperties: true;
|
|
90
|
+
};
|
|
91
|
+
readonly delivery: {
|
|
92
|
+
readonly type: "object";
|
|
93
|
+
readonly additionalProperties: false;
|
|
94
|
+
readonly properties: {
|
|
95
|
+
readonly id: {
|
|
96
|
+
readonly type: "string";
|
|
97
|
+
};
|
|
98
|
+
readonly dedupeKey: {
|
|
99
|
+
readonly type: "string";
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
readonly payload: {};
|
|
104
|
+
readonly paths: {
|
|
105
|
+
readonly type: "array";
|
|
106
|
+
readonly items: {
|
|
107
|
+
readonly type: "string";
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
readonly digest: {
|
|
111
|
+
readonly type: "string";
|
|
112
|
+
};
|
|
113
|
+
readonly schedule: {
|
|
114
|
+
readonly type: "object";
|
|
115
|
+
readonly additionalProperties: false;
|
|
116
|
+
readonly required: readonly ["name"];
|
|
117
|
+
readonly properties: {
|
|
118
|
+
readonly name: {
|
|
119
|
+
readonly type: "string";
|
|
120
|
+
readonly minLength: 1;
|
|
121
|
+
};
|
|
122
|
+
readonly cron: {
|
|
123
|
+
readonly type: "string";
|
|
124
|
+
};
|
|
125
|
+
readonly timezone: {
|
|
126
|
+
readonly type: "string";
|
|
127
|
+
};
|
|
128
|
+
readonly scheduledFor: {
|
|
129
|
+
readonly type: "string";
|
|
130
|
+
readonly format: "date-time";
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
readonly message: {
|
|
135
|
+
readonly type: "object";
|
|
136
|
+
readonly additionalProperties: false;
|
|
137
|
+
readonly properties: {
|
|
138
|
+
readonly channel: {
|
|
139
|
+
readonly type: "string";
|
|
140
|
+
};
|
|
141
|
+
readonly messageId: {
|
|
142
|
+
readonly type: "string";
|
|
143
|
+
};
|
|
144
|
+
readonly threadId: {
|
|
145
|
+
readonly type: "string";
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
readonly extensions: {
|
|
150
|
+
readonly type: "object";
|
|
151
|
+
readonly additionalProperties: true;
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
/** Derived from the schema so parsers and exported schema cannot drift. */
|
|
156
|
+
export declare const EVENT_FRAME_V1_FIELDS: readonly (keyof typeof EVENT_FRAME_V1_SCHEMA.properties)[];
|
|
157
|
+
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;CASF,CAAC;AAEhC,gFAAgF;AAChF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmEH,CAAC;AAEhC,2EAA2E;AAC3E,eAAO,MAAM,qBAAqB,EAE7B,SAAS,CAAC,MAAM,OAAO,qBAAqB,CAAC,UAAU,CAAC,EAAE,CAAC"}
|
package/dist/schemas.js
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
const stringSchema = { type: 'string' };
|
|
2
|
+
const nonEmptyStringSchema = { type: 'string', minLength: 1 };
|
|
3
|
+
export const EVENT_SUMMARY_SCHEMA = {
|
|
4
|
+
$id: 'https://agentworkforce.dev/schemas/events/event-summary.json',
|
|
5
|
+
type: 'object',
|
|
6
|
+
properties: {
|
|
7
|
+
title: stringSchema,
|
|
8
|
+
description: stringSchema,
|
|
9
|
+
actor: stringSchema
|
|
10
|
+
},
|
|
11
|
+
additionalProperties: true
|
|
12
|
+
};
|
|
13
|
+
/** Canonical JSON Schema export used by Cloud, fixtures, and replay tooling. */
|
|
14
|
+
export const EVENT_FRAME_V1_SCHEMA = {
|
|
15
|
+
$schema: 'https://json-schema.org/draft/2020-12/schema',
|
|
16
|
+
$id: 'https://agentworkforce.dev/schemas/events/event-frame-v1.json',
|
|
17
|
+
title: 'EventFrameV1',
|
|
18
|
+
type: 'object',
|
|
19
|
+
additionalProperties: false,
|
|
20
|
+
required: [
|
|
21
|
+
'schemaVersion',
|
|
22
|
+
'id',
|
|
23
|
+
'workspace',
|
|
24
|
+
'type',
|
|
25
|
+
'contractVersion',
|
|
26
|
+
'occurredAt',
|
|
27
|
+
'attempt',
|
|
28
|
+
'resource',
|
|
29
|
+
'summary'
|
|
30
|
+
],
|
|
31
|
+
properties: {
|
|
32
|
+
schemaVersion: { const: 1 },
|
|
33
|
+
id: nonEmptyStringSchema,
|
|
34
|
+
workspace: nonEmptyStringSchema,
|
|
35
|
+
type: nonEmptyStringSchema,
|
|
36
|
+
contractVersion: { type: 'integer', minimum: 1 },
|
|
37
|
+
occurredAt: { type: 'string', format: 'date-time' },
|
|
38
|
+
attempt: { type: 'integer', minimum: 1 },
|
|
39
|
+
resource: {
|
|
40
|
+
type: 'object',
|
|
41
|
+
additionalProperties: false,
|
|
42
|
+
required: ['path', 'kind', 'id', 'provider'],
|
|
43
|
+
properties: {
|
|
44
|
+
path: stringSchema,
|
|
45
|
+
kind: nonEmptyStringSchema,
|
|
46
|
+
id: nonEmptyStringSchema,
|
|
47
|
+
provider: nonEmptyStringSchema
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
summary: EVENT_SUMMARY_SCHEMA,
|
|
51
|
+
delivery: {
|
|
52
|
+
type: 'object',
|
|
53
|
+
additionalProperties: false,
|
|
54
|
+
properties: { id: stringSchema, dedupeKey: stringSchema }
|
|
55
|
+
},
|
|
56
|
+
payload: {},
|
|
57
|
+
paths: { type: 'array', items: stringSchema },
|
|
58
|
+
digest: stringSchema,
|
|
59
|
+
schedule: {
|
|
60
|
+
type: 'object',
|
|
61
|
+
additionalProperties: false,
|
|
62
|
+
required: ['name'],
|
|
63
|
+
properties: {
|
|
64
|
+
name: nonEmptyStringSchema,
|
|
65
|
+
cron: stringSchema,
|
|
66
|
+
timezone: stringSchema,
|
|
67
|
+
scheduledFor: { type: 'string', format: 'date-time' }
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
message: {
|
|
71
|
+
type: 'object',
|
|
72
|
+
additionalProperties: false,
|
|
73
|
+
properties: {
|
|
74
|
+
channel: stringSchema,
|
|
75
|
+
messageId: stringSchema,
|
|
76
|
+
threadId: stringSchema
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
extensions: { type: 'object', additionalProperties: true }
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
/** Derived from the schema so parsers and exported schema cannot drift. */
|
|
83
|
+
export const EVENT_FRAME_V1_FIELDS = Object.freeze(Object.keys(EVENT_FRAME_V1_SCHEMA.properties));
|
|
84
|
+
//# sourceMappingURL=schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAEA,MAAM,YAAY,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAW,CAAC;AACjD,MAAM,oBAAoB,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,EAAW,CAAC;AAEvE,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,GAAG,EAAE,8DAA8D;IACnE,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,YAAY;QACzB,KAAK,EAAE,YAAY;KACpB;IACD,oBAAoB,EAAE,IAAI;CACG,CAAC;AAEhC,gFAAgF;AAChF,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,OAAO,EAAE,8CAA8C;IACvD,GAAG,EAAE,+DAA+D;IACpE,KAAK,EAAE,cAAc;IACrB,IAAI,EAAE,Q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