civitas 0.0.0 → 0.1.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "civitas",
3
- "version": "0.0.0",
3
+ "version": "0.1.0",
4
4
  "description": "A guild of detailed personas for agent-driven software development, commissioned into your repository as skills",
5
5
  "author": {
6
6
  "name": "unional"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "civitas",
3
- "version": "0.0.0",
3
+ "version": "0.1.0",
4
4
  "description": "A guild of detailed personas for agent-driven software development, commissioned into your repository as skills",
5
5
  "author": {
6
6
  "name": "unional"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "civitas",
3
- "version": "0.0.0",
3
+ "version": "0.1.0",
4
4
  "description": "A guild of detailed personas for agent-driven software development, commissioned into your repository as skills",
5
5
  "author": {
6
6
  "name": "unional"
package/CHANGELOG.md ADDED
@@ -0,0 +1,7 @@
1
+ # civitas
2
+
3
+ ## 0.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - d652d42: Add the `guild` skill and the civitas generator: browse and search the Guild, recommend personas, and commission, list, refit, and decommission automatons as skills.
package/package.json CHANGED
@@ -1,56 +1,55 @@
1
1
  {
2
- "name": "civitas",
3
- "version": "0.0.0",
4
- "description": "A guild of detailed personas for agent-driven software development, commissioned into your repository as skills",
5
- "keywords": [
6
- "civitas",
7
- "personas",
8
- "guild",
9
- "agent",
10
- "skills",
11
- "plugin",
12
- "claude-code",
13
- "codex",
14
- "cursor",
15
- "copilot"
16
- ],
17
- "homepage": "https://github.com/cyber-uni/civitas#readme",
18
- "repository": {
19
- "type": "git",
20
- "url": "https://github.com/cyber-uni/civitas.git",
21
- "directory": "packages/civitas"
22
- },
23
- "license": "MIT",
24
- "author": "unional <homawong@gmail.com>",
25
- "type": "module",
26
- "files": [
27
- "skills",
28
- "guild",
29
- "references",
30
- "plugin.json",
31
- ".claude-plugin",
32
- ".cursor-plugin",
33
- ".codex-plugin",
34
- "CHANGELOG.md"
35
- ],
36
- "scripts": {
37
- "prepack": "node -e \"require('node:fs').copyFileSync('../../readme.md', 'readme.md')\"",
38
- "test": "vitest run",
39
- "typecheck": "tsc --noEmit"
40
- },
41
- "devDependencies": {
42
- "@types/node": "^26.0.0",
43
- "cyber-agentkit": "^2.16.0",
44
- "diff": "^9.0.0",
45
- "typescript": "^7.0.2",
46
- "vitest": "^5.0.3",
47
- "yaml": "^2.9.1"
48
- },
49
- "engines": {
50
- "node": ">=22"
51
- },
52
- "publishConfig": {
53
- "access": "public",
54
- "provenance": true
55
- }
56
- }
2
+ "name": "civitas",
3
+ "version": "0.1.0",
4
+ "description": "A guild of detailed personas for agent-driven software development, commissioned into your repository as skills",
5
+ "keywords": [
6
+ "civitas",
7
+ "personas",
8
+ "guild",
9
+ "agent",
10
+ "skills",
11
+ "plugin",
12
+ "claude-code",
13
+ "codex",
14
+ "cursor",
15
+ "copilot"
16
+ ],
17
+ "homepage": "https://github.com/cyber-uni/civitas#readme",
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "https://github.com/cyber-uni/civitas.git",
21
+ "directory": "packages/civitas"
22
+ },
23
+ "license": "MIT",
24
+ "author": "unional <homawong@gmail.com>",
25
+ "type": "module",
26
+ "files": [
27
+ "skills",
28
+ "guild",
29
+ "references",
30
+ "plugin.json",
31
+ ".claude-plugin",
32
+ ".cursor-plugin",
33
+ ".codex-plugin",
34
+ "CHANGELOG.md"
35
+ ],
36
+ "devDependencies": {
37
+ "@types/node": "^26.0.0",
38
+ "cyber-agentkit": "^2.16.0",
39
+ "diff": "^9.0.0",
40
+ "typescript": "^7.0.2",
41
+ "vitest": "^5.0.3",
42
+ "yaml": "^2.9.1"
43
+ },
44
+ "engines": {
45
+ "node": ">=22"
46
+ },
47
+ "publishConfig": {
48
+ "access": "public",
49
+ "provenance": true
50
+ },
51
+ "scripts": {
52
+ "test": "vitest run",
53
+ "typecheck": "tsc --noEmit"
54
+ }
55
+ }
package/plugin.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
3
3
  "name": "civitas",
4
- "version": "0.0.0",
4
+ "version": "0.1.0",
5
5
  "description": "A guild of detailed personas for agent-driven software development, commissioned into your repository as skills",
6
6
  "author": {
7
7
  "name": "unional"
@@ -1,5 +1,5 @@
1
1
  // Compiled by `universal-plugin plugin build` from src/cli.ts. Edit the source, not this file.
2
- globalThis.__SKILL_SCRIPT__ = {"package":null,"bin":null,"version":"0.0.0","entry":"skills/guild/scripts/civitas.mjs","commands":{}};
2
+ globalThis.__SKILL_SCRIPT__ = {"package":null,"bin":null,"version":"0.1.0","entry":"skills/guild/scripts/civitas.mjs","commands":{}};
3
3
  import{homedir as e}from"node:os";import{dirname as t,join as n,relative as r,resolve as i}from"node:path";import{fileURLToPath as a}from"node:url";import{parseArgs as o}from"node:util";import{existsSync as s,mkdirSync as c,readFileSync as l,readdirSync as u,rmSync as d,statSync as f,writeFileSync as p}from"node:fs";import{createRequire as m}from"node:module";var h=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),g=/* @__PURE__ */ m(import.meta.url),_=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r)setTimeout(function(){r(e)},0);else return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h)d[r]=void 0;else{if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}};new class extends _{};function v(e,t){let n=0;for(;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function y(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return``;for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function b(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function x(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function S(e,t){return b(e,t,``)}function C(e,t){return x(e,t,``)}function w(e,t){return t.slice(0,T(e,t))}function T(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);let i=Array(r),a=0;i[0]=0;for(let e=1;e<r;e++){for(t[e]==t[a]?i[e]=i[a]:i[e]=a;a>0&&t[e]!=t[a];)a=i[a];t[e]==t[a]&&a++}a=0;for(let r=n;r<e.length;r++){for(;a>0&&e[r]!=t[a];)a=i[a];e[r]==t[a]&&a++}return a}function E(e,t){let n=[];for(let r of Array.from(t.segment(e))){let e=r.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}return n}function ee(e,t){if(t)return O(e,t)[1];let n;for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function D(e,t){if(t)return O(e,t)[0];let n=e.match(/^\s*/);return n?n[0]:``}function O(e,t){if(!t)return[D(e),ee(e)];if(t.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);let n=E(e,t),r=n[0],i=n[n.length-1];return[/\s/.test(r)?r:``,/\s/.test(i)?i:``]}const te=`a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}`,ne=RegExp(`[${te}]+|\\s+|[^${te}]`,`ug`);new class extends _{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){let r=t.intlSegmenter;if(r.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);n=E(e,r)}else n=e.match(ne)||[];let r=[],i=null;return n.forEach(e=>{/\s/.test(e)?i==null?r.push(e):r.push(r.pop()+e):i!=null&&/\s/.test(i)?r[r.length-1]==i?r.push(r.pop()+e):r.push(i+e):r.push(e),i=e}),r}join(e){return e.map((e,t)=>t==0?e:e.replace(/^\s+/,``)).join(``)}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,r=null,i=null;return e.forEach(e=>{e.added?r=e:e.removed?i=e:((r||i)&&re(n,i,r,e,t.intlSegmenter),n=e,r=null,i=null)}),(r||i)&&re(n,i,r,null,t.intlSegmenter),e}};function re(e,t,n,r,i){if(t&&n){let[a,o]=O(t.value,i),[s,c]=O(n.value,i);if(e){let r=v(a,s);e.value=x(e.value,s,r),t.value=S(t.value,r),n.value=S(n.value,r)}if(r){let e=y(o,c);r.value=b(r.value,c,e),t.value=C(t.value,e),n.value=C(n.value,e)}}else if(n){if(e){let e=D(n.value,i);n.value=n.value.substring(e.length)}if(r){let e=D(r.value,i);r.value=r.value.substring(e.length)}}else if(e&&r){let n=D(r.value,i),[a,o]=O(t.value,i),s=v(n,a);t.value=S(t.value,s);let c=y(S(n,s),o);t.value=C(t.value,c),r.value=b(r.value,n,c),e.value=x(e.value,n,n.slice(0,n.length-c.length))}else if(r){let e=D(r.value,i),n=w(ee(t.value,i),e);t.value=C(t.value,n)}else if(e){let n=w(ee(e.value,i),D(t.value,i));t.value=S(t.value,n)}}new class extends _{tokenize(e){let t=RegExp(`(\\r?\\n)|[${te}]+|[^\\S\\n\\r]+|[^${te}]`,`ug`);return e.match(t)||[]}};const ie=new class extends _{constructor(){super(...arguments),this.tokenize=oe}equals(e,t,n){return n.ignoreWhitespace?(n.newlineIsToken&&e.includes(`
4
4
  `)||(e=e.trim()),n.newlineIsToken&&t.includes(`
5
5
  `)||(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(`