@younndai/lyt-skills 0.12.1 → 0.13.1
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/CONTRIBUTING.md +61 -0
- package/NOTICE +2 -2
- package/README.md +2 -2
- package/SECURITY.md +45 -0
- package/dist/commands/skills-install.d.ts.map +1 -1
- package/dist/commands/skills-install.js +39 -2
- package/dist/commands/skills-install.js.map +1 -1
- package/dist/commands/skills-list.js +15 -0
- package/dist/commands/skills.js +15 -0
- package/dist/index.js +15 -0
- package/dist/list.js +15 -0
- package/dist/symlink.js +15 -0
- package/package.json +6 -4
- package/skills/lyt-sync/SKILL.md +19 -103
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Contributing to Lyt (Link Your Think™)
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing to Lyt, a YounndAI™ product by
|
|
4
|
+
MARLINK TRADING SRL.
|
|
5
|
+
|
|
6
|
+
> Lyt is in public **alpha**. The surface is moving quickly; please open an
|
|
7
|
+
> issue or a discussion before starting non-trivial work so we can confirm
|
|
8
|
+
> direction and avoid duplicated effort.
|
|
9
|
+
|
|
10
|
+
## Contributor License Agreement (REQUIRED)
|
|
11
|
+
|
|
12
|
+
Before we can accept your contribution, we need you to sign a Contributor
|
|
13
|
+
License Agreement (CLA). The CLA is a one-time legal document that confirms:
|
|
14
|
+
|
|
15
|
+
- You have the right to grant us the license terms specified in the CLA
|
|
16
|
+
- You grant us a broad, perpetual license to use, modify, and re-license your contribution
|
|
17
|
+
- You receive no special contributor rights: no royalties, governance, trademark rights, private license-back, approval rights, or claims against future relicensing or posture changes
|
|
18
|
+
- Your contribution is provided "as is" without warranty
|
|
19
|
+
|
|
20
|
+
### Which CLA do I sign?
|
|
21
|
+
|
|
22
|
+
- **[Individual CLA](https://github.com/YounndAI/lyt/blob/main/CLA.md)** — if you are
|
|
23
|
+
contributing on your own behalf, on your own time, and your employer has no
|
|
24
|
+
claim to your intellectual-property output.
|
|
25
|
+
- **[Entity CLA](https://github.com/YounndAI/lyt/blob/main/CLA-entity.md)** — if you are
|
|
26
|
+
contributing as an employee or contractor on behalf of an employer or
|
|
27
|
+
organization. The Entity CLA covers all contributors your organization
|
|
28
|
+
authorizes (listed in its Schedule A).
|
|
29
|
+
|
|
30
|
+
If you are unsure, sign **both**.
|
|
31
|
+
|
|
32
|
+
### How to sign
|
|
33
|
+
|
|
34
|
+
When you open your first pull request, our [CLA bot](https://cla-assistant.io)
|
|
35
|
+
will comment with a link to sign. You can sign electronically via GitHub OAuth
|
|
36
|
+
— no paperwork required. Once signed, your future contributions are
|
|
37
|
+
automatically covered. **Pull requests cannot be merged until the CLA bot
|
|
38
|
+
confirms a signed CLA is on file for all contributors.**
|
|
39
|
+
|
|
40
|
+
## Code contribution checklist
|
|
41
|
+
|
|
42
|
+
- [ ] Signed the appropriate CLA (see above)
|
|
43
|
+
- [ ] Apache-2.0 copyright header included in any new source files (see existing files for the exact block)
|
|
44
|
+
- [ ] Code follows existing project conventions (TypeScript strict mode, libSQL-only data layer, cross-platform paths)
|
|
45
|
+
- [ ] Focused tests added for new functionality; `npm run build`, `npm run typecheck`, and `npm test` green
|
|
46
|
+
- [ ] Documentation updated for user-facing changes
|
|
47
|
+
- [ ] Trademark indicators (™) on first prominent use of any YounndAI or Lyt mark in new documentation
|
|
48
|
+
- [ ] CHANGELOG.md updated where the change is user-facing
|
|
49
|
+
|
|
50
|
+
## Code of conduct
|
|
51
|
+
|
|
52
|
+
We follow the [Contributor Covenant Code of Conduct](https://github.com/YounndAI/lyt/blob/main/CODE_OF_CONDUCT.md).
|
|
53
|
+
By contributing, you agree to abide by its terms.
|
|
54
|
+
|
|
55
|
+
## Questions?
|
|
56
|
+
|
|
57
|
+
- General questions: [GitHub Discussions](https://github.com/YounndAI/lyt/discussions)
|
|
58
|
+
- Legal questions: office@younndai.com
|
|
59
|
+
- Security questions: see [SECURITY.md](SECURITY.md)
|
|
60
|
+
|
|
61
|
+
Thank you for contributing!
|
package/NOTICE
CHANGED
|
@@ -12,12 +12,12 @@ Licensed under the Apache License, Version 2.0. See LICENSE.
|
|
|
12
12
|
Trademark notice
|
|
13
13
|
----------------------------------------------------------------------
|
|
14
14
|
|
|
15
|
-
YounndAI™ and
|
|
15
|
+
YounndAI™ and Lyt (Link Your Think™) are trademarks of MARLINK TRADING SRL.
|
|
16
16
|
|
|
17
17
|
The Apache License, Version 2.0 does not grant permission to use the
|
|
18
18
|
trade names, trademarks, service marks, or product names of
|
|
19
19
|
MARLINK TRADING SRL, except as required for describing the origin of
|
|
20
20
|
this work and reproducing the content of this NOTICE file.
|
|
21
21
|
|
|
22
|
-
See TRADEMARK.md for the trademark usage policy.
|
|
22
|
+
See https://github.com/YounndAI/lyt/blob/main/TRADEMARK.md for the trademark usage policy.
|
|
23
23
|
For trademark usage permissions, contact: office@younndai.com
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<p align="center">
|
|
10
10
|
<strong>@younndai/lyt-skills</strong><br />
|
|
11
11
|
Agent-harness skills — let Claude Code, Codex, and any agent runtime drive your markdown vaults as first-class operators.<br />
|
|
12
|
-
<em>Part of the Lyt™ toolchain — federated markdown vaults you own, made legible to AI.</em>
|
|
12
|
+
<em>Part of the Lyt (Link Your Think™) toolchain — federated markdown vaults you own, made legible to AI.</em>
|
|
13
13
|
</p>
|
|
14
14
|
|
|
15
15
|
<p align="center">
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
## What is this?
|
|
26
26
|
|
|
27
|
-
`@younndai/lyt-skills` is where [Lyt
|
|
27
|
+
`@younndai/lyt-skills` is where [Lyt](https://github.com/YounndAI/lyt)'s **AI-first** design becomes tangible: eleven harness skills that let AI agents — Claude Code, Codex, and generic agent runtimes — drive your markdown vaults as **first-class operators**. Install once and your agent can capture notes, search your pod, prime on context, adopt a vault, explore meshes, and sync vaults — through the same governed operation set you use, under the same permission semantics. This is the "install once, every agent runtime knows Lyt" layer.
|
|
28
28
|
|
|
29
29
|
The `/lyt-capture` skill wraps the `knowledge-capture` pattern verb from the `lyt pattern run` runtime, so structured note capture shows up as a first-class agent skill inside any vault; the read/orient + addressing + lifecycle skills (`/lyt-pod`, `/lyt-search`, `/lyt-recall`, `/lyt-primer-context`, `/lyt-mesh-explore`, `/lyt-sync`, `/lyt-alias`, `/lyt-adopt`, `/lyt-update`) wrap the corresponding CLI verbs directly. Pairs with [`@younndai/lyt-vault`](https://www.npmjs.com/package/@younndai/lyt-vault), which ships the bundled `knowledge-capture` pattern the capture/recall skills resolve against (workflow patterns are bring-your-own via `lyt pattern install`).
|
|
30
30
|
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Reporting a vulnerability
|
|
4
|
+
|
|
5
|
+
If you discover a security vulnerability in Lyt, please report it
|
|
6
|
+
responsibly:
|
|
7
|
+
|
|
8
|
+
1. **DO NOT** file a public GitHub issue.
|
|
9
|
+
2. Email **office@younndai.com** with:
|
|
10
|
+
- A description of the vulnerability and its potential impact
|
|
11
|
+
- Steps to reproduce, or a proof of concept (if safe to share)
|
|
12
|
+
- Affected versions
|
|
13
|
+
- Suggested severity: **Critical**, **High**, or **Moderate**
|
|
14
|
+
|
|
15
|
+
Responsible disclosure preserves the safety of every downstream user.
|
|
16
|
+
|
|
17
|
+
## Response timeline
|
|
18
|
+
|
|
19
|
+
| Action | SLA |
|
|
20
|
+
| ----------------------- | ---------------- |
|
|
21
|
+
| Acknowledgement | 72 hours |
|
|
22
|
+
| Initial assessment | 7 calendar days |
|
|
23
|
+
| Remediation or advisory | 30 calendar days |
|
|
24
|
+
|
|
25
|
+
Critical issues are prioritized and may be patched ahead of the stated window
|
|
26
|
+
where feasible.
|
|
27
|
+
|
|
28
|
+
## Supported versions
|
|
29
|
+
|
|
30
|
+
Lyt is in public **alpha**. Security fixes are applied to the latest published
|
|
31
|
+
`alpha` release only. Pin to a released version and update promptly when a new
|
|
32
|
+
alpha ships.
|
|
33
|
+
|
|
34
|
+
## Responsible disclosure
|
|
35
|
+
|
|
36
|
+
We commit to:
|
|
37
|
+
|
|
38
|
+
- Acknowledging your report within the timeline above
|
|
39
|
+
- Working with you to verify and reproduce the vulnerability
|
|
40
|
+
- Coordinating a public disclosure date that gives users time to update
|
|
41
|
+
- Crediting you in the security advisory (unless you prefer anonymity)
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
© 2026 MARLINK TRADING SRL (YounndAI).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skills-install.d.ts","sourceRoot":"","sources":["../../src/commands/skills-install.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"skills-install.d.ts","sourceRoot":"","sources":["../../src/commands/skills-install.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAkB5C,wBAAgB,4BAA4B,IAAI,OAAO,CA2CtD"}
|
|
@@ -1,9 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 MARLINK TRADING SRL (YounndAI)
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
1
16
|
import { Command, Option } from "commander";
|
|
2
|
-
import { symlinkSkillsTriRuntime, ALL_RUNTIMES } from "../symlink.js";
|
|
17
|
+
import { symlinkSkillsTriRuntime, ALL_RUNTIMES, getBundledSkillsDir, listBundledSkills, } from "../symlink.js";
|
|
3
18
|
export function buildSkillsInstallSubcommand() {
|
|
4
19
|
const cmd = new Command("install");
|
|
5
20
|
cmd
|
|
6
21
|
.description("Symlink bundled Lyt skills into Claude Code / Codex / .agents runtimes")
|
|
22
|
+
.argument("[names...]", "Install only the named bundled skills")
|
|
7
23
|
.addOption(new Option("--runtime <name>", "Target runtime")
|
|
8
24
|
.choices(["claude", "codex", "agents", "all"])
|
|
9
25
|
.default("all"))
|
|
@@ -11,11 +27,21 @@ export function buildSkillsInstallSubcommand() {
|
|
|
11
27
|
.option("-f, --force", "Overwrite divergent symlinks or copied directories", false)
|
|
12
28
|
.option("--source <dir>", "Override bundled skills source directory (test seam)")
|
|
13
29
|
.option("--json", "Emit deterministic JSON shape", false)
|
|
14
|
-
.action((opts) => {
|
|
30
|
+
.action((names, opts) => {
|
|
15
31
|
const runtimes = resolveRuntimes(opts.runtime ?? "all");
|
|
32
|
+
const sourceDir = opts.source ?? getBundledSkillsDir();
|
|
33
|
+
const validNames = [...listBundledSkills(sourceDir)].sort();
|
|
34
|
+
const validNameSet = new Set(validNames);
|
|
35
|
+
const unknownNames = [...new Set(names.filter((name) => !validNameSet.has(name)))].sort();
|
|
36
|
+
if (unknownNames.length > 0) {
|
|
37
|
+
printUnknownSkills(unknownNames, validNames, opts.json ?? false);
|
|
38
|
+
process.exitCode = 1;
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
16
41
|
const result = symlinkSkillsTriRuntime({
|
|
17
42
|
sourceDir: opts.source,
|
|
18
43
|
runtimes,
|
|
44
|
+
skillNames: names.length > 0 ? names : undefined,
|
|
19
45
|
copy: opts.copy ?? false,
|
|
20
46
|
force: opts.force ?? false,
|
|
21
47
|
});
|
|
@@ -31,6 +57,17 @@ export function buildSkillsInstallSubcommand() {
|
|
|
31
57
|
});
|
|
32
58
|
return cmd;
|
|
33
59
|
}
|
|
60
|
+
function printUnknownSkills(unknownNames, validNames, json) {
|
|
61
|
+
if (json) {
|
|
62
|
+
process.stdout.write(JSON.stringify({
|
|
63
|
+
error: "unknown-skill",
|
|
64
|
+
unknownSkills: unknownNames,
|
|
65
|
+
validSkills: validNames,
|
|
66
|
+
}, null, 2) + "\n");
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
console.error(`Unknown Lyt skill name(s): ${unknownNames.join(", ")}\nValid skill names: ${validNames.join(", ")}`);
|
|
70
|
+
}
|
|
34
71
|
function resolveRuntimes(name) {
|
|
35
72
|
if (name === "all")
|
|
36
73
|
return ALL_RUNTIMES;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skills-install.js","sourceRoot":"","sources":["../../src/commands/skills-install.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAE5C,OAAO,
|
|
1
|
+
{"version":3,"file":"skills-install.js","sourceRoot":"","sources":["../../src/commands/skills-install.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAE5C,OAAO,EACL,uBAAuB,EACvB,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,GAElB,MAAM,eAAe,CAAC;AAUvB,MAAM,UAAU,4BAA4B;IAC1C,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,SAAS,CAAC,CAAC;IACnC,GAAG;SACA,WAAW,CAAC,wEAAwE,CAAC;SACrF,QAAQ,CAAC,YAAY,EAAE,uCAAuC,CAAC;SAC/D,SAAS,CACR,IAAI,MAAM,CAAC,kBAAkB,EAAE,gBAAgB,CAAC;SAC7C,OAAO,CAAC,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;SAC7C,OAAO,CAAC,KAAK,CAAC,CAClB;SACA,MAAM,CAAC,QAAQ,EAAE,iDA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CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;QAE/C,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,MAAM,GAAG,GAAG,EAAE,CAAC,CAAC;IAC9D,CAAC;IAID,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,mBAAmB,CAAC,CAAC;IAClF,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAE1B,OAAO,CAAC,IAAI,CACV,OAAO,UAAU,CAAC,MAAM,0FAA0F,CACnH,CAAC;QACF,KAAK,MAAM,CAAC,IAAI,UAAU,EAAE,CAAC;YAE3B,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,OAAO,IAAI,EAAE,EAAE,CAAC,CAAC;QAChE,CAAC;IACH,CAAC;AACH,CAAC;AAED,SAAS,YAAY,CAAC,MAAkD;IACtE,IAAI,IAAI,GAAG,CAAC,CAAC;IACb,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;QAC/B,IAAI,CAAC,CAAC,MAAM,KAAK,wBAAwB;YAAE,OAAO,CAAC,CAAC;QAKpD,IAAI,CAAC,CAAC,MAAM,KAAK,mBAAmB;YAAE,IAAI,GAAG,CAAC,CAAC;IACjD,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 MARLINK TRADING SRL (YounndAI)
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
1
16
|
import { Command, Option } from "commander";
|
|
2
17
|
import { listSkillsTriRuntime } from "../list.js";
|
|
3
18
|
import { ALL_RUNTIMES } from "../symlink.js";
|
package/dist/commands/skills.js
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 MARLINK TRADING SRL (YounndAI)
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
1
16
|
import { Command } from "commander";
|
|
2
17
|
import { buildSkillsInstallSubcommand } from "./skills-install.js";
|
|
3
18
|
import { buildSkillsListSubcommand } from "./skills-list.js";
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 MARLINK TRADING SRL (YounndAI)
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
1
16
|
export { symlinkSkillsTriRuntime, getRuntimeTargetDir, getBundledSkillsDir, listBundledSkills, ALL_RUNTIMES, } from "./symlink.js";
|
|
2
17
|
export { listSkillsTriRuntime } from "./list.js";
|
|
3
18
|
export { buildSkillsCommand } from "./commands/skills.js";
|
package/dist/list.js
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 MARLINK TRADING SRL (YounndAI)
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
1
16
|
import { existsSync, lstatSync, readFileSync, readlinkSync, statSync } from "node:fs";
|
|
2
17
|
import { join, resolve } from "node:path";
|
|
3
18
|
import { ALL_RUNTIMES, getBundledSkillsDir, getRuntimeTargetDir, listBundledSkills, } from "./symlink.js";
|
package/dist/symlink.js
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 MARLINK TRADING SRL (YounndAI)
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
1
16
|
import { cpSync, existsSync, lstatSync, mkdirSync, readdirSync, readFileSync, readlinkSync, renameSync, rmSync, statSync, symlinkSync, } from "node:fs";
|
|
2
17
|
import { homedir, platform } from "node:os";
|
|
3
18
|
import { basename, dirname, join, resolve } from "node:path";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@younndai/lyt-skills",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"description": "Lyt harness skills — 11 skills (/lyt-capture, /lyt-recall, /lyt-pattern, /lyt-pod, /lyt-mesh-explore, /lyt-primer-context, /lyt-search, /lyt-sync, /lyt-alias, /lyt-adopt, /lyt-update) symlinked tri-runtime into ~/.claude/skills/, ~/.codex/skills/, ~/.agents/skills/. Composed into the `lyt skills install` and `lyt skills list` meta-CLI verbs.",
|
|
5
5
|
"homepage": "https://linkyourthink.com",
|
|
6
6
|
"repository": {
|
|
@@ -37,10 +37,12 @@
|
|
|
37
37
|
"skills",
|
|
38
38
|
"README.md",
|
|
39
39
|
"LICENSE",
|
|
40
|
-
"NOTICE"
|
|
40
|
+
"NOTICE",
|
|
41
|
+
"CONTRIBUTING.md",
|
|
42
|
+
"SECURITY.md"
|
|
41
43
|
],
|
|
42
44
|
"scripts": {
|
|
43
|
-
"build": "tsc",
|
|
45
|
+
"build": "tsc && node ../../scripts/public-release/stamp-dist-license-headers.mjs",
|
|
44
46
|
"typecheck": "tsc --noEmit && tsc --project tsconfig.reparse-helper.json --noEmit",
|
|
45
47
|
"test": "vitest run",
|
|
46
48
|
"test:watch": "vitest",
|
|
@@ -49,7 +51,7 @@
|
|
|
49
51
|
"prepublishOnly": "node ../../scripts/check-no-vendored-deps.mjs --root ../.. && node ../../scripts/public-release/scan-tarball.mjs lyt-skills"
|
|
50
52
|
},
|
|
51
53
|
"dependencies": {
|
|
52
|
-
"@younndai/lyt-vault": "^0.
|
|
54
|
+
"@younndai/lyt-vault": "^0.13.1",
|
|
53
55
|
"commander": "^12.1.0"
|
|
54
56
|
},
|
|
55
57
|
"devDependencies": {
|
package/skills/lyt-sync/SKILL.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: lyt-sync
|
|
3
3
|
description: >
|
|
4
|
-
Sync
|
|
4
|
+
Sync one exact registered Lyt vault through `lyt sync --vault <qualified-vault> --json`. Lyt owns local reconciliation, first private publication through a trusted mesh target, remote validation, and truthful outcomes. Trigger when the user runs /lyt-sync, or asks to sync, pull, push, or publish one vault. Genuine local/no-target, read-only, subscriber, and offline vaults remain non-publishing. Pairs with /lyt-capture.
|
|
5
5
|
visibility: public
|
|
6
6
|
lyt-version: 0.4.0
|
|
7
7
|
capabilities: [read, write]
|
|
@@ -11,7 +11,7 @@ requires_writable_vault: false
|
|
|
11
11
|
|
|
12
12
|
# /lyt-sync
|
|
13
13
|
|
|
14
|
-
Sync
|
|
14
|
+
Sync one exact vault through `lyt sync --vault <qualified-vault> --json`. Lyt owns repository creation, remote attachment, commits, pulls, pushes, validation, and truthful terminal status; never reproduce those boundaries with manual `gh` or raw Git commands.
|
|
15
15
|
|
|
16
16
|
## When to invoke
|
|
17
17
|
|
|
@@ -26,120 +26,36 @@ When the user runs `/lyt-sync`, or says something like:
|
|
|
26
26
|
|
|
27
27
|
If the user says "save and sync" or "/lyt-capture then sync", run /lyt-capture first, then /lyt-sync on the destination vault.
|
|
28
28
|
|
|
29
|
-
**Pod-wide sync
|
|
29
|
+
**Pod-wide sync is explicit.** Only "sync everything" uses bare `lyt sync`, which processes all registered active vaults and runs the federation publication pass. `lyt sync --watch` is the foreground watcher; `lyt sync --check` is read-only. There is no `lyt sync --mesh` flag.
|
|
30
30
|
|
|
31
|
-
## Phase 1 — Resolve
|
|
31
|
+
## Phase 1 — Resolve one exact vault
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
1. Use the Handler's explicit qualified `{mesh}/{vault}` address when supplied.
|
|
34
|
+
2. Otherwise resolve `$LYT_ACTIVE_VAULT`, then `lyt vault info --by-path <cwd> --json` when cwd is inside a registered vault.
|
|
35
|
+
3. If neither resolves exactly, ask. Never guess a path or bare name. Use the canonical qualified name returned by `lyt vault info ... --json`.
|
|
34
36
|
|
|
35
|
-
|
|
36
|
-
2. **`$LYT_ACTIVE_VAULT` environment variable** — if set, use it.
|
|
37
|
-
3. **`~/lyt/vaults/<handle>/main/`** — the default convention per the unified `{handle}/{repo}` naming (Windows: `%USERPROFILE%\lyt\vaults\<handle>\main`). Resolve `<handle>` from the pod identity (`identity.yon` / `pod.yon`); never hardcode it.
|
|
37
|
+
## Phase 2 — Apply the publication gate
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
Read `lyt vault info <qualified-vault> --json`. Local writes may proceed when `vault.localWritable` is true. Before an outward action, read `vault.publishable`; on `"unknown"`, run `lyt vault refresh <qualified-vault>` and re-read it. If it remains unknown, pause and ask. Lyt performs the final trusted-target, ownership, read-only, and origin checks.
|
|
40
40
|
|
|
41
|
-
If the
|
|
41
|
+
If the Handler did not already request an outward sync, ask before continuing. Use `--no-publish` when the Handler wants local reconciliation only.
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
**Path-shape safety check.** Before invoking `git -C <vault-path>`, reject any resolved path that begins with `-` or `--` (defensive against a crafted `--vault` argument, `$LYT_ACTIVE_VAULT` env value, or any other resolver-input that could smuggle a flag-shaped token into the git positional). The `.lyt/vault.yon` existence check above already filters most invalid paths; this `--`-leading rejection closes the remaining flag-injection surface (the gh-flag-injection defense family). Resolved paths MUST be absolute and MUST start with a drive letter (Windows) or `/` (POSIX) before they enter any `git` argv.
|
|
46
|
-
|
|
47
|
-
## Phase 2 — Pull with rebase
|
|
48
|
-
|
|
49
|
-
Shell out to git directly with the vault path as `cwd`:
|
|
50
|
-
|
|
51
|
-
```
|
|
52
|
-
git -C <vault-path> pull --rebase
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
(On Windows, `git -C <path>` works with quoted paths, but the lyt-vault precedent — `flows/clone.ts`, `flows/repair.ts`, `util/git-history.ts` — uses `spawnSync` with `cwd: <vault-path>` so the path doesn't need to be embedded in argv. Skill prose recommends the `cwd` shape for cross-platform stability.)
|
|
56
|
-
|
|
57
|
-
**On rebase conflict** (`git pull --rebase` exits non-zero with conflict markers): do NOT attempt auto-resolution. Surface a structured result to the handler and halt:
|
|
58
|
-
|
|
59
|
-
```json
|
|
60
|
-
{
|
|
61
|
-
"status": "conflict",
|
|
62
|
-
"vault": "<vault-name>",
|
|
63
|
-
"conflicted_files": ["<path1>", "<path2>"],
|
|
64
|
-
"message": "git pull --rebase failed; resolve the listed conflicts manually, then re-invoke /lyt-sync."
|
|
65
|
-
}
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
The handler-facing prose to surface: _"Sync halted on rebase conflict in `<vault-name>`. Resolve the conflicts in `<files>`, then run `/lyt-sync` again."_
|
|
69
|
-
|
|
70
|
-
## Phase 3 — Detect + commit local changes
|
|
71
|
-
|
|
72
|
-
Run `git -C <vault-path> status --porcelain`. If the output is empty, skip to Phase 4 with a "no local changes" note for the handler. Otherwise:
|
|
73
|
-
|
|
74
|
-
1. Parse the porcelain output into a `GitDiffSummary`-shaped object (`{staged: string[], modified: string[]}`). Porcelain v1 (the default) emits one line per change with a 2-character prefix: column 1 is the index/staged status, column 2 is the working-tree status. Treat any line whose column-1 char is not space or `?` as **staged** (e.g. `A `, `M `, `MM`, `D `); treat any line whose column-2 char is not space (or whose prefix is `??`) as **modified**. Strip the 3-character prefix to recover the file path. Files that appear staged AND modified land in both arrays — that's tolerated; the helper sorts and de-orders naturally and the resulting message just lists the file once or twice depending on its multi-state shape.
|
|
75
|
-
2. Decide on a commit message. The skill exposes one **caller-options**-style choice:
|
|
76
|
-
|
|
77
|
-
- `options.commit-message: "auto"` _(default)_ — call the `inferCommitMessage(diff)` heuristic to summarise the diff:
|
|
78
|
-
- 0 files → `"no changes"` _(defensive; unreached because porcelain was non-empty)_
|
|
79
|
-
- 1 file (non-mesh.yon) → `"sync: <filename>"`
|
|
80
|
-
- 1 file (mesh.yon, at any depth) → `"sync: mesh.yon update"`
|
|
81
|
-
- 2-4 files → `"sync: N files (<comma list>)"`
|
|
82
|
-
- > 4 files → `"sync: N files (<first 3>, +M more)"`
|
|
83
|
-
- `options.commit-message: "prompt-handler"` — pause and ask the handler for a one-line message; do not invent one.
|
|
84
|
-
|
|
85
|
-
The heuristic is `inferCommitMessage`; the skill prose reproduces the rules above so an agent can run them inline without importing.
|
|
86
|
-
|
|
87
|
-
3. Stage and commit. **Pass the message via argv, NOT through shell interpolation.** The shell-syntax pseudocode below is for documentation only; agents executing this skill MUST translate it to an argv-safe `spawnSync` / `execFileSync` call so a filename containing shell metacharacters (backticks, `$()`, `;`, `"`) inside the inferred message can't escape into command execution. Concretely:
|
|
43
|
+
## Phase 3 — Invoke Lyt once
|
|
88
44
|
|
|
89
45
|
```
|
|
90
|
-
|
|
91
|
-
git -C <vault-path> add -A
|
|
92
|
-
git -C <vault-path> commit -m "<message>"
|
|
93
|
-
|
|
94
|
-
# Actual exec shape (argv array; cross-platform-safe):
|
|
95
|
-
spawnSync("git", ["-C", vaultPath, "add", "-A"]);
|
|
96
|
-
spawnSync("git", ["-C", vaultPath, "commit", "-m", message]);
|
|
46
|
+
lyt sync --vault <qualified-vault> --json
|
|
97
47
|
```
|
|
98
48
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
Do **not** add a `Co-Authored-By` trailer (per the project's `CLAUDE.md` commit conventions). Do **not** add an `@STAMP` block — that is a `.yon`-write concern handled by lyt-runner, not the sync skill.
|
|
102
|
-
|
|
103
|
-
## Phase 4 — Push (gated on the 6-reason writable verdict)
|
|
49
|
+
Never replace this with raw `git` or `gh`. For an owned vault whose home mesh has a trusted target, Lyt may create the exact missing **private** repository, connect it, establish the first upstream, and publish only this vault. A genuine local/no-target vault remains local; subscriber/read-only vaults never publish.
|
|
104
50
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
The actual reason strings emitted by `vault info --json` are listed in the **emitted name** column. The **semantic name** column gives the human-readable synonym; the SKILL.md surface uses the semantic name in handler-facing prose, but the comparison MUST be against the emitted name.
|
|
108
|
-
|
|
109
|
-
| Emitted name (writableDetermination) | Semantic name | writable | Phase 4 behavior |
|
|
110
|
-
| ------------------------------------ | --------------------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
111
|
-
| `gh-viewerCanPush-true` | **home-pushable-true** | `true` | Push: `git -C <vault-path> push`. Report: _"Synced and pushed N commits to origin."_ |
|
|
112
|
-
| `gh-viewerCanPush-false` | **home-not-pushable-false** | `false` | Skip push. Report: _"Skipped push: you don't have push permission on `<vault.gitUrl>`. Request write access from the owner, or capture into a vault you own."_ |
|
|
113
|
-
| `subscriber-default-false` | (subscriber) | `false` | Skip push. Report: _"Skipped push: this is a subscriber vault. Subscriber vaults pull but don't push. Capture into your home vault instead."_ |
|
|
114
|
-
| `gh-unavailable` | (gh-offline) | `"unknown"` | Skip push. Report: _"Skipped push: gh CLI is unavailable (offline / rate-limited / not authenticated). Re-try when network is available."_ |
|
|
115
|
-
| `no-remote` | (no-remote) | `"unknown"` | Skip push. Report: _"Skipped push: vault has no git remote configured. Configure a remote with `gh repo create` or `git remote add origin <url>`."_ |
|
|
116
|
-
| `orphan-vault` | (orphan) | `"unknown"` | Skip push. Report: _"Skipped push: vault has no mesh role (orphan). Re-attach it with `lyt repair --target <vault> --apply --mesh <mesh>` (the single-orphan-vault verb; `lyt mesh adopt --cluster` is for orphan-MESH clusters, not one vault)."_ |
|
|
117
|
-
|
|
118
|
-
**Note on emitted vs semantic names.** The semantic names `home-pushable-true` and `home-not-pushable-false` are documentation aliases for the actual emitted strings `gh-viewerCanPush-true` and `gh-viewerCanPush-false`, kept so future renames of the underlying enum don't silently break the skill prose. The 4 other reason strings (`subscriber-default-false`, `gh-unavailable`, `no-remote`, `orphan-vault`) are identical in both surfaces.
|
|
119
|
-
|
|
120
|
-
Final handler-facing result shape:
|
|
121
|
-
|
|
122
|
-
```json
|
|
123
|
-
{
|
|
124
|
-
"status": "ok",
|
|
125
|
-
"vault": "<vault-name>",
|
|
126
|
-
"pulled": true,
|
|
127
|
-
"committed_message": "<message>" | null,
|
|
128
|
-
"pushed": true | false,
|
|
129
|
-
"skipped_push_reason": "<one of the 6 writableDetermination values>" | null,
|
|
130
|
-
"handler_message": "<reason-specific prose from the table above>"
|
|
131
|
-
}
|
|
132
|
-
```
|
|
51
|
+
## Phase 4 — Surface the result
|
|
133
52
|
|
|
134
|
-
|
|
53
|
+
- `published`, `already-online`: success.
|
|
54
|
+
- `local-only-no-push-target`, `skipped-readonly`, `publish-held`: no online action.
|
|
55
|
+
- `publish-deferred`, `origin-mismatch`, `sync-incomplete`: failure; preserve the non-zero exit status and surface the message.
|
|
56
|
+
- Conflicts: halt and ask the Handler to resolve them; never auto-resolve.
|
|
135
57
|
|
|
136
|
-
|
|
137
|
-
- **MUST gate push on `vault.writable` / `vault.writableDetermination`.** Never `git push` unless `writableDetermination === "gh-viewerCanPush-true"` (equivalently, `writable === true`). The other 5 reasons all skip push.
|
|
138
|
-
- **MUST branch on all 6 reasons.** Each has a distinct handler-facing message; collapsing them into a generic "can't push" message loses semantic signal the handler needs to recover.
|
|
139
|
-
- **MUST NOT add a `Co-Authored-By` trailer** to the auto-commit. Per the project's `CLAUDE.md` commit conventions, unless the user explicitly requests one.
|
|
140
|
-
- **MUST NOT touch any vault other than the resolved target.** This skill's per-vault flow is single-vault. A pod-wide multi-vault sweep is the `lyt sync` verb (no vault argument — see "Pod-wide sync" above) or `mesh clone-all`, not this skill's per-vault path. There is no `lyt sync --mesh` flag.
|
|
141
|
-
- **MUST NOT modify `.lyt/vault.yon`, `.lyt/mesh.yon`, ledger YONs, or `@STAMP` blocks.** Those are runner / writer concerns; sync only commits handler-authored content as-is.
|
|
142
|
-
- **MUST NOT silently degrade `writable === "unknown"` to push.** Surface the reason to the handler.
|
|
58
|
+
Rules: touch only the resolved vault; preserve the structured outcome; never infer success from quiet output; never work around Lyt's refusal to delete, forget, or abandon a mesh main vault. Vaults are editor-neutral by default; Obsidian is an explicit `lyt vault init --template obsidian-default` opt-in.
|
|
143
59
|
|
|
144
60
|
## Companion skills
|
|
145
61
|
|