@agimon-ai/po-goal 0.0.0-alpha.21 → 0.0.0-alpha.210
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/LICENSE +110 -149
- package/README.md +4 -19
- package/dist/apiContracts.cjs.map +1 -1
- package/dist/apiContracts.d.mts +2 -2
- package/dist/extensions/native.mjs +66 -27
- package/dist/extensions/native.mjs.map +1 -1
- package/dist/extensions/server.cjs +673 -156
- package/dist/extensions/server.cjs.map +1 -1
- package/dist/extensions/server.d.mts.map +1 -1
- package/dist/extensions/server.mjs +676 -159
- package/dist/extensions/server.mjs.map +1 -1
- package/dist/extensions/web.mjs +71 -33
- package/dist/extensions/web.mjs.map +1 -1
- package/dist/{goalView-CVZbz4QG.mjs → goalView-BiEARnfN.mjs} +7 -2
- package/dist/goalView-BiEARnfN.mjs.map +1 -0
- package/dist/{goalView-DZmjhYsF.cjs → goalView-deU5BrTk.cjs} +7 -2
- package/dist/goalView-deU5BrTk.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/po-runtime-identity.json +1 -0
- package/llms.txt +2 -0
- package/locales/vi.json +56 -0
- package/locales/zh-CN.json +56 -0
- package/package.json +90 -21
- package/src/prompts/codemode-how-to-goal-admin/SKILL.md +23 -0
- package/dist/goalView-CVZbz4QG.mjs.map +0 -1
- package/dist/goalView-DZmjhYsF.cjs.map +0 -1
package/LICENSE
CHANGED
|
@@ -1,149 +1,110 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
Terms
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
Any use of the Licensed Work in violation of this License will automatically
|
|
113
|
-
terminate your rights under this License for the current and all other
|
|
114
|
-
versions of the Licensed Work.
|
|
115
|
-
|
|
116
|
-
This License does not grant you any right in any trademark or logo of
|
|
117
|
-
Licensor or its affiliates (provided that you may use a trademark or logo of
|
|
118
|
-
Licensor as expressly required by this License).
|
|
119
|
-
|
|
120
|
-
TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
|
|
121
|
-
AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
|
|
122
|
-
EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
|
|
123
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
|
|
124
|
-
TITLE.
|
|
125
|
-
|
|
126
|
-
MariaDB hereby grants you permission to use this License’s text to license
|
|
127
|
-
your works, and to refer to it using the trademark “Business Source License”,
|
|
128
|
-
as long as you comply with the Covenants of Licensor below.
|
|
129
|
-
|
|
130
|
-
Covenants of Licensor
|
|
131
|
-
|
|
132
|
-
In consideration of the right to use this License’s text and the “Business
|
|
133
|
-
Source License” name and trademark, Licensor covenants to MariaDB, and to all
|
|
134
|
-
other recipients of the licensed work to be provided by Licensor:
|
|
135
|
-
|
|
136
|
-
1. To specify as the Change License the GPL Version 2.0 or any later version,
|
|
137
|
-
or a license that is compatible with GPL Version 2.0 or a later version,
|
|
138
|
-
where “compatible” means that software provided under the Change License can
|
|
139
|
-
be included in a program with software provided under GPL Version 2.0 or a
|
|
140
|
-
later version. Licensor may specify additional Change Licenses without
|
|
141
|
-
limitation.
|
|
142
|
-
|
|
143
|
-
2. To either: (a) specify an additional grant of rights to use that does not
|
|
144
|
-
impose any additional restriction on the right granted in this License, as
|
|
145
|
-
the Additional Use Grant; or (b) insert the text “None”.
|
|
146
|
-
|
|
147
|
-
3. To specify a Change Date.
|
|
148
|
-
|
|
149
|
-
4. Not to modify this License in any other way.
|
|
1
|
+
# Functional Source License, Version 1.1, MIT Future License
|
|
2
|
+
|
|
3
|
+
## Abbreviation
|
|
4
|
+
|
|
5
|
+
FSL-1.1-MIT
|
|
6
|
+
|
|
7
|
+
## Notice
|
|
8
|
+
|
|
9
|
+
Copyright 2026 Agimon Pty Ltd
|
|
10
|
+
|
|
11
|
+
## Terms and Conditions
|
|
12
|
+
|
|
13
|
+
### Licensor ("We")
|
|
14
|
+
|
|
15
|
+
The party offering the Software under these Terms and Conditions.
|
|
16
|
+
|
|
17
|
+
### The Software
|
|
18
|
+
|
|
19
|
+
The "Software" is each version of the software that we make available under
|
|
20
|
+
these Terms and Conditions, as indicated by our inclusion of these Terms and
|
|
21
|
+
Conditions with the Software.
|
|
22
|
+
|
|
23
|
+
### License Grant
|
|
24
|
+
|
|
25
|
+
Subject to your compliance with this License Grant and the Patents,
|
|
26
|
+
Redistribution and Trademark clauses below, we hereby grant you the right to
|
|
27
|
+
use, copy, modify, create derivative works, publicly perform, publicly display
|
|
28
|
+
and redistribute the Software for any Permitted Purpose identified below.
|
|
29
|
+
|
|
30
|
+
### Permitted Purpose
|
|
31
|
+
|
|
32
|
+
A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
|
|
33
|
+
means making the Software available to others in a commercial product or
|
|
34
|
+
service that:
|
|
35
|
+
|
|
36
|
+
1. substitutes for the Software;
|
|
37
|
+
|
|
38
|
+
2. substitutes for any other product or service we offer using the Software
|
|
39
|
+
that exists as of the date we make the Software available; or
|
|
40
|
+
|
|
41
|
+
3. offers the same or substantially similar functionality as the Software.
|
|
42
|
+
|
|
43
|
+
Permitted Purposes specifically include using the Software:
|
|
44
|
+
|
|
45
|
+
1. for your internal use and access;
|
|
46
|
+
|
|
47
|
+
2. for non-commercial education;
|
|
48
|
+
|
|
49
|
+
3. for non-commercial research; and
|
|
50
|
+
|
|
51
|
+
4. in connection with professional services that you provide to a licensee
|
|
52
|
+
using the Software in accordance with these Terms and Conditions.
|
|
53
|
+
|
|
54
|
+
### Patents
|
|
55
|
+
|
|
56
|
+
To the extent your use for a Permitted Purpose would necessarily infringe our
|
|
57
|
+
patents, the license grant above includes a license under our patents. If you
|
|
58
|
+
make a claim against any party that the Software infringes or contributes to
|
|
59
|
+
the infringement of any patent, then your patent license to the Software ends
|
|
60
|
+
immediately.
|
|
61
|
+
|
|
62
|
+
### Redistribution
|
|
63
|
+
|
|
64
|
+
The Terms and Conditions apply to all copies, modifications and derivatives of
|
|
65
|
+
the Software.
|
|
66
|
+
|
|
67
|
+
If you redistribute any copies, modifications or derivatives of the Software,
|
|
68
|
+
you must include a copy of or a link to these Terms and Conditions and not
|
|
69
|
+
remove any copyright notices provided in or with the Software.
|
|
70
|
+
|
|
71
|
+
### Disclaimer
|
|
72
|
+
|
|
73
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
|
|
74
|
+
IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
|
|
75
|
+
PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
|
|
76
|
+
|
|
77
|
+
IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
|
|
78
|
+
SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
|
|
79
|
+
EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
|
|
80
|
+
|
|
81
|
+
### Trademarks
|
|
82
|
+
|
|
83
|
+
Except for displaying the License Details and identifying us as the origin of
|
|
84
|
+
the Software, you have no right under these Terms and Conditions to use our
|
|
85
|
+
trademarks, trade names, service marks or product names.
|
|
86
|
+
|
|
87
|
+
## Grant of Future License
|
|
88
|
+
|
|
89
|
+
We hereby irrevocably grant you an additional license to use the Software under
|
|
90
|
+
the MIT license that is effective on the second anniversary of the date we make
|
|
91
|
+
the Software available. On or after that date, you may use the Software under
|
|
92
|
+
the MIT license, in which case the following will apply:
|
|
93
|
+
|
|
94
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
95
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
96
|
+
the Software without restriction, including without limitation the rights to
|
|
97
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
98
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
|
99
|
+
so, subject to the following conditions:
|
|
100
|
+
|
|
101
|
+
The above copyright notice and this permission notice shall be included in all
|
|
102
|
+
copies or substantial portions of the Software.
|
|
103
|
+
|
|
104
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
105
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
106
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
107
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
108
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
109
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
110
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ is scoped to the repository. Lifecycle tools are private to the checker, never a
|
|
|
16
16
|
|
|
17
17
|
## Install
|
|
18
18
|
|
|
19
|
-
The seeded `
|
|
19
|
+
The seeded `presets.yaml` selects Goal in `default.packages`; it is not fixed host infrastructure.
|
|
20
20
|
Keep it there or select it through a layer. Goal starts inactive.
|
|
21
21
|
|
|
22
22
|
## Command grammar
|
|
@@ -36,7 +36,8 @@ agent in both the CLI and server. After a turn settles, Goal waits for same-sess
|
|
|
36
36
|
runners, workflows, and their result handoffs, and for all pending messages to be processed.
|
|
37
37
|
|
|
38
38
|
One bounded LLM check then evaluates the objective against the transcript and verification evidence.
|
|
39
|
-
The checker alone receives `goal_complete`, `goal_continue`, and `goal_blocked
|
|
39
|
+
The checker alone receives `goal_complete`, `goal_continue`, and `goal_blocked`; it does not grant
|
|
40
|
+
the working agent additional tools or permissions. Completion archives
|
|
40
41
|
the evidence and removes the active goal. Incomplete work produces a targeted next-action prompt,
|
|
41
42
|
not a generic completion claim. Genuine repeated external blockers retain the unfinished goal.
|
|
42
43
|
|
|
@@ -72,15 +73,6 @@ The default history path is `~/.po/agent/goal-history/`. History retains up to 1
|
|
|
72
73
|
or completing removes the active objective and status. Archived history remains until retention
|
|
73
74
|
or explicit deletion removes it. Failed archival retains the goal instead of discarding it.
|
|
74
75
|
|
|
75
|
-
## Public API
|
|
76
|
-
|
|
77
|
-
```ts
|
|
78
|
-
import { DEFAULT_GOAL_SETTINGS, parseGoalCommand, parseTokenBudget } from '@agimon-ai/po-goal';
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
The root also exports state-machine, history codec, accounting, safety, prompt, and tool
|
|
82
|
-
types for embedding.
|
|
83
|
-
|
|
84
76
|
## Development
|
|
85
77
|
|
|
86
78
|
```bash
|
|
@@ -94,11 +86,4 @@ Maintained by [Agimon](https://agimon.ai/about).
|
|
|
94
86
|
|
|
95
87
|
## License
|
|
96
88
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
Plugin entries live in `src/extensions`, with host-neutral runtime logic in `src/services` and host registrations in routed `src/extensions` surfaces. `src/models` owns goal state, accounting, transitions, and serialization. Named `src/services` folders handle history, persistence, prompts, and validation. Public helpers and types are exposed through flat `src/exports`.
|
|
100
|
-
|
|
101
|
-
The native session contributions declare minor-mode owners and use the shared background-work contract. Request-private
|
|
102
|
-
checker tools are validated before their effects are applied, with session and goal revision guards.
|
|
103
|
-
Provider calls do not hold the command queue, so pause and clear remain responsive during inference.
|
|
104
|
-
The main agent's ordinary tool policy is unchanged.
|
|
89
|
+
Functional Source License 1.1, MIT Future License (FSL-1.1-MIT): free for any purpose except a Competing Use; each version converts to MIT two years after release. See [LICENSE](LICENSE).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apiContracts.cjs","names":["defineApiContract"],"sources":["../src/schemas/apiContracts.ts"],"sourcesContent":["import { defineApiContract } from '@agimon-ai/po-core/apiContracts';\n\n/** This server plugin contributes agent tools, commands or lifecycle only, with no separate HTTP or socket surface. */\nexport const apiContracts = defineApiContract({ version: 1, http: [], sockets: [], dynamic: [] });\nexport default apiContracts;\n"],"mappings":";;;;;;AAGA,MAAa,gBAAA,
|
|
1
|
+
{"version":3,"file":"apiContracts.cjs","names":["defineApiContract"],"sources":["../src/schemas/apiContracts.ts"],"sourcesContent":["import { defineApiContract } from '@agimon-ai/po-core/apiContracts';\n\n/** This server plugin contributes agent tools, commands or lifecycle only, with no separate HTTP or socket surface. */\nexport const apiContracts = defineApiContract({ version: 1, http: [], sockets: [], dynamic: [] });\nexport default apiContracts;\n"],"mappings":";;;;;;AAGA,MAAa,gBAAA,G,yCAAeA,CAAAA,CAAAA,kBAAAA,CAAkB;CAAE,SAAS;CAAG,MAAM,CAAC;CAAG,SAAS,CAAC;CAAG,SAAS,CAAC;AAAE,CAAC"}
|
package/dist/apiContracts.d.mts
CHANGED
|
@@ -6,7 +6,7 @@ export declare const apiContracts: {
|
|
|
6
6
|
schemas?: Record<string, boolean | object> | undefined;
|
|
7
7
|
http: {
|
|
8
8
|
id: string;
|
|
9
|
-
scope: "
|
|
9
|
+
scope: "host" | "session" | "workspace";
|
|
10
10
|
basePath?: string | undefined;
|
|
11
11
|
path: string;
|
|
12
12
|
method: "DELETE" | "GET" | "HEAD" | "OPTIONS" | "PATCH" | "POST" | "PUT";
|
|
@@ -34,7 +34,7 @@ export declare const apiContracts: {
|
|
|
34
34
|
}[];
|
|
35
35
|
sockets: {
|
|
36
36
|
id: string;
|
|
37
|
-
scope: "
|
|
37
|
+
scope: "host" | "session" | "workspace";
|
|
38
38
|
description: string;
|
|
39
39
|
availability?: string | undefined;
|
|
40
40
|
service: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineActivityGroup, defineFill, defineNativePlugin } from "@agimon-ai/po-core/native";
|
|
1
|
+
import { defineActivityGroup, defineFill, defineNativePlugin, useT } from "@agimon-ai/po-core/native";
|
|
2
2
|
import { View } from "react-native-unistyles/components/native/View";
|
|
3
3
|
import { Text } from "react-native-unistyles/components/native/Text";
|
|
4
4
|
import { Button, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, Input, KebabIcon, Label, ListRow, Sheet, SheetBody, SheetContent, SheetHeader, SheetTitle, Textarea, fontOf } from "@agimon-ai/po-native-components";
|
|
@@ -45,11 +45,11 @@ function parseGoalStatusView(raw) {
|
|
|
45
45
|
//#endregion
|
|
46
46
|
//#region src/extensions/workspaces/sessions/(frontend)/activity-group/goal.native.ts
|
|
47
47
|
var goal_native_default = defineActivityGroup({
|
|
48
|
+
label: (t) => t("goal.activityGroup.label", "Goal"),
|
|
48
49
|
keys: "g e",
|
|
49
50
|
statusKey: GOAL_VIEW_STATUS_KEY,
|
|
50
51
|
marksBackgroundWork: false,
|
|
51
|
-
hideWhenEmpty: true
|
|
52
|
-
order: 35
|
|
52
|
+
hideWhenEmpty: true
|
|
53
53
|
});
|
|
54
54
|
//#endregion
|
|
55
55
|
//#region src/extensions/workspaces/sessions/(frontend)/fill/_lib/goalCommands.ts
|
|
@@ -109,6 +109,7 @@ function editGoalCommand(objective, budget) {
|
|
|
109
109
|
//#endregion
|
|
110
110
|
//#region src/extensions/workspaces/sessions/(frontend)/fill/_components/GoalActivitySection.native.tsx
|
|
111
111
|
function GoalSheet({ objective, state, mode, submit, close, error }) {
|
|
112
|
+
const t = useT();
|
|
112
113
|
const [draft, setDraft] = useState(objective);
|
|
113
114
|
const [budget, setBudget] = useState("");
|
|
114
115
|
const command = editGoalCommand(draft, budget);
|
|
@@ -117,37 +118,33 @@ function GoalSheet({ objective, state, mode, submit, close, error }) {
|
|
|
117
118
|
onOpenChange: (open) => {
|
|
118
119
|
if (!open) close();
|
|
119
120
|
},
|
|
120
|
-
children: /* @__PURE__ */ jsxs(SheetContent, { children: [/* @__PURE__ */ jsx(SheetHeader, { children: /* @__PURE__ */ jsx(SheetTitle, { children: mode === "edit" ? "edit goal" : "remove goal" }) }), /* @__PURE__ */ jsxs(SheetBody, { children: [
|
|
121
|
+
children: /* @__PURE__ */ jsxs(SheetContent, { children: [/* @__PURE__ */ jsx(SheetHeader, { children: /* @__PURE__ */ jsx(SheetTitle, { children: mode === "edit" ? t("goal.ui.editGoal", "edit goal") : t("goal.ui.removeGoal", "remove goal") }) }), /* @__PURE__ */ jsxs(SheetBody, { children: [
|
|
121
122
|
mode === "edit" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
122
123
|
/* @__PURE__ */ jsx(Text, {
|
|
123
124
|
style: styles.meta,
|
|
124
|
-
children: "this replaces the objective the agent is working to. it takes effect on the next turn."
|
|
125
|
+
children: t("goal.ui.thisReplacesTheObjectiveTheAgentIsWorkingToItTakesEffectOnTheNextTurn", "this replaces the objective the agent is working to. it takes effect on the next turn.")
|
|
125
126
|
}),
|
|
126
|
-
/* @__PURE__ */ jsx(Label, { children: "objective" }),
|
|
127
|
+
/* @__PURE__ */ jsx(Label, { children: t("goal.ui.objective", "objective") }),
|
|
127
128
|
/* @__PURE__ */ jsx(Textarea, {
|
|
128
|
-
accessibilityLabel: "objective",
|
|
129
|
+
accessibilityLabel: t("goal.ui.objective", "objective"),
|
|
129
130
|
value: draft,
|
|
130
131
|
onChangeText: setDraft,
|
|
131
132
|
numberOfLines: 3
|
|
132
133
|
}),
|
|
133
|
-
/* @__PURE__ */ jsx(Label, { children: "token budget" }),
|
|
134
|
+
/* @__PURE__ */ jsx(Label, { children: t("goal.ui.tokenBudget", "token budget") }),
|
|
134
135
|
/* @__PURE__ */ jsx(Input, {
|
|
135
|
-
accessibilityLabel: "token budget",
|
|
136
|
+
accessibilityLabel: t("goal.ui.tokenBudget", "token budget"),
|
|
136
137
|
value: budget,
|
|
137
138
|
onChangeText: setBudget,
|
|
138
|
-
placeholder:
|
|
139
|
+
placeholder: budgetHintOf(state) === "" ? t("goal.ui.noneLeaveBlankToKeepItThatWay", "none; leave blank to keep it that way") : t("goal.ui.keepBudget", "{budget}; blank keeps it", { budget: budgetHintOf(state) })
|
|
139
140
|
}),
|
|
140
141
|
/* @__PURE__ */ jsx(Text, {
|
|
141
142
|
style: styles.meta,
|
|
142
|
-
children: command ?? "nothing to send"
|
|
143
|
+
children: command ?? t("goal.ui.nothingToSend", "nothing to send")
|
|
143
144
|
})
|
|
144
|
-
] }) : /* @__PURE__ */
|
|
145
|
+
] }) : /* @__PURE__ */ jsx(Text, {
|
|
145
146
|
style: styles.meta,
|
|
146
|
-
children:
|
|
147
|
-
"this ends ",
|
|
148
|
-
objective,
|
|
149
|
-
" and stops the current turn. it is archived to this repository's goal history, where it can be restarted."
|
|
150
|
-
]
|
|
147
|
+
children: t("goal.ui.removeGoalExplanation", "This ends {objective} and stops the current turn. It is archived to this repository's goal history, where it can be restarted.", { objective })
|
|
151
148
|
}),
|
|
152
149
|
error ? /* @__PURE__ */ jsx(Text, {
|
|
153
150
|
accessibilityRole: "alert",
|
|
@@ -159,7 +156,7 @@ function GoalSheet({ objective, state, mode, submit, close, error }) {
|
|
|
159
156
|
children: [/* @__PURE__ */ jsx(Button, {
|
|
160
157
|
variant: "ghost",
|
|
161
158
|
onPress: close,
|
|
162
|
-
children: "cancel"
|
|
159
|
+
children: t("goal.ui.cancel", "cancel")
|
|
163
160
|
}), /* @__PURE__ */ jsx(Button, {
|
|
164
161
|
variant: mode === "edit" ? "primary" : "danger",
|
|
165
162
|
disabled: mode === "edit" && command === void 0,
|
|
@@ -167,7 +164,7 @@ function GoalSheet({ objective, state, mode, submit, close, error }) {
|
|
|
167
164
|
const value = mode === "edit" ? command : CLEAR_GOAL_COMMAND;
|
|
168
165
|
if (value) submit(value);
|
|
169
166
|
},
|
|
170
|
-
children: mode === "edit" ? "save" : "remove"
|
|
167
|
+
children: mode === "edit" ? t("goal.ui.save", "save") : t("goal.ui.remove", "remove")
|
|
171
168
|
})]
|
|
172
169
|
})
|
|
173
170
|
] })] })
|
|
@@ -175,12 +172,13 @@ function GoalSheet({ objective, state, mode, submit, close, error }) {
|
|
|
175
172
|
}
|
|
176
173
|
/** Reads the same status and sends the same validated commands as the cockpit. */
|
|
177
174
|
function GoalActivitySection({ sessionId, statuses, sendSessionFrame }) {
|
|
175
|
+
const t = useT();
|
|
178
176
|
const [mode, setMode] = useState();
|
|
179
177
|
const view = parseGoalStatusView(statuses[GOAL_VIEW_STATUS_KEY]);
|
|
180
178
|
const [error, setError] = useState();
|
|
181
179
|
if (!view) return /* @__PURE__ */ jsx(Text, {
|
|
182
180
|
style: styles.meta,
|
|
183
|
-
children: "goal status unavailable"
|
|
181
|
+
children: t("goal.ui.goalStatusUnavailable", "goal status unavailable")
|
|
184
182
|
});
|
|
185
183
|
return /* @__PURE__ */ jsxs(View, {
|
|
186
184
|
testID: "activity-goal-row",
|
|
@@ -194,16 +192,16 @@ function GoalActivitySection({ sessionId, statuses, sendSessionFrame }) {
|
|
|
194
192
|
trailing: /* @__PURE__ */ jsxs(DropdownMenu, { children: [/* @__PURE__ */ jsx(DropdownMenuTrigger, {
|
|
195
193
|
variant: "ghost",
|
|
196
194
|
size: "icon",
|
|
197
|
-
accessibilityLabel: "goal actions",
|
|
195
|
+
accessibilityLabel: t("goal.ui.goalActions", "goal actions"),
|
|
198
196
|
disabled: sessionId === null,
|
|
199
197
|
children: /* @__PURE__ */ jsx(KebabIcon, {})
|
|
200
198
|
}), /* @__PURE__ */ jsxs(DropdownMenuContent, { children: [/* @__PURE__ */ jsx(DropdownMenuItem, {
|
|
201
199
|
onSelect: () => setMode("edit"),
|
|
202
|
-
children: "edit"
|
|
200
|
+
children: t("goal.ui.edit", "edit")
|
|
203
201
|
}), /* @__PURE__ */ jsx(DropdownMenuItem, {
|
|
204
202
|
variant: "destructive",
|
|
205
203
|
onSelect: () => setMode("confirm"),
|
|
206
|
-
children: "remove"
|
|
204
|
+
children: t("goal.ui.remove", "remove")
|
|
207
205
|
})] })] })
|
|
208
206
|
}),
|
|
209
207
|
error ? /* @__PURE__ */ jsx(Text, {
|
|
@@ -267,13 +265,51 @@ const styles = StyleSheet.create((theme) => ({
|
|
|
267
265
|
//#region src/extensions/workspaces/sessions/(frontend)/fill/Goal.activity.goal.native.tsx
|
|
268
266
|
var Goal_activity_goal_native_default = defineFill({ component: GoalActivitySection });
|
|
269
267
|
//#endregion
|
|
268
|
+
//#region src/extensions/workspaces/sessions/(frontend)/fill/Goal.help.guides.native.ts
|
|
269
|
+
var Goal_help_guides_native_default = defineFill({
|
|
270
|
+
slot: "help.guides",
|
|
271
|
+
id: "Goal",
|
|
272
|
+
order: 30,
|
|
273
|
+
data: {
|
|
274
|
+
version: 1,
|
|
275
|
+
category: "work",
|
|
276
|
+
labelKey: "goal.guides.goal",
|
|
277
|
+
label: "Goal",
|
|
278
|
+
guides: [{
|
|
279
|
+
id: "about",
|
|
280
|
+
questionKey: "goal.guides.whatIsAGoal",
|
|
281
|
+
question: "What is a goal?",
|
|
282
|
+
order: 0,
|
|
283
|
+
answerKey: "goal.guides.aGoalKeepsOneObjectiveActiveAcrossAgentTurnsAnIndependentCheckReviewsTheTranscriptAndVerificationEvidenceWhenTheSessionIsIdle",
|
|
284
|
+
answer: "A goal keeps one objective active across agent turns. An independent check reviews the transcript and verification evidence when the session is idle."
|
|
285
|
+
}, {
|
|
286
|
+
id: "budget",
|
|
287
|
+
questionKey: "goal.guides.howDoISetAGoalOrTokenBudget",
|
|
288
|
+
question: "How do I set a goal or token budget?",
|
|
289
|
+
order: 1,
|
|
290
|
+
answerKey: "goal.guides.sendGoalFollowedByYourObjectiveForABudgetUseGoalTokens100kFollowedByTheObjectiveBudgetsAlsoAcceptValuesSuchAs15m",
|
|
291
|
+
answer: "Send /goal followed by your objective. For a budget, use /goal --tokens 100k followed by the objective. Budgets also accept values such as 1.5m.",
|
|
292
|
+
keywords: ["limit", "tokens"]
|
|
293
|
+
}]
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
//#endregion
|
|
270
297
|
//#region generated/native.ts
|
|
271
|
-
const via = (identity, value) =>
|
|
272
|
-
|
|
273
|
-
|
|
298
|
+
const via = (identity, value) => {
|
|
299
|
+
if (value === void 0) return void 0;
|
|
300
|
+
const declaration = value;
|
|
301
|
+
return {
|
|
302
|
+
...identity,
|
|
303
|
+
...declaration,
|
|
304
|
+
...declaration.relations === void 0 ? {} : { relations: declaration.relations.map((relation) => ({
|
|
305
|
+
evidence: "declared",
|
|
306
|
+
...relation
|
|
307
|
+
})) }
|
|
308
|
+
};
|
|
274
309
|
};
|
|
275
310
|
const nativePlugin = defineNativePlugin({
|
|
276
311
|
id: "goal",
|
|
312
|
+
packageName: "@agimon-ai/po-goal",
|
|
277
313
|
session: {
|
|
278
314
|
get activityGroups() {
|
|
279
315
|
return [via({ name: "goal" }, goal_native_default)];
|
|
@@ -282,7 +318,10 @@ const nativePlugin = defineNativePlugin({
|
|
|
282
318
|
return [via({
|
|
283
319
|
slot: "activity.goal",
|
|
284
320
|
id: "goal"
|
|
285
|
-
}, Goal_activity_goal_native_default)
|
|
321
|
+
}, Goal_activity_goal_native_default), via({
|
|
322
|
+
slot: "help.guides",
|
|
323
|
+
id: "goal"
|
|
324
|
+
}, Goal_help_guides_native_default)];
|
|
286
325
|
}
|
|
287
326
|
}
|
|
288
327
|
});
|