@synadia-ai/agent-fabric-pi 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BUILD +3 -3
- package/README.md +4 -1
- package/dist/chunk-9jcwbjk5.js +37 -0
- package/dist/fabric.js +4 -4
- package/dist/nats-channel.js +4 -4
- package/package.json +1 -1
- package/skill/scratchpad/SKILL.md +87 -6
- package/skill/scratchpad/scripts/sp +13 -7
- package/dist/chunk-sjpe67s3.js +0 -37
|
@@ -50,7 +50,7 @@ refuse() {
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
# The command: the first argument that is not a flag or a flag's value, as
|
|
53
|
-
# sp itself finds it.
|
|
53
|
+
# sp itself finds it. --apply, --end-promises and --help take no value.
|
|
54
54
|
# On the way, the operation id and the expiry, for the caller's grant after
|
|
55
55
|
# a publication, and the reference, for the record of a grant.
|
|
56
56
|
command=
|
|
@@ -70,7 +70,7 @@ for arg in "$@"; do
|
|
|
70
70
|
fi
|
|
71
71
|
case $arg in
|
|
72
72
|
--) break ;;
|
|
73
|
-
-apply | --apply | -help | --help | -h) ;;
|
|
73
|
+
-apply | --apply | -end-promises | --end-promises | -help | --help | -h) ;;
|
|
74
74
|
-*=*)
|
|
75
75
|
name=${arg%%=*}
|
|
76
76
|
case ${name#-} in
|
|
@@ -94,7 +94,7 @@ for arg in "$@"; do
|
|
|
94
94
|
case $arg in
|
|
95
95
|
-*)
|
|
96
96
|
case $name in
|
|
97
|
-
url | creds | dir | volume | thread-id | root-id | tool-call-id | creator | grantee-account | grantee-user)
|
|
97
|
+
url | creds | dir | volume | bootstrap-file | thread-id | root-id | tool-call-id | creator | grantee-account | grantee-user)
|
|
98
98
|
refuse "--$name is set by the agent, not passed; run the command without it" ;;
|
|
99
99
|
esac
|
|
100
100
|
;;
|
|
@@ -102,12 +102,12 @@ for arg in "$@"; do
|
|
|
102
102
|
done
|
|
103
103
|
|
|
104
104
|
if [ -n "${SP_ENV_FILE:-}" ] && [ -f "$SP_ENV_FILE" ]; then
|
|
105
|
-
unset SP_THREAD_ID SP_ROOT_ID SP_CALLER_ACCOUNT SP_CALLER_USER
|
|
105
|
+
unset SP_THREAD_ID SP_ROOT_ID SP_CALLER_ACCOUNT SP_CALLER_USER SCRATCHPAD_VOLUME SCRATCHPAD_BOOTSTRAP_FILE
|
|
106
106
|
while IFS= read -r line || [ -n "$line" ]; do
|
|
107
107
|
case $line in
|
|
108
108
|
*=*)
|
|
109
109
|
case ${line%%=*} in
|
|
110
|
-
SP_NATS_URL | SP_NATS_CREDS | SCRATCHPAD_DIR | SCRATCHPAD_VOLUME | SP_CREATOR | \
|
|
110
|
+
SP_NATS_URL | SP_NATS_CREDS | SCRATCHPAD_DIR | SCRATCHPAD_VOLUME | SCRATCHPAD_BOOTSTRAP_FILE | SP_CREATOR | \
|
|
111
111
|
SP_THREAD_ID | SP_ROOT_ID | SP_CALLER_ACCOUNT | SP_CALLER_USER | SP_GRANTS_FILE)
|
|
112
112
|
# The name is one of these; the value is assigned as it is.
|
|
113
113
|
eval "${line%%=*}=\${line#*=}"
|
|
@@ -150,8 +150,14 @@ fi
|
|
|
150
150
|
|
|
151
151
|
case $command in
|
|
152
152
|
init)
|
|
153
|
-
[ -n "${
|
|
154
|
-
|
|
153
|
+
if [ -n "${SCRATCHPAD_BOOTSTRAP_FILE:-}" ]; then
|
|
154
|
+
set -- --bootstrap-file "$SCRATCHPAD_BOOTSTRAP_FILE" "$@"
|
|
155
|
+
else
|
|
156
|
+
[ -n "${SCRATCHPAD_VOLUME:-}" ] || refuse "ScratchPad has no volume or bootstrap file for this agent"
|
|
157
|
+
fi
|
|
158
|
+
if [ -n "${SCRATCHPAD_VOLUME:-}" ]; then
|
|
159
|
+
set -- --volume "$SCRATCHPAD_VOLUME" "$@"
|
|
160
|
+
fi
|
|
155
161
|
;;
|
|
156
162
|
publish-file)
|
|
157
163
|
if [ -n "${SP_CREATOR:-}" ]; then
|