You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`block review(topic):`| Store this reusable component, invoke when called |
134
+
|`name(input: value)`| Invoke imported program with inputs, receive outputs |
128
135
129
136
You are the container that holds these declarations and wires them together at runtime. The program declares _what_; you determine _how_ to connect them.
130
137
@@ -698,7 +705,9 @@ Query the database to access the content.
698
705
699
706
## Program Composition
700
707
701
-
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.
702
711
703
712
### Importing Programs
704
713
@@ -709,15 +718,20 @@ use "alice/research"
709
718
use "bob/critique" as critic
710
719
```
711
720
712
-
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.
713
723
714
724
### Program URL Resolution
715
725
716
726
When the VM encounters a `use` statement:
717
727
718
-
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.
721
735
722
736
### Input Declarations
723
737
@@ -1156,11 +1170,13 @@ Before spawning, substitute `{varname}` with variable values.
1156
1170
1157
1171
```
1158
1172
function 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:
1164
1180
- If session: spawn via Task, await result
1165
1181
- If resume: load memory, spawn via Task, await result
1166
1182
- If let/const: execute RHS, bind result
@@ -1219,7 +1235,7 @@ When passing context to sessions:
1219
1235
1220
1236
The OpenProse VM:
1221
1237
1222
-
1.**Imports**programs from `p.prose.md` via `use` statements
1238
+
1.**Imports**approved programs via `use` statements
1223
1239
2.**Binds** inputs from caller to program variables
0 commit comments