
























@@ -63,6 +63,13 @@ use "https://example.com/my-program.prose" # Direct URL
6363use "alice/research" as research # Registry shorthand
6464```
656566+Top-level remote runs are explicit user requests. Remote `use` statements are
67+transitive code dependencies. Before fetching any remote `use` target, collect
68+the exact resolved targets, show them to the operator, and require the operator
69+to reply exactly `approve remote prose imports` for this run. If approval is not
70+given, abort the run before fetching, parsing, registering, or executing the
71+remote imports.
72+6673---
67746875## Why This Is a VM
@@ -113,18 +120,18 @@ When you execute a `.prose` program, you ARE the virtual machine. This is not a
113120114121Traditional dependency injection containers wire up components from configuration. You do the same—but with understanding:
115122116-| Declared Primitive | Your Responsibility |
117-| --------------------------- | ---------------------------------------------------------- |
118-| `use "handle/slug" as name` | Fetch program from p.prose.md, register in Import Registry |
119-| `input topic: "..."` | Bind value from caller, make available as variable |
120-| `output findings = ...` | Mark value as output, return to caller on completion |
121-| `agent researcher:` | Register this agent template for later use |
122-| `session: researcher` | Resolve the agent, merge properties, spawn the session |
123-| `resume: captain` | Load agent memory, spawn session with memory context |
124-| `context: { a, b }` | Wire the outputs of `a` and `b` into this session's input |
125-| `parallel:` branches | Coordinate concurrent execution, collect results |
126-| `block review(topic):` | Store this reusable component, invoke when called |
127-| `name(input: value)` | Invoke imported program with inputs, receive outputs |
123+| Declared Primitive | Your Responsibility |
124+| --------------------------- | ----------------------------------------------------------------------- |
125+| `use "handle/slug" as name` | Resolve import, require approval if remote, register in Import Registry |
126+| `input topic: "..."` | Bind value from caller, make available as variable |
127+| `output findings = ...` | Mark value as output, return to caller on completion |
128+| `agent researcher:` | Register this agent template for later use |
129+| `session: researcher` | Resolve the agent, merge properties, spawn the session |
130+| `resume: captain` | Load agent memory, spawn session with memory context |
131+| `context: { a, b }` | Wire the outputs of `a` and `b` into this session's input |
132+| `parallel:` branches | Coordinate concurrent execution, collect results |
133+| `block review(topic):` | Store this reusable component, invoke when called |
134+| `name(input: value)` | Invoke imported program with inputs, receive outputs |
128135129136You are the container that holds these declarations and wires them together at runtime. The program declares _what_; you determine _how_ to connect them.
130137@@ -698,7 +705,9 @@ Query the database to access the content.
698705699706## Program Composition
700707701-Programs can import and invoke other programs, enabling modular workflows. Programs are fetched from the registry at `p.prose.md`.
708+Programs can import and invoke other programs, enabling modular workflows.
709+Registry and direct-URL imports are remote code dependencies and require
710+operator approval before fetching.
702711703712### Importing Programs
704713@@ -709,15 +718,20 @@ use "alice/research"
709718use "bob/critique" as critic
710719```
711720712-The import path follows the format `handle/slug`. An optional alias (`as name`) allows referencing by a shorter name.
721+The import path can be a registry reference (`handle/slug`) or a direct HTTP(S)
722+URL. An optional alias (`as name`) allows referencing by a shorter name.
713723714724### Program URL Resolution
715725716726When the VM encounters a `use` statement:
717727718-1. Fetch the program from `https://p.prose.md/handle/slug`
719-2. Parse the program to extract its contract (inputs/outputs)
720-3. Register the program in the Import Registry
728+1. Resolve the import target.
729+2. If the target is remote (`http://`, `https://`, or registry shorthand), pause
730+ before fetching and require the operator to approve the full remote import
731+ list with `approve remote prose imports` for this run.
732+3. Fetch the program only after approval.
733+4. Parse the program to extract its contract (inputs/outputs).
734+5. Register the program in the Import Registry.
721735722736### Input Declarations
723737@@ -1156,11 +1170,13 @@ Before spawning, substitute `{varname}` with variable values.
1156117011571171```
11581172function execute(program, inputs?):
1159- 1. Collect all use statements, fetch and register imports
1160- 2. Collect all input declarations, bind values from caller
1161- 3. Collect all agent definitions
1162- 4. Collect all block definitions
1163- 5. For each statement in order:
1173+ 1. Collect all use statements, resolve import targets
1174+ 2. If remote imports are present, require operator approval before fetch
1175+ 3. Fetch approved imports and register them
1176+ 4. Collect all input declarations, bind values from caller
1177+ 5. Collect all agent definitions
1178+ 6. Collect all block definitions
1179+ 7. For each statement in order:
11641180 - If session: spawn via Task, await result
11651181 - If resume: load memory, spawn via Task, await result
11661182 - If let/const: execute RHS, bind result
@@ -1219,7 +1235,7 @@ When passing context to sessions:
1219123512201236The OpenProse VM:
122112371222-1. **Imports** programs from `p.prose.md` via `use` statements
1238+1. **Imports** approved programs via `use` statements
122312392. **Binds** inputs from caller to program variables
122412403. **Parses** the program structure
122512414. **Collects** definitions (agents, blocks)
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。