Skip to content
ContractSpec
Start here

operation (command) · v1.0.0

messaging.agentActions.process

Classify an inbound message into a fixed allowlisted action or workflow path and return a safe confirmation reply.

field.key.label
messaging-agent-actions/messaging.agentActions.process
field.version.label
1.0.0
field.type.label
operation (command)
field.title.label
messaging.agentActions.process
field.tags.label
messaging,agents,actions,workflow
field.owners.label
@platform.messaging
field.stability.label
beta

Classify an inbound message into a fixed allowlisted action or workflow path and return a safe confirmation reply.

Goal

Demonstrate trustworthy messaging automation without arbitrary tool execution.

Context

Curated messaging demo example for ContractSpec.

Source Definition

typescript
import {
	defineCommand,
	defineSchemaModel,
} from '@lssm-tech/lib.contracts-spec';
import { ScalarTypeEnum } from '@lssm-tech/lib.schema';

export const ProcessMessagingAgentAction = defineCommand({
	meta: {
		key: 'messaging.agentActions.process',
		version: '1.0.0',
		title: 'Process Messaging Agent Action',
		description:
			'Classify an inbound message into a fixed allowlisted action or workflow path and return a safe confirmation reply.',
		goal: 'Demonstrate trustworthy messaging automation without arbitrary tool execution.',
		context: 'Curated messaging demo example for ContractSpec.',
		owners: ['@platform.messaging'],
		tags: ['messaging', 'agents', 'actions', 'workflow'],
		stability: 'beta',
	},
	io: {
		input: MessagingInboundMessageInput,
		output: MessagingInboundMessageResult,
	},
	acceptance: {
		scenarios: [
			{
				key: 'status-check',
				given: ['An operator sends a status request from a messaging channel'],
				when: ['The inbound message is processed'],
				then: ['A deterministic status reply is returned'],
			},
			{
				key: 'allowlisted-action',
				given: ['An operator asks to run an allowlisted action'],
				when: ['The action key matches the safe allowlist'],
				then: ['The reply confirms the action without arbitrary execution'],
			},
			{
				key: 'allowlisted-workflow',
				given: ['An operator asks to dispatch an allowlisted workflow'],
				when: ['The workflow key matches the safe allowlist'],
				then: ['The reply confirms the workflow dispatch request'],
			},
		],
	},
	policy: {
		auth: 'admin',
	},
});