@openparachute/vault 0.5.1-rc.1 → 0.5.1-rc.2
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/core/src/core.test.ts
CHANGED
|
@@ -5609,6 +5609,13 @@ describe("vault projection (vault#271)", async () => {
|
|
|
5609
5609
|
expect(md).toContain("#person");
|
|
5610
5610
|
expect(md).toContain("vault-info");
|
|
5611
5611
|
expect(md).toContain("list-tags { include_schema: true }");
|
|
5612
|
+
// Scripting pointer (closes the "points nowhere" gap): the brief routes an
|
|
5613
|
+
// agent to the HTTP API + the public guide, with the vault name baked into
|
|
5614
|
+
// the copy-paste mint command.
|
|
5615
|
+
expect(md).toContain("## Scripting & automation (beyond this session)");
|
|
5616
|
+
expect(md).toContain("https://parachute.computer/scripting/");
|
|
5617
|
+
expect(md).toContain("parachute auth mint-token --scope vault:test:read --ephemeral");
|
|
5618
|
+
expect(md).toContain("vault/test/api");
|
|
5612
5619
|
});
|
|
5613
5620
|
|
|
5614
5621
|
it("markdown brief degrades gracefully when no schemas declared", async () => {
|
|
@@ -305,5 +305,25 @@ export function projectionToMarkdown(args: {
|
|
|
305
305
|
lines.push("");
|
|
306
306
|
lines.push("If schema or tags change during this session, call `vault-info` to refresh the full projection. Call `list-tags { include_schema: true }` for tag-only details.");
|
|
307
307
|
|
|
308
|
+
// Scripting pointer block: the connect-time brief used to dead-end on
|
|
309
|
+
// querying — an agent had no path to "how do I script/automate against this
|
|
310
|
+
// vault." Point at the guide rather than inlining it, to keep this brief
|
|
311
|
+
// lean (token-budget note above). Uses the concrete vault name so the mint
|
|
312
|
+
// command is copy-paste ready.
|
|
313
|
+
lines.push("");
|
|
314
|
+
lines.push("## Scripting & automation (beyond this session)");
|
|
315
|
+
lines.push("");
|
|
316
|
+
lines.push(
|
|
317
|
+
"This vault is also a plain HTTP API — reach for it when the user wants a script, cron job, or CI step rather than an interactive session:",
|
|
318
|
+
);
|
|
319
|
+
lines.push(
|
|
320
|
+
`- Mint a scoped credential: \`parachute auth mint-token --scope vault:${vaultName}:read --ephemeral\` (\`--ephemeral\` = short-lived, ideal for scripts; use \`:write\` to create/edit).`,
|
|
321
|
+
);
|
|
322
|
+
lines.push(`- Call the REST API at \`<hub-origin>/vault/${vaultName}/api/...\`.`);
|
|
323
|
+
lines.push(
|
|
324
|
+
"- Full guide — copy-paste bash/Python/JS examples, plus how to design tags vs paths vs schemas: https://parachute.computer/scripting/",
|
|
325
|
+
);
|
|
326
|
+
lines.push("- For a prompt on a schedule with no code, see Parachute Runner.");
|
|
327
|
+
|
|
308
328
|
return lines.join("\n");
|
|
309
329
|
}
|