@a5c-ai/babysitter-antigravity-cli 5.1.1-staging.00ceebd28cf2

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.
@@ -0,0 +1,41 @@
1
+ #!/usr/bin/env node
2
+ import { spawnSync } from 'node:child_process';
3
+ import { readFileSync } from 'node:fs';
4
+
5
+ function run(command, args, options = {}) {
6
+ const result = spawnSync(command, args, { stdio: options.stdio || 'inherit', encoding: options.encoding });
7
+ if (result.status !== 0 && !options.allowFailure) process.exit(result.status || 1);
8
+ return result;
9
+ }
10
+
11
+ function npmView(packageSpec) {
12
+ return run('npm', ['view', packageSpec, 'version'], { allowFailure: true, stdio: 'pipe', encoding: 'utf8' }).status === 0;
13
+ }
14
+
15
+ const pkg = JSON.parse(readFileSync('package.json', 'utf8'));
16
+ const ref = process.env.GITHUB_REF_NAME || '';
17
+ const branch = ref.split('/')[1] || 'develop';
18
+ const tag = branch === 'main' ? 'latest' : branch;
19
+
20
+ if (!process.env.NODE_AUTH_TOKEN) {
21
+ console.log('NODE_AUTH_TOKEN is not configured; skipping npm publish.');
22
+ process.exit(0);
23
+ }
24
+
25
+ if (npmView(pkg.name + '@' + pkg.version)) {
26
+ console.log(pkg.name + '@' + pkg.version + ' already exists; ensuring dist-tag ' + tag + '.');
27
+ run('npm', ['dist-tag', 'add', pkg.name + '@' + pkg.version, tag], { allowFailure: true });
28
+ process.exit(0);
29
+ }
30
+
31
+ for (const field of ['dependencies', 'peerDependencies', 'optionalDependencies']) {
32
+ for (const [name, version] of Object.entries(pkg[field] || {})) {
33
+ if (!name.startsWith('@a5c-ai/') || version.startsWith('^') || version.startsWith('~') || version === '*' || version.startsWith('workspace:')) continue;
34
+ if (!npmView(name + '@' + version)) {
35
+ console.log('Required internal dependency ' + name + '@' + version + ' is not published yet; skipping npm publish.');
36
+ process.exit(0);
37
+ }
38
+ }
39
+ }
40
+
41
+ run('npm', ['publish', '--access', 'public', '--tag', tag]);
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ var path = require('path');
5
+ var shared = require('../bin/install-shared');
6
+
7
+ var workspace = process.cwd();
8
+ for (var i = 0; i < process.argv.length; i++) {
9
+ if (process.argv[i] === '--workspace' && process.argv[i + 1]) {
10
+ workspace = path.resolve(process.argv[i + 1]);
11
+ }
12
+ }
13
+
14
+ var src = process.env.PLUGIN_PACKAGE_ROOT || path.resolve(__dirname, '..');
15
+ var dest = shared.getHomePluginRoot('workspace');
16
+ console.log('[babysitter] Team install to ' + dest);
17
+
18
+ shared.copyPluginBundle(src, dest);
19
+ if (typeof shared.harnessTeamInstall === 'function') {
20
+ shared.harnessTeamInstall(src, dest, workspace);
21
+ }
22
+ shared.runPostInstall(dest);
23
+ console.log('[babysitter] Team install complete.');
@@ -0,0 +1,62 @@
1
+ ---
2
+ name: babysit
3
+ description: Execute via @babysitter. Use this skill when asked to babysit a task, do anything that is structured process-driven (even a loop) or whenever it is called explicitly. (babysit, babysitter, with a process, orchestrate, orchestrate a run, workflow, loop until, etc.)
4
+ allowed-tools: Read, Grep, Write, Task, Bash, Edit, Grep, Glob, WebFetch, WebSearch, Search, AskUserQuestion, TodoWrite, TodoRead, Skill, BashOutput, KillShell, MultiEdit, LS
5
+ version: 0.1.3
6
+ ---
7
+
8
+ # babysit
9
+
10
+ Follow the commands below exactly. but apply judgement and creativity to get the job done. no matter how small or simple the task may seem, you must use the babysitter SDK and run lifecycle to execute it. This is non-negotiable. If you are asked to do something that seems like it could be done with a simple tool call, you must still use the babysitter SDK to create a run, define tasks, execute them, and complete the run. This is how you will learn and demonstrate mastery of the babysitter system. Always follow the full process, even for trivial tasks.
11
+
12
+ Subagents that need a scratch checkout or working directory must create it under
13
+ `/tmp/<descriptive-name>/`, not under `.a5c/runs/<runId>/work`. Before returning
14
+ deliverables, validate that no run-dir worktree was left behind, for example:
15
+
16
+ ```bash
17
+ find .a5c/runs -maxdepth 3 -name work -type d -print
18
+ ```
19
+
20
+ That command should print nothing. If it prints a non-empty work directory, move
21
+ or remove only the scratch data you created before returning.
22
+
23
+ ## Dependencies
24
+
25
+ ### Babysitter SDK and CLI
26
+
27
+ Read the SDK version from `versions.json` to ensure version compatibility:
28
+
29
+ ```bash
30
+ SDK_VERSION=$(node -e "try{console.log(JSON.parse(require('fs').readFileSync('${ANTIGRAVITY_SKILL_PATH}/versions.json','utf8')).sdkVersion||'latest')}catch{console.log('latest')}")
31
+ npm i -g @a5c-ai/babysitter-sdk@$SDK_VERSION || npm i -g @a5c-ai/babysitter-sdk@latest
32
+
33
+ if command -v babysitter >/dev/null 2>&1 && babysitter --version >/dev/null 2>&1; then
34
+ CLI="babysitter"
35
+ else
36
+ CLI="npm exec --yes --package @a5c-ai/babysitter-sdk@$SDK_VERSION -- babysitter"
37
+ fi
38
+ ```
39
+
40
+ If the pinned version fails to install (e.g. not yet published), the fallback installs `latest`.
41
+
42
+ If a stale or broken global shim fails with `MODULE_NOT_FOUND`, repair it with `npm rm -g @a5c-ai/babysitter @a5c-ai/babysitter-sdk && npm i -g @a5c-ai/babysitter-sdk@$SDK_VERSION`, then re-run `babysitter --version`.
43
+
44
+ ### jq
45
+
46
+ Make sure `jq` is installed and available in the path. If not, install it.
47
+
48
+ ## Instructions
49
+
50
+ Run the following command to get full instructions:
51
+
52
+ ```bash
53
+ $CLI instructions:babysit-skill --harness antigravity-cli --interactive
54
+ ```
55
+
56
+ For non-interactive mode (running with `-p` flag or no AskUserQuestion tool):
57
+
58
+ ```bash
59
+ $CLI instructions:babysit-skill --harness antigravity-cli --no-interactive
60
+ ```
61
+
62
+ Follow the instructions returned by the command above to orchestrate the run.
package/versions.json ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ "sdkVersion": "5.1.1-staging.00ceebd28cf2",
3
+ "extensionVersion": "5.1.1-staging.00ceebd28cf2"
4
+ }