MCPcopy Create free account
hub / github.com/astercloud/aster / wrapCode

Method wrapCode

pkg/tools/bridge/runtime.go:573–584  ·  view source on GitHub ↗
(code string, input map[string]any)

Source from the content-addressed store, hash-verified

571}
572
573func (r *BashRuntime) wrapCode(code string, input map[string]any) string {
574 inputJSON, _ := json.Marshal(input)
575 return fmt.Sprintf(`#!/bin/bash
576set -e
577
578# Input as JSON (use jq to parse)
579INPUT_JSON='%s'
580
581# User code
582%s
583`, string(inputJSON), code)
584}
585
586// RuntimeManager 运行时管理器
587type RuntimeManager struct {

Callers 1

ExecuteMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected