OSS-first docs

These docs teach the open system first: contracts, generated surfaces, runtimes, governance, and incremental adoption. Studio shows up as the operating layer on top, not as the source of truth.

opencode.example.echo

Echo a prompt for the OpenCode CLI example.

  • Type: operation (command)
  • Version: 1.0.0
  • Stability: stable
  • Owners: @lssm-tech/examples
  • Tags: opencode, example, echo
  • File: packages/examples/opencode-cli/src/contracts/opencode.contracts.ts
  • field.key.label
    opencode.example.echo
    field.version.label
    1.0.0
    field.type.label
    operation (command)
    field.title.label
    opencode.example.echo
    field.description.label

    Echo a prompt for the OpenCode CLI example.

  • Type: operation (command)
  • Version: 1.0.0
  • Stability: stable
  • Owners: @lssm-tech/examples
  • Tags: opencode, example, echo
  • File: packages/examples/opencode-cli/src/contracts/opencode.contracts.ts
  • field.tags.label
    opencode,example,echo
    field.owners.label
    @lssm-tech/examples
    field.stability.label
    stable

    Echo a prompt for the OpenCode CLI example.

    Goal

    Demonstrate OpenCode agent mode in the CLI build/validate flow.

    Context

    Used by the opencode-cli example package.

    Source Definition

    import { defineCommand } from '@lssm-tech/lib.contracts-spec/operations';
    import { defineSchemaModel, ScalarTypeEnum } from '@lssm-tech/lib.schema';
    
    export const OpenCodeEchoCommand = defineCommand({
    	meta: {
    		key: 'opencode.example.echo',
    		version: '1.0.0',
    		stability: 'stable',
    		owners: ['@lssm-tech/examples'],
    		tags: ['opencode', 'example', 'echo'],
    		description: 'Echo a prompt for the OpenCode CLI example.',
    		goal: 'Demonstrate OpenCode agent mode in the CLI build/validate flow.',
    		context: 'Used by the opencode-cli example package.',
    	},
    	io: {
    		input: OpenCodeEchoInput,
    		output: OpenCodeEchoOutput,
    	},
    	acceptance: {
    		scenarios: [
    			{
    				key: 'echo-prompt',
    				given: ['A user provides a prompt'],
    				when: ['The echo command is invoked'],
    				then: ['The message is returned as-is'],
    			},
    		],
    		examples: [
    			{
    				key: 'echo-example',
    				input: { prompt: 'Hello, OpenCode' },
    				output: { message: 'Hello, OpenCode' },
    			},
    		],
    	},
    	policy: { auth: 'user' },
    });