-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.ts
More file actions
154 lines (143 loc) · 4.42 KB
/
Copy pathindex.ts
File metadata and controls
154 lines (143 loc) · 4.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
// Public DX surface for personas. Authors import `handler` to brand
// their event handler; everything else flows through ctx + event types.
export { handler, isWorkforceHandler } from './handler.js';
// Typed agent authoring. `defineAgent` is the agent.ts default export — it
// declares the agent's triggers/schedules/watch and handler, with the handler
// `event` narrowed to the declared triggers.
export {
defineAgent,
isWorkforceAgent,
type AgentDefinition,
type WorkforceEventFor,
type WorkforceAgentExport
} from './define-agent.js';
export type {
HarnessRunArgs,
HarnessRunResult,
CloudApiCredentials,
CredentialsContext,
FilesContext,
LlmContext,
MemoryContext,
MemoryItem,
MemoryRecallOptions,
MemorySaveOptions,
RelayfileCredentials,
RequiredRuntimeCredentials,
SandboxContext,
SandboxExecArgs,
SandboxExecResult,
ScheduleContext,
WorkflowContext,
WorkflowRunHandle,
WorkforceAgentContext,
WorkforceCtx,
WorkforceDeploymentContext,
WorkforceEvent,
WorkforceHandler,
WorkforceHandlerExport,
AgentEvent,
EventType,
CronTickEvent,
RelaycastMessageEvent,
RelayfileChangeEvent,
StartupEvent
} from './types.js';
// Relay SDK event type guards, re-exported so persona handlers can narrow
// `event` by type without importing `@agent-relay/events` directly.
export {
isCronTickEvent,
isRelaycastMessageEvent,
isRelayfileChangeEvent,
isStartupEvent
} from './types.js';
// Runtime envelope helpers shared by provider-triggered agents.
export {
unwrapResourceRecord
} from './types.js';
// Raw gateway envelope contract (the runner's stdin NDJSON line shape, and
// the fixture format for invocation simulation) + the envelope→AgentEvent decoder.
export { type RawGatewayEnvelope } from './shim.js';
export { envelopeToAgentEvent } from './to-agent-event.js';
export type {
LinearAgentActivity,
LinearAgentActivityType,
LinearAgentSession,
LinearAgentSessionEvent,
LinearAgentSessionEventPayload,
LinearAgentSessionPayload,
LinearAppUserNotificationEventPayload,
LinearAppUserNotificationPayload,
LinearIssueReference
} from './types.js';
// Invocation dry-run / simulation (workforce#186): execute a handler against
// fixture envelopes with side effects recorded-not-executed, emitting
// Cloud-compatible run records (`origin: "local_dry_run"`).
export {
simulateInvocation,
createSimulationSubsystems,
deriveSimulatedRunFailureClass,
type CapturedLogLine,
type RecordedSideEffect,
type SimulateInvocationOptions,
type SimulatedRunFailureClass,
type SimulatedRunFailureInput,
type SimulatedRunRecord,
type SimulationResult,
type SimulationSink,
type SimulationSubsystems,
type UnsupportedEnvelope
} from './simulate/index.js';
// VFS-backed transport helpers. All provider interactions go through these
// — no per-provider client code in the runtime. Handlers use listJsonFiles /
// readJsonFile / writeJsonFile directly against the provider path conventions
// (e.g. /linear/issues, /slack/channels).
export {
draftFile,
encodeSegment,
listDirectoryEntries,
listJsonFiles,
readJsonFile,
readTextFile,
resolveMountRoot,
writeJsonFile,
normalizeWritebackStatus,
type IntegrationClientOptions,
type NormalizedWritebackState,
type NormalizedWritebackStatus,
type WritebackReceipt,
type WritebackResult,
WritebackError,
RelayfileWritebackError,
type RelayfileWritebackErrorOptions,
WorkforceIntegrationError,
type WorkforceIntegrationErrorOptions,
SandboxNotAvailableError
} from './clients/index.js';
// Broker-aware relay MCP resolution. Shared between the cloud harness runner
// (cloud-defaults.ts) and the local CLI (packages/cli). Callers use these to
// resolve pre-registered agent-relay MCP args from the broker binary, falling
// back to the legacy @relaycast/mcp injection when the broker is unavailable.
export {
claudeMcpConfigHasRelayOverride,
codexExistingArgs,
injectClaudeAgentRelayMcpConfig,
injectCodexSubcommandArgs,
relayOverrideServerNames,
resolveAgentRelayBrokerMcpArgs,
resolveRelayMcpFromEnv,
type RelayMcpLog
} from './relay-mcp.js';
// Re-export persona-kit types personas commonly reference at the handler
// surface, so users don't need a second import for the shapes the ctx
// carries.
export type {
AgentSpec,
PersonaIntegrationConfig,
PersonaIntegrationTrigger,
PersonaMemoryScope,
PersonaSchedule,
PersonaSpec,
TypedTriggerMap,
WatchRule
} from '@agentworkforce/persona-kit';