@integrity-labs/agt-cli 0.28.1190 → 0.28.1192
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/dist/bin/agt.js +6 -6
- package/dist/{chunk-KV6ZNGTG.js → chunk-DXLSLT5G.js} +2 -2
- package/dist/{chunk-EFTLDAKN.js → chunk-NJ2AUTIO.js} +3 -3
- package/dist/{chunk-NVLV6XHL.js → chunk-TCPX64GU.js} +7 -5
- package/dist/chunk-TCPX64GU.js.map +1 -0
- package/dist/{chunk-55M26Q4M.js → chunk-UQYIFOWE.js} +2 -2
- package/dist/{chunk-7GZKHF45.js → chunk-UUO7QTLC.js} +98 -16
- package/dist/chunk-UUO7QTLC.js.map +1 -0
- package/dist/{claude-code-updater-IU23JJZI.js → claude-code-updater-EOJQHUZ2.js} +3 -3
- package/dist/{claude-pair-runtime-GMXVV5AJ.js → claude-pair-runtime-WKTA3HNF.js} +3 -3
- package/dist/lib/manager-worker.js +71 -23
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/direct-chat-channel.js +3 -0
- package/dist/mcp/index.js +54 -1
- package/dist/mcp/origami.js +3 -0
- package/dist/mcp/slack-channel.js +3 -0
- package/dist/mcp/telegram-channel.js +3 -0
- package/dist/{persistent-session-7PBVDLFI.js → persistent-session-5MGJGJIB.js} +4 -4
- package/dist/{responsiveness-probe-RSH4EMQP.js → responsiveness-probe-J4CBYZS3.js} +4 -4
- package/dist/{session-auth-dead-M2YABEQU.js → session-auth-dead-7CSZHNBK.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-7GZKHF45.js.map +0 -1
- package/dist/chunk-NVLV6XHL.js.map +0 -1
- /package/dist/{chunk-KV6ZNGTG.js.map → chunk-DXLSLT5G.js.map} +0 -0
- /package/dist/{chunk-EFTLDAKN.js.map → chunk-NJ2AUTIO.js.map} +0 -0
- /package/dist/{chunk-55M26Q4M.js.map → chunk-UQYIFOWE.js.map} +0 -0
- /package/dist/{claude-code-updater-IU23JJZI.js.map → claude-code-updater-EOJQHUZ2.js.map} +0 -0
- /package/dist/{claude-pair-runtime-GMXVV5AJ.js.map → claude-pair-runtime-WKTA3HNF.js.map} +0 -0
- /package/dist/{persistent-session-7PBVDLFI.js.map → persistent-session-5MGJGJIB.js.map} +0 -0
- /package/dist/{responsiveness-probe-RSH4EMQP.js.map → responsiveness-probe-J4CBYZS3.js.map} +0 -0
- /package/dist/{session-auth-dead-M2YABEQU.js.map → session-auth-dead-7CSZHNBK.js.map} +0 -0
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-XWVM4KPK.js";
|
|
5
5
|
import {
|
|
6
6
|
FORCED_UPDATE_HARD_DEADLINE_MS
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-UUO7QTLC.js";
|
|
8
8
|
import {
|
|
9
9
|
effectiveClaudeJsonPath
|
|
10
10
|
} from "./chunk-AIUIMEUS.js";
|
|
@@ -722,4 +722,4 @@ export {
|
|
|
722
722
|
probeClaudeInstalls,
|
|
723
723
|
maybeUpdateClaudeCode
|
|
724
724
|
};
|
|
725
|
-
//# sourceMappingURL=chunk-
|
|
725
|
+
//# sourceMappingURL=chunk-UQYIFOWE.js.map
|
|
@@ -164,30 +164,90 @@ var AGENT_RULES_SECTION_END = "<!-- AGT:RULES_END -->";
|
|
|
164
164
|
var MAX_AGENT_RULES = 8;
|
|
165
165
|
var MAX_AGENT_RULE_CHARS = 200;
|
|
166
166
|
var MAX_AGENT_RULES_CHARS = MAX_AGENT_RULES * (MAX_AGENT_RULE_CHARS + 4);
|
|
167
|
-
|
|
167
|
+
var MAX_ORG_RULES = 10;
|
|
168
|
+
var MAX_TEAM_RULES = 10;
|
|
169
|
+
var MAX_INHERITED_RULES_CHARS = (MAX_ORG_RULES + MAX_TEAM_RULES) * (MAX_AGENT_RULE_CHARS + 4);
|
|
170
|
+
function resolveInheritedForDelivery(received, lastKnown, currentTeamId) {
|
|
171
|
+
if (received === void 0)
|
|
172
|
+
return { rules: void 0, reusedLastKnown: [], unknown: [] };
|
|
173
|
+
const reusedLastKnown = [];
|
|
174
|
+
const unknown2 = [];
|
|
175
|
+
const pick = (scope) => {
|
|
176
|
+
const got = received[scope];
|
|
177
|
+
if (got !== null)
|
|
178
|
+
return got;
|
|
179
|
+
if (lastKnown && (scope === "organization" || lastKnown.teamId === currentTeamId)) {
|
|
180
|
+
reusedLastKnown.push(scope);
|
|
181
|
+
return lastKnown.rules[scope];
|
|
182
|
+
}
|
|
183
|
+
unknown2.push(scope);
|
|
184
|
+
return [];
|
|
185
|
+
};
|
|
186
|
+
return { rules: { organization: pick("organization"), team: pick("team") }, reusedLastKnown, unknown: unknown2 };
|
|
187
|
+
}
|
|
188
|
+
function agentRulesRestartBasis(rules, inherited) {
|
|
189
|
+
const own = basisOf(rules);
|
|
190
|
+
const org = basisOf(inherited?.organization ?? []);
|
|
191
|
+
const team = basisOf(inherited?.team ?? []);
|
|
192
|
+
if (org === "" && team === "")
|
|
193
|
+
return own;
|
|
194
|
+
return `${own}organization\0${org}team\0${team}`;
|
|
195
|
+
}
|
|
196
|
+
function basisOf(rules) {
|
|
168
197
|
return [...rules].map((r) => r.text.trim()).filter((t) => t.length > 0).sort().join("\0");
|
|
169
198
|
}
|
|
170
|
-
function agentHasRules(rules) {
|
|
171
|
-
|
|
199
|
+
function agentHasRules(rules, inherited) {
|
|
200
|
+
const any = (list) => list.some((r) => r.text.trim().length > 0);
|
|
201
|
+
return any(rules) || any(inherited?.organization ?? []) || any(inherited?.team ?? []);
|
|
172
202
|
}
|
|
173
|
-
function buildAgentRulesSection(rules) {
|
|
174
|
-
const kept = rules
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
203
|
+
function buildAgentRulesSection(rules, inherited) {
|
|
204
|
+
const kept = keepRenderable(rules, MAX_AGENT_RULES);
|
|
205
|
+
const org = keepRenderable(inherited?.organization ?? [], MAX_ORG_RULES);
|
|
206
|
+
const team = keepRenderable(inherited?.team ?? [], MAX_TEAM_RULES);
|
|
207
|
+
if (org.length === 0 && team.length === 0) {
|
|
208
|
+
if (kept.length === 0)
|
|
209
|
+
return "";
|
|
210
|
+
return `${AGENT_RULES_SECTION_START}
|
|
211
|
+
## Standing rules from your people
|
|
212
|
+
|
|
213
|
+
${RULES_PREAMBLE}
|
|
214
|
+
|
|
215
|
+
${bullets(kept)}
|
|
216
|
+
${AGENT_RULES_SECTION_END}
|
|
217
|
+
|
|
218
|
+
`;
|
|
219
|
+
}
|
|
220
|
+
const blocks = [];
|
|
221
|
+
if (org.length > 0)
|
|
222
|
+
blocks.push(`From your organisation:
|
|
223
|
+
${bullets(org)}`);
|
|
224
|
+
if (team.length > 0)
|
|
225
|
+
blocks.push(`From your team:
|
|
226
|
+
${bullets(team)}`);
|
|
227
|
+
if (kept.length > 0)
|
|
228
|
+
blocks.push(`Yours:
|
|
229
|
+
${bullets(kept)}`);
|
|
178
230
|
return `${AGENT_RULES_SECTION_START}
|
|
179
231
|
## Standing rules from your people
|
|
180
232
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
ever conflicts with a guardrail above, the guardrail wins and you should say so
|
|
184
|
-
rather than silently picking one.
|
|
233
|
+
${RULES_PREAMBLE} If two of these rules conflict, the more specific one wins:
|
|
234
|
+
yours over your team's, and your team's over your organisation's.
|
|
185
235
|
|
|
186
|
-
${
|
|
236
|
+
${blocks.join("\n\n")}
|
|
187
237
|
${AGENT_RULES_SECTION_END}
|
|
188
238
|
|
|
189
239
|
`;
|
|
190
240
|
}
|
|
241
|
+
var RULES_PREAMBLE = `Rules your team has asked you to follow every time, in their words. They are not
|
|
242
|
+
task-specific \u2014 they apply on every turn regardless of what you are doing. If one
|
|
243
|
+
ever conflicts with a guardrail above, the guardrail wins and you should say so
|
|
244
|
+
rather than silently picking one.`;
|
|
245
|
+
function bullets(texts) {
|
|
246
|
+
return texts.map((t) => `- ${t}`).join("\n");
|
|
247
|
+
}
|
|
248
|
+
function keepRenderable(rules, max) {
|
|
249
|
+
return rules.map((r) => r.text.trim()).filter(Boolean).filter((t) => t.length <= MAX_AGENT_RULE_CHARS).slice(0, max);
|
|
250
|
+
}
|
|
191
251
|
|
|
192
252
|
// ../../packages/core/dist/provisioning/frameworks/claudecode/agent-console-url.js
|
|
193
253
|
var DEFAULT_AGENT_CONSOLE_URL = "https://app.ninjafy.com";
|
|
@@ -1260,6 +1320,25 @@ var REQUIRE_APPROVAL_HOW = {
|
|
|
1260
1320
|
` \`check_approval\` says it is approved.`
|
|
1261
1321
|
]
|
|
1262
1322
|
};
|
|
1323
|
+
var REQUIRE_APPROVAL_DELETE_SCOPE = [
|
|
1324
|
+
` What \`delete\` covers: removing anything that cannot be recovered or is not only`,
|
|
1325
|
+
` yours.`,
|
|
1326
|
+
` - work that exists only in your directory: uncommitted changes, unpushed commits,`,
|
|
1327
|
+
` stashes, customer documents, memory files;`,
|
|
1328
|
+
` - anything shared or outside your own agent directory: remote branches, databases,`,
|
|
1329
|
+
` other agents' files, \`/tmp\`;`,
|
|
1330
|
+
` - anything customers or the platform can see.`,
|
|
1331
|
+
` It does not cover your own rebuildable files, which need no approval: package caches,`,
|
|
1332
|
+
` build output, and your own scratch files under your agent directory (never \`/tmp\`,`,
|
|
1333
|
+
` which other agents share). A git worktree or local branch joins that group only`,
|
|
1334
|
+
` when you have checked, against the remote as it is now and at the moment you remove`,
|
|
1335
|
+
` it, that its tree is clean with ignored files included, there are no stashes, nothing`,
|
|
1336
|
+
` is unpushed, and it is merged into, or fully on a branch that still exists on, the`,
|
|
1337
|
+
` remote, and that it is not your base clone, has no open pull request, and is not in`,
|
|
1338
|
+
` use by a task of yours that is still in progress or waiting (the`,
|
|
1339
|
+
` \`reclaim-stale-worktrees\` skill, where your org has it, walks through these).`,
|
|
1340
|
+
` If you cannot check, or are unsure which list something is on, treat it as a delete.`
|
|
1341
|
+
];
|
|
1263
1342
|
var REQUIRE_APPROVAL_EMAIL_DETAIL = [
|
|
1264
1343
|
` For an email, pass \`detail.email\` = { to, from, subject } so your manager sees who it`,
|
|
1265
1344
|
` goes to.`
|
|
@@ -1308,7 +1387,7 @@ function requireApprovalActions(config) {
|
|
|
1308
1387
|
const raw = config?.["actions"];
|
|
1309
1388
|
if (!Array.isArray(raw))
|
|
1310
1389
|
return null;
|
|
1311
|
-
const actions = raw.filter((a) => typeof a === "string" && a.trim() !== "").map((a) => a.trim());
|
|
1390
|
+
const actions = raw.filter((a) => typeof a === "string" && a.trim() !== "").map((a) => a.trim().toLowerCase());
|
|
1312
1391
|
return actions.length > 0 ? actions : null;
|
|
1313
1392
|
}
|
|
1314
1393
|
function requireApprovalHowLines(g, level, holds) {
|
|
@@ -1319,8 +1398,10 @@ function requireApprovalHowLines(g, level, holds) {
|
|
|
1319
1398
|
const namesOther = actions === null || actions.some((a) => a !== REQUIRE_APPROVAL_EMAIL_ACTION);
|
|
1320
1399
|
const asksAboutEmail = namesEmail && emailHold === null && domainHold === null;
|
|
1321
1400
|
const ask = namesOther || asksAboutEmail || namesEmail && domainHold !== null;
|
|
1401
|
+
const namesDelete = actions === null || actions.includes("delete");
|
|
1322
1402
|
return [
|
|
1323
1403
|
...ask ? REQUIRE_APPROVAL_HOW[level] : [],
|
|
1404
|
+
...namesDelete ? REQUIRE_APPROVAL_DELETE_SCOPE : [],
|
|
1324
1405
|
...asksAboutEmail ? REQUIRE_APPROVAL_EMAIL_DETAIL : [],
|
|
1325
1406
|
...namesEmail && emailHold !== null ? requireApprovalEmailException(emailHold) : [],
|
|
1326
1407
|
...namesEmail && domainHold !== null ? requireApprovalDomainHoldException(domainHold.covered) : []
|
|
@@ -1456,7 +1537,7 @@ function generateClaudeMd(input) {
|
|
|
1456
1537
|
const renderIntegrations = input.renderIntegrationsSection === true;
|
|
1457
1538
|
const integrationsSection = renderIntegrations ? buildIntegrationsSection(integrations) : "";
|
|
1458
1539
|
const capabilityPromptSection = buildCapabilityPromptSection(integrations, renderIntegrations);
|
|
1459
|
-
const agentRulesSection = buildAgentRulesSection(input.agentRules ?? []);
|
|
1540
|
+
const agentRulesSection = buildAgentRulesSection(input.agentRules ?? [], input.inheritedAgentRules);
|
|
1460
1541
|
const kanbanWorkPolicySection = buildKanbanWorkPolicySection();
|
|
1461
1542
|
const platformStorageSection = buildPlatformStorageSection(input.hasWorkflows);
|
|
1462
1543
|
const skillAuthoringSection = buildSkillAuthoringSection();
|
|
@@ -17424,6 +17505,7 @@ export {
|
|
|
17424
17505
|
scrubPreservingIdentifiers,
|
|
17425
17506
|
identifierMemoryName,
|
|
17426
17507
|
EXTRACTOR_IDENTIFIER_RULE,
|
|
17508
|
+
resolveInheritedForDelivery,
|
|
17427
17509
|
agentRulesRestartBasis,
|
|
17428
17510
|
agentHasRules,
|
|
17429
17511
|
SCRATCH_RETENTION_DAYS,
|
|
@@ -17590,4 +17672,4 @@ export {
|
|
|
17590
17672
|
isForcedUpdatePastDeadline,
|
|
17591
17673
|
shouldMintReplacementKey
|
|
17592
17674
|
};
|
|
17593
|
-
//# sourceMappingURL=chunk-
|
|
17675
|
+
//# sourceMappingURL=chunk-UUO7QTLC.js.map
|